Bug #87787 | mysqldbimport shell utility fails if any column name includes _value in its name | ||
---|---|---|---|
Submitted: | 17 Sep 2017 17:16 | Modified: | 19 Sep 2017 13:21 |
Reporter: | Don Alejandro | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Utilities | Severity: | S3 (Non-critical) |
Version: | 1.6.5 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[17 Sep 2017 17:16]
Don Alejandro
[17 Sep 2017 19:28]
MySQL Verification Team
Please provide the output of SHOW CREATE TABLE wp_commentmeta; Thanks.
[18 Sep 2017 14:37]
Don Alejandro
The ‘wp_commentmeta’ table (and the ‘some_table’ table in my test schema) appear to have been created correctly – the column names are correct. The results of SHOW CREATE TABLE wp_commentmeta; is: # Table, Create Table wp_commentmeta, CREATE TABLE `wp_commentmeta` ( `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `comment_id` bigint(20) unsigned NOT NULL DEFAULT '0', `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `meta_value` longtext COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`meta_id`), KEY `comment_id` (`comment_id`), KEY `meta_key` (`meta_key`(191)) ) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci I ran another test using a database that has one table with columns named ID and foovaluefoo, and one row of data in that table. I exported the schema (with the complete-insert option turned on) and then imported it using mysqldbimport, which caused the following error: ERROR: Invalid statement: INSERT INTO `some_table` (`ID`, `foo VALUES foo`) In general, if the substring ‘value’ appears as a fragment of a column name in any table, mysqldbimport will corrupt the column name by inserting the prettified keyword ‘ VALUES ‘ before executing the INSERT, thereby causing the INSERT to fail (which also terminates the import). I’m not sure if this behavior is limited to the string ‘value’ or if mysqldbimport may also be corrupting other keyword-esque column names. Note that mysqldpimport only screws up INSERT statements if the column names are listed in the INSERT (and if a column name contains ‘value’). The same sql files that fail when using mysqldbimport work fine with the Data import/Restore panel of WorkBench. Fwiw, I tweaked the sql file I made available for testing to use foovalufoo as a column name (referenced in the ‘How to repeat’ section of my original bug report).
[18 Sep 2017 14:41]
Don Alejandro
Just above I meant foovaluefoo, as in I tweaked the sql file I made available for testing to use foovaluefoo as a column name (referenced in the ‘How to repeat’ section of my original bug report).
[19 Sep 2017 13:21]
MySQL Verification Team
Thank you for the requested details. Observed this with MySQL utilities 1.6.5 Thanks, Umesh
[1 Jan 2021 19:14]
AHMAD SAMAN
i created a conection in workbench but i cant join this and send me an error messeg (report bug) how i can fix it