Bug #44738 | fill_schema_table_from_frm opens tables without lowercasing table name | ||
---|---|---|---|
Submitted: | 8 May 2009 7:04 | Modified: | 12 Nov 2009 19:22 |
Reporter: | Jørgen Løland | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Information schema | Severity: | S3 (Non-critical) |
Version: | 5.1, 6.0 | OS: | Any (powermacg5) |
Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[8 May 2009 7:04]
Jørgen Løland
[12 May 2009 12:49]
Konstantin Osipov
Triage: since 6.0-beta level bug depends on this bug, it should be triaged accordingly.
[12 May 2009 13:05]
Dmitry Lenev
Code inspection shows that this bug should also affect 5.1 branch.
[15 May 2009 8:01]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/74136 2777 Dmitry Lenev 2009-05-15 Fix for bug #44738 "fill_schema_table_from_frm() opens tables without lowercasing table name". In lower_case_table_names > 0 mode some queries to I_S left entries with incorrect key in table definition cache. This wasted memory and in combination with similar problem in CREATE TABLE (which also has peeked into table definition cache using non-normalized key) led to to spurious ER_TABLE_EXISTS_ERROR errors when one tried to create a table with the same name as a previously existing but dropped table (assuming that table name contained characters in upper case). This problem occured due to fact that fill_schema_table_from_frm() was not properly normalizing (lowercasing) database and table names which it used for lookups in table definition cache. This fix adds proper normalization to this function. It also solves similar problem in CREATE TABLE's code by ensuring that it uses properly normalized version of table name when it peeks into table definition cache instead of non-normalized one. @ mysql-test/r/lowercase_table2.result Added test for #44738 "fill_schema_table_from_frm() opens tables without lowercasing table name". @ mysql-test/t/lowercase_table2.test Added test for #44738 "fill_schema_table_from_frm() opens tables without lowercasing table name". @ sql/sql_show.cc Normalize database and table name before using them for looking up entry in table definition cache. @ sql/sql_table.cc Ensure that CREATE TABLE uses properly normalized version of table name when it peeks into table definition cache.
[17 May 2009 17:43]
Bugs System
Pushed into 6.0.12-alpha (revid:alik@sun.com-20090516083658-bo81fcfqxpqoocvb) (version source revid:dlenev@mysql.com-20090515080035-pvl5bz5gbc870npz) (merge vers: 6.0.12-alpha) (pib:6)
[19 May 2009 0:43]
Paul DuBois
Noted in 6.0.12 changelog. For settings of lower_case_table_names greater than 0, some queries for INFORMATION_SCHEMA tables left entries with incorrect lettercase in the table definition cache.
[7 Oct 2009 16:02]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/86041 2886 Dmitry Lenev 2009-10-07 Fix for bug #44738 "fill_schema_table_from_frm() opens tables without lowercasing table name". In lower_case_table_names > 0 mode some queries to I_S left entries with incorrect key in table definition cache. This wasted memory and caused some of the further queries to I_S to produce stale results in cases when table definition was changed by a DDL statement. Also in combination with similar problem in CREATE TABLE (which also has peeked into table definition cache using non-normalized key) this issue led to to spurious ER_TABLE_EXISTS_ERROR errors when one tried to create a table with the same name as a previously existing but dropped table (assuming that table name contained characters in upper case). This problem occured due to fact that fill_schema_table_from_frm() was not properly normalizing (lowercasing) database and table names which it used for lookups in table definition cache. This fix adds proper normalization to this function. It also solves similar problem in CREATE TABLE's code by ensuring that it uses properly normalized version of table name when it peeks into table definition cache instead of non-normalized one. @ mysql-test/r/lowercase_table2.result Added test for #44738 "fill_schema_table_from_frm() opens tables without lowercasing table name". @ mysql-test/t/lowercase_table2.test Added test for #44738 "fill_schema_table_from_frm() opens tables without lowercasing table name". @ sql/sql_show.cc Normalize database and table name before using them for looking up entry in table definition cache. @ sql/sql_table.cc Ensure that CREATE TABLE uses properly normalized version of table name when it peeks into table definition cache.
[9 Oct 2009 9:00]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/86295 2888 Dmitry Lenev 2009-10-09 Fix for bug #44738 "fill_schema_table_from_frm() opens tables without lowercasing table name". In lower_case_table_names > 0 mode some queries to I_S left entries with incorrect key in table definition cache. This wasted memory and caused some of the further queries to I_S to produce stale results in cases when table definition was changed by a DDL statement. Also in combination with similar problem in CREATE TABLE (which also has peeked into table definition cache using non-normalized key) this issue led to to spurious ER_TABLE_EXISTS_ERROR errors when one tried to create a table with the same name as a previously existing but dropped table (assuming that table name contained characters in upper case). This problem occured due to fact that fill_schema_table_from_frm() was not properly normalizing (lowercasing) database and table names which it used for lookups in table definition cache. This fix adds proper normalization to this function. It also solves similar problem in CREATE TABLE's code by ensuring that it uses properly normalized version of table name when it peeks into table definition cache instead of non-normalized one. @ mysql-test/r/lowercase_table2.result Added test for #44738 "fill_schema_table_from_frm() opens tables without lowercasing table name". @ mysql-test/t/lowercase_table2.test Added test for #44738 "fill_schema_table_from_frm() opens tables without lowercasing table name". @ sql/sql_show.cc Normalize database and table name before using them for looking up entry in table definition cache. @ sql/sql_table.cc Ensure that CREATE TABLE uses properly normalized version of table name when it peeks into table definition cache.
[9 Oct 2009 9:23]
Dmitry Lenev
Fix for this bug is going to be pushed in 5.5.0.
[12 Oct 2009 15:52]
Paul DuBois
Noted in 5.5.0 changelog.
[3 Nov 2009 7:17]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091102151658-j9o4wgro47m5v84d) (version source revid:alik@ibmvm-20091009114750-utkhs9029vewkluf) (merge vers: 6.0.14-alpha) (pib:13)
[3 Nov 2009 15:24]
Paul DuBois
Already fixed in earlier 6.0.x release.
[12 Nov 2009 8:22]
Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091110093229-0bh5hix780cyeicl) (version source revid:mikael@mysql.com-20091103113702-p61dlwc6ml6fxg18) (merge vers: 5.5.0-beta) (pib:13)