6.6.x bugs/miss with Oracle and FireBird
Posted: 04.11.2009, 09:22
Hi, got some bugs/miss with zeosdbo 6.6.4
ZDbcStatement.pas - there is no common Prepare\UnPrepare methods. For example with Oracle we have really prepared statements, but with FireBird - not.
ZDbcOracleUtils.pas (all Oracle cases founded on 10.2.0.3)
- function ConvertOracleTypeToSQLType:
TypeName = 'DATE' - truncate time (they really have time), when result is stDate - chage to stTimeStamp
NUMBER precission must be an option, because to keep full Int32 we need at least Number(10). stLong don't work and incorrect - Oracle may return up to 37 digits - change to stDouble
LoadOracleVars and others - strange 1024 bytes limit for strings. I don't check, but Oracle can handle up to 4000 chars strings.
ZDbcOracleResultSet.pas
- TZOracleResultSet.Open - same with date and precission
- TZOracleBlob.ReadBlob - memory leak with local ReadStream
- TZOracleBlob.WriteBlob - bug with writiion blob with BlobSize=0 - it's not IsEmpty. Change condition to if (BlobSize > 0) and not IsEmpty then...
ZDbcOracleMetadata.pas
- TZOracleDatabaseMetadata.UncachedGetColumns - we allways work in context of some schema, ever SchemaPattern is empty string. I have tens same-structure schemas on server and got a big problem whith this method. Change sql-conditions with (select SYS_CONTEXT(''USERENV'',''CURRENT_SCHEMA'') from DUAL)
ZDbcInterbase6Utils.pas, ZDbcInterbase6Statement.pas - I need really prepared updates.
ZDbcInterbase6ResultSet.pas
- TZInterbase6ResultSet.Close - FStmtHandle := nil to avoid double-release of handle in some cases.
ZAbstractRODataset.pas
- TZAbstractRODataset.GetRecord - some stub changes to work as forward-only DataSet.
- TZAbstractRODataset.PSStartTransaction, TZAbstractRODataset.PSEndTransaction - wrong AutoCommit check - is Midas say StartTransaction they dont expect this transaction end before they say EndTransaction.
There is some problems with transaction at all. Why TZConnection do not really start transaction, when i do this call. It's looks like some optimization, but i may want to start snapshot trnsaction and check the time, when transaction started - now it's impossible at that level.
IB uses one transaction for all. But it's long and not good idea for mixing read/write operation.
ZDbcStatement.pas - there is no common Prepare\UnPrepare methods. For example with Oracle we have really prepared statements, but with FireBird - not.
ZDbcOracleUtils.pas (all Oracle cases founded on 10.2.0.3)
- function ConvertOracleTypeToSQLType:
TypeName = 'DATE' - truncate time (they really have time), when result is stDate - chage to stTimeStamp
NUMBER precission must be an option, because to keep full Int32 we need at least Number(10). stLong don't work and incorrect - Oracle may return up to 37 digits - change to stDouble
LoadOracleVars and others - strange 1024 bytes limit for strings. I don't check, but Oracle can handle up to 4000 chars strings.
ZDbcOracleResultSet.pas
- TZOracleResultSet.Open - same with date and precission
- TZOracleBlob.ReadBlob - memory leak with local ReadStream
- TZOracleBlob.WriteBlob - bug with writiion blob with BlobSize=0 - it's not IsEmpty. Change condition to if (BlobSize > 0) and not IsEmpty then...
ZDbcOracleMetadata.pas
- TZOracleDatabaseMetadata.UncachedGetColumns - we allways work in context of some schema, ever SchemaPattern is empty string. I have tens same-structure schemas on server and got a big problem whith this method. Change sql-conditions with (select SYS_CONTEXT(''USERENV'',''CURRENT_SCHEMA'') from DUAL)
ZDbcInterbase6Utils.pas, ZDbcInterbase6Statement.pas - I need really prepared updates.
ZDbcInterbase6ResultSet.pas
- TZInterbase6ResultSet.Close - FStmtHandle := nil to avoid double-release of handle in some cases.
ZAbstractRODataset.pas
- TZAbstractRODataset.GetRecord - some stub changes to work as forward-only DataSet.
- TZAbstractRODataset.PSStartTransaction, TZAbstractRODataset.PSEndTransaction - wrong AutoCommit check - is Midas say StartTransaction they dont expect this transaction end before they say EndTransaction.
There is some problems with transaction at all. Why TZConnection do not really start transaction, when i do this call. It's looks like some optimization, but i may want to start snapshot trnsaction and check the time, when transaction started - now it's impossible at that level.
IB uses one transaction for all. But it's long and not good idea for mixing read/write operation.