Commit e3c1ee24 authored by V Narayanan's avatar V Narayanan

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.

mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_49329.result:
  Bug#49329 example (and other) engines use wrong collation for open tables hash
  
  Result file for the test case.
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_49329.test:
  Bug#49329 example (and other) engines use wrong collation for open tables hash
  
  Test case for the bug fix.
storage/ibmdb2i/ha_ibmdb2i.cc:
  Bug#49329 example (and other) engines use wrong collation for open tables hash
  
  change the character set used within the IBMDB2I
  handler to hash table names to information about
  open tables.
parent ba71a9e5
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;
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) ...@@ -284,7 +284,7 @@ static int ibmdb2i_init_func(void *p)
was_ILE_inited = false; was_ILE_inited = false;
ibmdb2i_hton= (handlerton *)p; ibmdb2i_hton= (handlerton *)p;
VOID(pthread_mutex_init(&ibmdb2i_mutex,MY_MUTEX_INIT_FAST)); 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); (hash_get_key) ibmdb2i_get_key,0,0);
ibmdb2i_hton->state= SHOW_OPTION_YES; ibmdb2i_hton->state= SHOW_OPTION_YES;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment