3246 kevin.lewis@stripped 2010-11-30
Fix compiler warning for Bug#55222 patch.
3245 kevin.lewis@stripped 2010-11-30
Bug#55222 - RB://517 - Approved by Sunny
InnoDB does not attempt to handle lower_case_table_names == 2 when looking
up foreign table names and referenced table name. It turned that server
variable into a boolean and ignored the possibility of it being '2'.
The setting lower_case_table_names == 2 means that it should be stored and
displayed in mixed case as given, but compared internally in lower case.
Normally the server deals with this since it stores table names. But
InnoDB stores referential constraints for the server, so it needs to keep
track of both lower case and given names.
This solution creates two table name pointers for each foreign and referenced
table name. One to display the name, and one to look it up. Both pointers
point to the same allocated string unless this setting is 2. So the overhead
added is not too much.
Two functions are created in dict0mem.c to populate the ..._lookup versions
of these pointers. Both dict_mem_foreign_table_name_lookup_set() and
dict_mem_referenced_table_name_lookup_set() are called 5 times each.
=== modified file 'storage/innobase/dict/dict0mem.c'
--- a/storage/innobase/dict/dict0mem.c revid:kevin.lewis@stripped
+++ b/storage/innobase/dict/dict0mem.c revid:kevin.lewis@stripped
@@ -34,6 +34,7 @@ Created 1/8/1996 Heikki Tuuri
#include "srv0srv.h" /* srv_lower_case_table_names */
+#include "ha_prototypes.h" /* innobase_casedn_str()*/
# include "lock0lock.h"
#endif /* !UNIV_HOTBACKUP */
No bundle (reason: useless for push emails).
|• bzr push into mysql-5.5-innodb branch (kevin.lewis:3245 to 3246) Bug#55222||kevin.lewis||1 Dec|