Bug #50710 timestamp add .0 behind second
| Submitted: | 29 Jan 2010 5:08 | Modified: | 1 Feb 2010 8:58 |
|---|---|---|---|
| Reporter: | davy hou | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | Connector / J | Severity: | S1 (Critical) |
| Version: | 5.1 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[29 Jan 2010 5:08]
davy hou
[29 Jan 2010 12:09]
Tonci Grgin
Hi Davy and thanks for your report. This is not a bug but expected behavior. Java resolution is higher and Java parsers excepts timestamp in such format. Please recheck Java specs.
[30 Jan 2010 5:43]
davy hou
hi,thanks for your reply but i dont think it related to java spec.because when i add index on timestamp,i can not get the result.but when i deleted index on timestamp,i can get the result.it looks like mysql's problem. by the way,mysql's version is 5.1.42. waiting for your reply,thanks.
[1 Feb 2010 8:31]
Tonci Grgin
Davy, MySQL server 5.1 & 5.0 manual says 'A microseconds part is allowable in temporal values in some contexts, such as in literal values' which is what the c/J driver is doing (see http://dev.mysql.com/doc/refman/5.1/en/datetime.html). Also, can you please attach complete test case to the report so I can check? You can consult any bug report in bugs DB with attached test case by Mark, Todd or me to see how to do it (ie. http://bugs.mysql.com/file.php?id=13927). More on fractions of seconds in Bug#8523.
[1 Feb 2010 8:58]
Tonci Grgin
Actually, this is a duplicate of Bug#47963, and so more info can be found in Bug#50774.
[1 Feb 2010 9:04]
Jingqi Xu
to workargound, is it OK to comment the following lines in PreparedStatement.java?
buf.append('.');
buf.append(formatNanos(x.getNanos()));
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.056 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.