View Issue Details

IDProjectCategoryView StatusLast Update
0036541FPCDatabasepublic2020-01-15 19:21
ReporterMAndreatoAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformIntel 64bitOSWindowsOS Version10
Product Version3.0.4Product Build 
Target VersionFixed in Version3.3.1 
Summary0036541: ORA-24347: Warning of a NULL column in an aggregate function
DescriptionTOracleConnection does not manage OCI_SUCCESS_WITH_INFO in certain cases.
Steps To ReproduceLazarus 2.0.6 win64
FPC 3.0.4
Oracle Server 11.2.0.4
Oracle Client 19.0.0.3

On a form or datamodule, drop TOracleConnection + TSQLTransaction + TSQLQuery:
- OracleConnection1: set DatabaseName of to the TNS alis for the database instance and provide valid UserName + Password.
- SQLTransaction1: set Database to OracleConnection1
- SQLQuery1: set Transaction to SQLTransaction1 and SQL text as follow
select max(decode(Dummy,'X','OK1',null)) Val1
      ,max(decode(Dummy,'Y','OK2',null)) Val2
      ,max(decode(Dummy,'Z','OK3',null)) Val3
  from dual

When activating the query the exception "ORA-24347: Warning of a NULL column in an aggregate function" is raised.
Additional InformationThe same query runs fine on different tools (eg SQL Developer, SQL*Plus).
Probably the OCI_SUCCESS_WITH_INFO result of the fetching process detailed in "...\lazarus\fpc\3.0.4\source\packages\fcl-db\src\sqldb\oracle\oracleconnection.pp" is not managed correctly.
TagsNo tags attached.
Fixed in Revision43895.
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

Michael Van Canneyt

2020-01-09 10:52

administrator   ~0120286

Attempted a fix. Please test and close if OK.

MAndreato

2020-01-15 19:21

reporter   ~0120467

By using fpcupdeluxe, I've installed trunk versions of both Lazarus (2.1.0) and FPC (3.3.1) which includes the fix of Michael Van Canneyt.
When repeating the testcase, the problem is gone: SQLQuery1 now opens correctly.
Thanks!

Issue History

Date Modified Username Field Change
2020-01-09 10:38 MAndreato New Issue
2020-01-09 10:47 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-01-09 10:47 Michael Van Canneyt Status new => assigned
2020-01-09 10:52 Michael Van Canneyt Status assigned => resolved
2020-01-09 10:52 Michael Van Canneyt Resolution open => fixed
2020-01-09 10:52 Michael Van Canneyt Fixed in Version => 3.3.1
2020-01-09 10:52 Michael Van Canneyt Fixed in Revision => 43895.
2020-01-09 10:52 Michael Van Canneyt FPCTarget => 3.2.0
2020-01-09 10:52 Michael Van Canneyt Note Added: 0120286
2020-01-15 19:21 MAndreato Status resolved => closed
2020-01-15 19:21 MAndreato Note Added: 0120467