~mysql/mysql-server/mysql-6.0

Viewing all changes in revision 2777.

  • Committer: Dmitry Lenev
  • Date: 2009-05-15 08:00:35 UTC
  • Revision ID: dlenev@mysql.com-20090515080035-pvl5bz5gbc870npz
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.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: