Bug #47973 | innodb_data_file_path truncated on show variables | ||
---|---|---|---|
Submitted: | 10 Oct 2009 22:40 | Modified: | 13 Jul 2010 18:58 |
Reporter: | Andy Tomasello | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S2 (Serious) |
Version: | 5.0.86 | OS: | Linux |
Assigned to: | Tatiana Azundris Nuernberg | CPU Architecture: | Any |
Tags: | regression |
[10 Oct 2009 22:40]
Andy Tomasello
[10 Oct 2009 22:45]
Andy Tomasello
The bug was tested by me as not occurring in 5.1.26.
[11 Oct 2009 7:11]
Sveta Smirnova
Thank you for the report. Verified as described.
[26 Jan 2010 6:24]
Sveta Smirnova
Bug #50608 was marked as duplicate of this one.
[26 Jan 2010 9:21]
Robin Bowes
The following patch fixes this: --- sql/sql_show.cc.orig 2010-01-26 00:03:32.000000000 +0000 +++ sql/sql_show.cc 2010-01-26 00:05:36.000000000 +0000 @@ -4443,7 +4443,7 @@ ST_FIELD_INFO variables_fields_info[]= { {"Variable_name", 80, MYSQL_TYPE_STRING, 0, 0, "Variable_name"}, - {"Value", FN_REFLEN, MYSQL_TYPE_STRING, 0, 0, "Value"}, + {"Value", 65535, MYSQL_TYPE_STRING, 0, 0, "Value"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} };
[26 Jan 2010 9:22]
Robin Bowes
The previous patch was against v5.0.87.
[15 Jun 2010 14:13]
Tatiana Azundris Nuernberg
Not fixing in 5.0. Suggesting docs update to the effect of, "SHOW VARIABLES is subject to a version-dependent limit in display-width; to get the entirety of a given value, use SELECT ('SELECT @@global.innodb_data_file_path;') in 5.1 and better." thanks, T
[13 Jul 2010 18:58]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.
[13 Jul 2010 21:36]
Robin Bowes
Can I suggest you amend the wording of your documentation change to be more explicit about the problem here? The query "show variables like 'innodb_data_file_path'" is often used to get a list of ibdata files for backup purposes. If this issue has not been fixed (eg. my patch) then the list of ibdata files will be incomplete (the var is silently truncated) and THE BACKUP WILL BE CORRUPT. How about something like: The output from SHOW VARIABLES may be truncated if it exceeds a version-dependent internal length limit. For example, if you have a lot of InnoDB data files then "SHOW VARIABLES LIKE 'innodb_data_file_path'" may *not* return the complete list of files.