Using Delphi 7 , Maria DB 10.1.25 and Zeos 7.2.4
I am having to work with a table in database where there is a field of format of 'datetime (6) ' ie 6 fractional seconds parts as opposed to the default which is (0) none.
Queries on fields with this format always seem to end with 'Integer Overflow'
The exception occurs within : function TZAbstractMySQLResultSet.GetTimestamp(ColumnIndex: Integer): TDateTime; within unit ZDbcMySqlResultSet;
at the line: if (ConSettings^.ReadFormatSettings.DateTimeFormatLen - Len) <= 4 then...
Breaking at this point with the debugger : ConSettings^.ReadFormatSettings.DateTimeFormatLen evalutes as 19,
Len as 26 and the buffer as ''1962-11-23 22:33:00.000000' You can see the datetime 6 format here. It exceptions if this line is executed.
Is there a known bug / workaround or am I missing something?
Mysql Datetime format Integer Overflow Bug?
-
- Fresh Boarder
- Posts: 1
- Joined: 30.09.2020, 16:46
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Mysql Datetime format Integer Overflow Bug?
Hello billarchive,
welcome to the Forums
Best regards,
Jan
welcome to the Forums
Could you please try the current development version of Zeos 7.2? See https://sourceforge.net/p/zeoslib/code-0/HEAD/tree/branches/7.2-patches/. Maybe the bug is already fixed there. Zeos 7.2.4 is more than 2 years old now.
Best regards,
Jan
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Mysql Datetime format Integer Overflow Bug?
Hi billarchive,
as Jan suggest, update from (SVN)-7.2-fixes branch first if you want stay in 7.2. An exception should be thrown, but a rounding of the fractions seems to be required.
Note 7.3 (SVN)\trunk and \testing-7.3 already do support those exact time/Timestamp values including the invalid '0000-00-00' date value mysql supports. On 7.3 a new records to handle such fields corectly. So download a snapshot if you are not using SVN. Have fun.
as Jan suggest, update from (SVN)-7.2-fixes branch first if you want stay in 7.2. An exception should be thrown, but a rounding of the fractions seems to be required.
Note 7.3 (SVN)\trunk and \testing-7.3 already do support those exact time/Timestamp values including the invalid '0000-00-00' date value mysql supports. On 7.3 a new records to handle such fields corectly. So download a snapshot if you are not using SVN. Have fun.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/