Bug #11540 | Incorrect year conversion in setDate(..) for system that use B.E. year | ||
---|---|---|---|
Submitted: | 24 Jun 2005 4:29 | Modified: | 24 Jun 2005 20:00 |
Reporter: | Vorrarit Luengwattanakij | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 3.1.8a | OS: | Windows (Windows2000 sp4) |
Assigned to: | Mark Matthews | CPU Architecture: | Any |
[24 Jun 2005 4:29]
Vorrarit Luengwattanakij
[24 Jun 2005 14:37]
Aleksey Kishkin
Hi! can't reproduce it. I attached java program that I used for testing, and tested it against mysql 4.1.10 and connector/j 3.1.6 and 3.1.10. In all cases first select (that get date from table without condition) returns me 1462-03-04 and second select returns 1 row - exacty the same date 1462-03-04 BTW I assume you meant 'table1' instead of 'testdate' in table definition. If you have any ideas how to reproduce this bug, pls let us know
[24 Jun 2005 14:38]
Aleksey Kishkin
test case
Attachment: bug11540.java (application/octet-stream, text), 1.33 KiB.
[24 Jun 2005 16:45]
Mark Matthews
The testcase seems to be missing setting the default locale to TH , th. I've got a working testcase, and will be fixing the bug. Thanks.
[24 Jun 2005 20:00]
Mark Matthews
Thank you for your bug report. This is fixed for 3.1.11, and will be available in the nightly snapshot build after 00:00 GMT June 25th at http://downloads.mysql.com/snapshots.php#connector-j
[27 Jun 2005 3:53]
Vorrarit Luengwattanakij
Thank you, Mark. You have done a great job.
[1 Jul 2005 6:48]
Sathaporn Nitithamyong
Don't forget to fix com.mysql.jdbc.ResultSet too, All "new GregorianCalendar()" should be changed to "new GregorianCalendar(Locale.US)" too avoid problem when reading date or timestamp value back.
[6 Jul 2005 9:20]
Vorrarit Luengwattanakij
Hi K. Sathaporn, I haven't found the problem with ResultSet. Please ... 1) Submit a new bug with the way to repeat it. or 2) Send email to me, I will help you check. My email is vorrarit at yahoo dot com. Please email me. I always use MySQL with Thai locale. I want to get update for the problem and solution. Thanks