ORA-24347: Warning of a NULL column in an aggregate function
Original Reporter info from Mantis: MAndreato @mandreato
-
Reporter name:
Original Reporter info from Mantis: MAndreato @mandreato
- Reporter name:
Description:
TOracleConnection does not manage OCI_SUCCESS_WITH_INFO in certain cases.
Steps to reproduce:
Lazarus 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 information:
The 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.
Mantis conversion info:
- Mantis ID: 36541
- OS: Windows
- OS Build: 10
- Platform: Intel 64bit
- Version: 3.0.4
- Fixed in version: 3.3.1
- Fixed in revision: 43895 (#35785108).
- Monitored by: » @mandreato (MAndreato)
- Target version: 3.2.0