Bug#49329 example (and other) engines use wrong collation for open tables hash
This fix changes the character set used within the IBMDB2I handler to hash table names to information about open tables. Previously, tables with names that differed only in letter case would hash to the same data structure. This caused incorrect behavior or errors when two such tables were in use simultaneously.
This commit is contained in:
parent
350737bf4c
commit
e3df8b6d9a
9
mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_49329.result
Normal file
9
mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_49329.result
Normal file
@ -0,0 +1,9 @@
|
||||
create table ABC (i int) engine=ibmdb2i;
|
||||
insert into ABC values(1);
|
||||
create table abc (i int) engine=ibmdb2i;
|
||||
insert into abc values (2);
|
||||
select * from ABC;
|
||||
i
|
||||
1
|
||||
drop table ABC;
|
||||
drop table abc;
|
10
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_49329.test
Normal file
10
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_49329.test
Normal file
@ -0,0 +1,10 @@
|
||||
source suite/ibmdb2i/include/have_ibmdb2i.inc;
|
||||
source include/have_case_sensitive_file_system.inc;
|
||||
|
||||
create table ABC (i int) engine=ibmdb2i;
|
||||
insert into ABC values(1);
|
||||
create table abc (i int) engine=ibmdb2i;
|
||||
insert into abc values (2);
|
||||
select * from ABC;
|
||||
drop table ABC;
|
||||
drop table abc;
|
@ -284,7 +284,7 @@ static int ibmdb2i_init_func(void *p)
|
||||
was_ILE_inited = false;
|
||||
ibmdb2i_hton= (handlerton *)p;
|
||||
VOID(pthread_mutex_init(&ibmdb2i_mutex,MY_MUTEX_INIT_FAST));
|
||||
(void) hash_init(&ibmdb2i_open_tables,system_charset_info,32,0,0,
|
||||
(void) hash_init(&ibmdb2i_open_tables,table_alias_charset,32,0,0,
|
||||
(hash_get_key) ibmdb2i_get_key,0,0);
|
||||
|
||||
ibmdb2i_hton->state= SHOW_OPTION_YES;
|
||||
|
Loading…
x
Reference in New Issue
Block a user