margarethearlson / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

parser fails on timestamp "24:00:00.1234" #598

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version 1.4.184.

I produced a Revover-SQL script of my db.

The SQL contains insert statements like:
INSERT INTO O_77 VALUES(88, 0, 0, TIMESTAMP '2014-10-31 24:00:00.998', 
'Clearing 2014-10-01 - 2014-10-31', NULL, NULL, 0, TIMESTAMP '2014-11-09 
17:00:20.068', 5, 34);

The timestamp parser fails to import such statements, because the timestamp 
'24:00:00.1234' and not even '24:00:00' seem to be accepted.

Original issue reported on code.google.com by t.fruehb...@gmail.com on 17 Jan 2015 at 6:59

GoogleCodeExporter commented 9 years ago
Well the first hour of the day is 0, and the last is 23. Hour 24 is kind of 
like February 30th.

Original comment by thomas.t...@gmail.com on 19 Jan 2015 at 6:52

GoogleCodeExporter commented 9 years ago
I absolutely agree, but this was produced by Recover-Tool, so it is at least a 
bug - either in the parser, because not capable of adding correctly, or in the 
Recovery-Tool not reading correctly.
I my case it was simple to remove the disturbing lines, but this may be quite a 
problem in other cases.

Original comment by t.fruehb...@gmail.com on 20 Jan 2015 at 9:25

GoogleCodeExporter commented 9 years ago
I'm not sure how your DB got into that state, but I have committed a patch that 
will prevent such values from being created in the future.

Original comment by noelgrandin on 27 Jan 2015 at 11:26