Bug #24195 | Datetime conversion from Access does not work properly for dates before 1800 | ||
---|---|---|---|
Submitted: | 10 Nov 2006 15:12 | Modified: | 14 Feb 2007 14:37 |
Reporter: | Till Janetzki | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Migration Toolkit | Severity: | S3 (Non-critical) |
Version: | 1.1.5 rc | OS: | Windows (Windows XP) |
Assigned to: | CPU Architecture: | Any |
[10 Nov 2006 15:12]
Till Janetzki
[13 Nov 2006 8:36]
MySQL Verification Team
Thank you for the bug report. Could you please provide an *.mdb file which presents the issue? Thanks in advance.
[13 Nov 2006 14:42]
Till Janetzki
a simple Access Database with some dates
Attachment: dates.mdb (application/msaccess, text), 140.00 KiB.
[13 Nov 2006 15:05]
Till Janetzki
I attached an Access file containing just one small table: id | date | date_string -------------------------------- 1 | 1.1.1800 | 1.1.1800 2 | 1.1.1750 | 1.1.1750 3 | 1.1.1700 | 1.1.1700 ... When i run the migration toolkit i'll get the following out of it: mysql> select * from foo; +----+---------------------+-------------+ | id | date | date_string | +----+---------------------+-------------+ | 1 | 1800-01-01 00:00:00 | 1.1.1800 | | 2 | 1749-12-31 00:00:00 | 1.1.1750 | | 3 | 1699-12-19 00:00:00 | 1.1.1700 | | 4 | 1649-12-07 00:00:00 | 1.1.1650 | | 5 | 1199-08-19 00:00:00 | 1.1.1200 | +----+---------------------+-------------+ 5 rows in set (0.02 sec)
[25 Nov 2006 17:36]
MySQL Verification Team
Thank you for the feedback. mysql> select * from foo; +----+---------------------+-------------+ | id | date | date_string | +----+---------------------+-------------+ | 1 | 1800-01-01 00:00:00 | 1.1.1800 | | 2 | 1749-12-31 00:00:00 | 1.1.1750 | | 3 | 1699-12-19 00:00:00 | 1.1.1700 | | 4 | 1649-12-07 00:00:00 | 1.1.1650 | | 5 | 1199-08-19 00:00:00 | 1.1.1200 | +----+---------------------+-------------+ 5 rows in set (0.00 sec) -- ---------------------------------------------------------------------- -- SQL data bulk transfer script generated by the MySQL Migration Toolkit -- ---------------------------------------------------------------------- -- Disable foreign key checks SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; INSERT INTO `dates`.`foo`(`id`, `date`, `date_string`) VALUES (1, '1800-01-01 00:00:00', '1.1.1800'), (2, '1749-12-31 00:00:00', '1.1.1750'), (3, '1699-12-19 00:00:00', '1.1.1700'), (4, '1649-12-07 00:00:00', '1.1.1650'), (5, '1199-08-19 00:00:00', '1.1.1200'); -- Re-enable foreign key checks SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; -- End of script
[14 Feb 2007 14:37]
Michael G. Zinner
Hi, this seems to be a bug in the ODBC/JDBC connector. Tests against other databases do not suffer from this issue. As I am not aware of any possible automated workaround for this bug I have to set it to WillNotFix since we cannot change SUN's ODBC/JDBC connector. A manual workaround would be to add a new text column for each MS Access table and update this column to contain the MS Access date in text format, then convert the text back to a MySQL DATETIME column. Mike