Bug #6607 | Create table... LIKE... with Windows Symlinks | ||
---|---|---|---|
Submitted: | 13 Nov 2004 16:30 | Modified: | 8 Feb 2005 19:39 |
Reporter: | Fred Stiening | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.7 | OS: | Windows (Windows XP Home) |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[13 Nov 2004 16:30]
Fred Stiening
[13 Nov 2004 17:30]
Guilhem Bichot
got a patch
[13 Nov 2004 22:21]
Guilhem Bichot
Note that a similar bug exists if the destination table is to be created in the .sym database; one gets: ERROR 1 (HY000): Can't create/write to file (Errcode: 2)
[19 Nov 2004 9:15]
Guilhem Bichot
Apparently this patch works on Linux with -DUSE_SYMDIR but fails on Windows. So I am donating it here to the Windows team for them to make something which works on Windows. ===== sql/sql_table.cc 1.261 vs edited ===== *** /home/guilhem/tmp/bk_sql_table.cc-1.261_zjO5Lc 2004-11-12 09:44:53 +01:00 --- edited/sql/sql_table.cc 2004-11-13 23:14:48 +01:00 *************** *** 2146,2153 **** strxmov(src_path, (*tmp_table)->path, reg_ext, NullS); else { ! strxmov(src_path, mysql_data_home, "/", src_db, "/", src_table, ! reg_ext, NullS); if (access(src_path, F_OK)) { my_error(ER_BAD_TABLE_ERROR, MYF(0), src_table); --- 2146,2152 ---- strxmov(src_path, (*tmp_table)->path, reg_ext, NullS); else { ! fn_format(src_path, src_table, src_db, reg_ext, MYF(MY_UNPACK_FILENAME)); if (access(src_path, F_OK)) { my_error(ER_BAD_TABLE_ERROR, MYF(0), src_table); *************** *** 2174,2181 **** } else { ! strxmov(dst_path, mysql_data_home, "/", db, "/", table_name, ! reg_ext, NullS); if (!access(dst_path, F_OK)) goto table_exists; } --- 2173,2179 ---- } else { ! fn_format(dst_path, table_name, db, reg_ext, MYF(MY_UNPACK_FILENAME)); if (!access(dst_path, F_OK)) goto table_exists; }
[1 Feb 2005 14:44]
Reggie Burnett
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html
[6 Feb 2005 17:00]
Reggie Burnett
Fixed in 4.1, merged to 5.0
[8 Feb 2005 19:39]
Paul DuBois
Mentioned in 4.1.10 and 5.0.3 change notes.