From: kevin.lewis Date: December 1 2010 2:16am Subject: bzr push into mysql-5.5-innodb branch (kevin.lewis:3245 to 3246) Bug#55222 List-Archive: http://lists.mysql.com/commits/125594 X-Bug: 55222 Message-Id: <20101201021644.B765A813178@dhcp-adc-twvpn-2-vpnpool-10-154-61-32.vpn.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3246 kevin.lewis@stripped 2010-11-30 Fix compiler warning for Bug#55222 patch. modified: storage/innobase/dict/dict0mem.c 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: mysql-test/r/lowercase_table4.result mysql-test/suite/innodb/r/innodb_bug57904.result mysql-test/suite/innodb/t/innodb_bug57904.test mysql-test/t/lowercase_table4.test storage/innobase/dict/dict0dict.c storage/innobase/dict/dict0load.c storage/innobase/dict/dict0mem.c storage/innobase/handler/ha_innodb.cc storage/innobase/include/dict0mem.h storage/innobase/include/srv0srv.h storage/innobase/row/row0ins.c storage/innobase/row/row0mysql.c storage/innobase/row/row0upd.c storage/innobase/srv/srv0srv.c === 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 "mach0data.h" #include "dict0dict.h" #include "srv0srv.h" /* srv_lower_case_table_names */ +#include "ha_prototypes.h" /* innobase_casedn_str()*/ #ifndef UNIV_HOTBACKUP # include "lock0lock.h" #endif /* !UNIV_HOTBACKUP */ No bundle (reason: useless for push emails).