Loading VC++Files/winmysqladmin/mysql_com.h +11 −15 Original line number Diff line number Diff line Loading @@ -159,28 +159,28 @@ enum enum_field_types { FIELD_TYPE_DECIMAL, FIELD_TYPE_TINY, /* Shutdown/kill enums and constants */ /* Bits for THD::killable. */ #define KILLABLE_CONNECT (unsigned char)(1 << 0) #define KILLABLE_TRANS (unsigned char)(1 << 1) #define KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) #define KILLABLE_UPDATE (unsigned char)(1 << 3) #define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) #define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) #define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) #define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) enum enum_shutdown_level { enum mysql_enum_shutdown_level { /* We want levels to be in growing order of hardness (because we use number comparisons). Note that DEFAULT does not respect the growing property, but it's ok. */ SHUTDOWN_DEFAULT= 0, DEFAULT= 0, /* wait for existing connections to finish */ SHUTDOWN_WAIT_CONNECTIONS= KILLABLE_CONNECT, WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT, /* wait for existing trans to finish */ SHUTDOWN_WAIT_TRANSACTIONS= KILLABLE_TRANS, WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS, /* wait for existing updates to finish (=> no partial MyISAM update) */ SHUTDOWN_WAIT_UPDATES= KILLABLE_UPDATE, WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE, /* flush InnoDB buffers and other storage engines' buffers*/ SHUTDOWN_WAIT_ALL_BUFFERS= (KILLABLE_UPDATE << 1), WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1), /* don't flush InnoDB buffers, flush other storage engines' buffers*/ SHUTDOWN_WAIT_CRITICAL_BUFFERS= (KILLABLE_UPDATE << 1) + 1, WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1, /* Now the 2 levels of the KILL command */ #if MYSQL_VERSION_ID >= 50000 KILL_QUERY= 254, Loading @@ -188,10 +188,6 @@ enum enum_shutdown_level { KILL_CONNECTION= 255 }; /* Same value and type (0, enum_shutdown_level) but not same meaning */ #define NOT_KILLED SHUTDOWN_DEFAULT extern unsigned long max_allowed_packet; extern unsigned long net_buffer_length; Loading include/mysql_com.h +11 −15 Original line number Diff line number Diff line Loading @@ -227,28 +227,28 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, /* Shutdown/kill enums and constants */ /* Bits for THD::killable. */ #define KILLABLE_CONNECT (unsigned char)(1 << 0) #define KILLABLE_TRANS (unsigned char)(1 << 1) #define KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) #define KILLABLE_UPDATE (unsigned char)(1 << 3) #define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) #define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) #define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) #define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) enum enum_shutdown_level { enum mysql_enum_shutdown_level { /* We want levels to be in growing order of hardness (because we use number comparisons). Note that DEFAULT does not respect the growing property, but it's ok. */ SHUTDOWN_DEFAULT= 0, DEFAULT= 0, /* wait for existing connections to finish */ SHUTDOWN_WAIT_CONNECTIONS= KILLABLE_CONNECT, WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT, /* wait for existing trans to finish */ SHUTDOWN_WAIT_TRANSACTIONS= KILLABLE_TRANS, WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS, /* wait for existing updates to finish (=> no partial MyISAM update) */ SHUTDOWN_WAIT_UPDATES= KILLABLE_UPDATE, WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE, /* flush InnoDB buffers and other storage engines' buffers*/ SHUTDOWN_WAIT_ALL_BUFFERS= (KILLABLE_UPDATE << 1), WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1), /* don't flush InnoDB buffers, flush other storage engines' buffers*/ SHUTDOWN_WAIT_CRITICAL_BUFFERS= (KILLABLE_UPDATE << 1) + 1, WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1, /* Now the 2 levels of the KILL command */ #if MYSQL_VERSION_ID >= 50000 KILL_QUERY= 254, Loading @@ -256,10 +256,6 @@ enum enum_shutdown_level { KILL_CONNECTION= 255 }; /* Same value and type (0, enum_shutdown_level) but not same meaning */ #define NOT_KILLED SHUTDOWN_DEFAULT /* options for mysql_set_option */ enum enum_mysql_set_option { Loading mysql-test/r/ctype_utf8.result +36 −0 Original line number Diff line number Diff line Loading @@ -470,6 +470,42 @@ ERROR 23000: Duplicate entry 'ꪪꪪ' for key 1 drop table t1; create table t1 ( c char(10) character set utf8 collate utf8_bin, unique key a using hash (c(1)) ) engine=heap; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c` char(10) character set utf8 collate utf8_bin default NULL, UNIQUE KEY `a` (`c`(1)) ) ENGINE=HEAP DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); insert into t1 values ('aa'); ERROR 23000: Duplicate entry 'aa' for key 1 insert into t1 values ('aaa'); ERROR 23000: Duplicate entry 'aaa' for key 1 insert into t1 values ('б'); insert into t1 values ('бб'); ERROR 23000: Duplicate entry 'б' for key 1 insert into t1 values ('ббб'); ERROR 23000: Duplicate entry 'б' for key 1 select c as c_all from t1 order by c; c_all a b c d e f б select c as c_a from t1 where c='a'; c_a a select c as c_a from t1 where c='б'; c_a б drop table t1; create table t1 ( c char(10) character set utf8 collate utf8_bin, unique key a using btree (c(1)) ) engine=heap; show create table t1; Loading mysql-test/t/ctype_utf8.test +19 −21 Original line number Diff line number Diff line Loading @@ -349,27 +349,25 @@ drop table t1; # Bug 4531: unique key prefix interacts poorly with utf8 # Check HEAP+HASH, binary collation # # This doesn't work correctly yet. # #create table t1 ( #c char(10) character set utf8 collate utf8_bin, #unique key a using hash (c(1)) #) engine=heap; #show create table t1; #insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); #--error 1062 #insert into t1 values ('aa'); #--error 1062 #insert into t1 values ('aaa'); #insert into t1 values ('б'); #--error 1062 #insert into t1 values ('бб'); #--error 1062 #insert into t1 values ('ббб'); #select c as c_all from t1 order by c; #select c as c_a from t1 where c='a'; #select c as c_a from t1 where c='б'; #drop table t1; create table t1 ( c char(10) character set utf8 collate utf8_bin, unique key a using hash (c(1)) ) engine=heap; show create table t1; insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); --error 1062 insert into t1 values ('aa'); --error 1062 insert into t1 values ('aaa'); insert into t1 values ('б'); --error 1062 insert into t1 values ('бб'); --error 1062 insert into t1 values ('ббб'); select c as c_all from t1 order by c; select c as c_a from t1 where c='a'; select c as c_a from t1 where c='б'; drop table t1; # # Bug 4531: unique key prefix interacts poorly with utf8 Loading sql/ha_heap.cc +1 −1 Original line number Diff line number Diff line Loading @@ -430,7 +430,7 @@ int ha_heap::create(const char *name, TABLE *table_arg, { if (!f_is_packed(flag) && f_packtype(flag) == (int) FIELD_TYPE_DECIMAL && !(flag & FIELDFLAG_BINARY)) !(field->charset() == &my_charset_bin)) seg->type= (int) HA_KEYTYPE_TEXT; else seg->type= (int) HA_KEYTYPE_BINARY; Loading Loading
VC++Files/winmysqladmin/mysql_com.h +11 −15 Original line number Diff line number Diff line Loading @@ -159,28 +159,28 @@ enum enum_field_types { FIELD_TYPE_DECIMAL, FIELD_TYPE_TINY, /* Shutdown/kill enums and constants */ /* Bits for THD::killable. */ #define KILLABLE_CONNECT (unsigned char)(1 << 0) #define KILLABLE_TRANS (unsigned char)(1 << 1) #define KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) #define KILLABLE_UPDATE (unsigned char)(1 << 3) #define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) #define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) #define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) #define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) enum enum_shutdown_level { enum mysql_enum_shutdown_level { /* We want levels to be in growing order of hardness (because we use number comparisons). Note that DEFAULT does not respect the growing property, but it's ok. */ SHUTDOWN_DEFAULT= 0, DEFAULT= 0, /* wait for existing connections to finish */ SHUTDOWN_WAIT_CONNECTIONS= KILLABLE_CONNECT, WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT, /* wait for existing trans to finish */ SHUTDOWN_WAIT_TRANSACTIONS= KILLABLE_TRANS, WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS, /* wait for existing updates to finish (=> no partial MyISAM update) */ SHUTDOWN_WAIT_UPDATES= KILLABLE_UPDATE, WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE, /* flush InnoDB buffers and other storage engines' buffers*/ SHUTDOWN_WAIT_ALL_BUFFERS= (KILLABLE_UPDATE << 1), WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1), /* don't flush InnoDB buffers, flush other storage engines' buffers*/ SHUTDOWN_WAIT_CRITICAL_BUFFERS= (KILLABLE_UPDATE << 1) + 1, WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1, /* Now the 2 levels of the KILL command */ #if MYSQL_VERSION_ID >= 50000 KILL_QUERY= 254, Loading @@ -188,10 +188,6 @@ enum enum_shutdown_level { KILL_CONNECTION= 255 }; /* Same value and type (0, enum_shutdown_level) but not same meaning */ #define NOT_KILLED SHUTDOWN_DEFAULT extern unsigned long max_allowed_packet; extern unsigned long net_buffer_length; Loading
include/mysql_com.h +11 −15 Original line number Diff line number Diff line Loading @@ -227,28 +227,28 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, /* Shutdown/kill enums and constants */ /* Bits for THD::killable. */ #define KILLABLE_CONNECT (unsigned char)(1 << 0) #define KILLABLE_TRANS (unsigned char)(1 << 1) #define KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) #define KILLABLE_UPDATE (unsigned char)(1 << 3) #define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) #define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) #define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) #define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) enum enum_shutdown_level { enum mysql_enum_shutdown_level { /* We want levels to be in growing order of hardness (because we use number comparisons). Note that DEFAULT does not respect the growing property, but it's ok. */ SHUTDOWN_DEFAULT= 0, DEFAULT= 0, /* wait for existing connections to finish */ SHUTDOWN_WAIT_CONNECTIONS= KILLABLE_CONNECT, WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT, /* wait for existing trans to finish */ SHUTDOWN_WAIT_TRANSACTIONS= KILLABLE_TRANS, WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS, /* wait for existing updates to finish (=> no partial MyISAM update) */ SHUTDOWN_WAIT_UPDATES= KILLABLE_UPDATE, WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE, /* flush InnoDB buffers and other storage engines' buffers*/ SHUTDOWN_WAIT_ALL_BUFFERS= (KILLABLE_UPDATE << 1), WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1), /* don't flush InnoDB buffers, flush other storage engines' buffers*/ SHUTDOWN_WAIT_CRITICAL_BUFFERS= (KILLABLE_UPDATE << 1) + 1, WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1, /* Now the 2 levels of the KILL command */ #if MYSQL_VERSION_ID >= 50000 KILL_QUERY= 254, Loading @@ -256,10 +256,6 @@ enum enum_shutdown_level { KILL_CONNECTION= 255 }; /* Same value and type (0, enum_shutdown_level) but not same meaning */ #define NOT_KILLED SHUTDOWN_DEFAULT /* options for mysql_set_option */ enum enum_mysql_set_option { Loading
mysql-test/r/ctype_utf8.result +36 −0 Original line number Diff line number Diff line Loading @@ -470,6 +470,42 @@ ERROR 23000: Duplicate entry 'ꪪꪪ' for key 1 drop table t1; create table t1 ( c char(10) character set utf8 collate utf8_bin, unique key a using hash (c(1)) ) engine=heap; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c` char(10) character set utf8 collate utf8_bin default NULL, UNIQUE KEY `a` (`c`(1)) ) ENGINE=HEAP DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); insert into t1 values ('aa'); ERROR 23000: Duplicate entry 'aa' for key 1 insert into t1 values ('aaa'); ERROR 23000: Duplicate entry 'aaa' for key 1 insert into t1 values ('б'); insert into t1 values ('бб'); ERROR 23000: Duplicate entry 'б' for key 1 insert into t1 values ('ббб'); ERROR 23000: Duplicate entry 'б' for key 1 select c as c_all from t1 order by c; c_all a b c d e f б select c as c_a from t1 where c='a'; c_a a select c as c_a from t1 where c='б'; c_a б drop table t1; create table t1 ( c char(10) character set utf8 collate utf8_bin, unique key a using btree (c(1)) ) engine=heap; show create table t1; Loading
mysql-test/t/ctype_utf8.test +19 −21 Original line number Diff line number Diff line Loading @@ -349,27 +349,25 @@ drop table t1; # Bug 4531: unique key prefix interacts poorly with utf8 # Check HEAP+HASH, binary collation # # This doesn't work correctly yet. # #create table t1 ( #c char(10) character set utf8 collate utf8_bin, #unique key a using hash (c(1)) #) engine=heap; #show create table t1; #insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); #--error 1062 #insert into t1 values ('aa'); #--error 1062 #insert into t1 values ('aaa'); #insert into t1 values ('б'); #--error 1062 #insert into t1 values ('бб'); #--error 1062 #insert into t1 values ('ббб'); #select c as c_all from t1 order by c; #select c as c_a from t1 where c='a'; #select c as c_a from t1 where c='б'; #drop table t1; create table t1 ( c char(10) character set utf8 collate utf8_bin, unique key a using hash (c(1)) ) engine=heap; show create table t1; insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); --error 1062 insert into t1 values ('aa'); --error 1062 insert into t1 values ('aaa'); insert into t1 values ('б'); --error 1062 insert into t1 values ('бб'); --error 1062 insert into t1 values ('ббб'); select c as c_all from t1 order by c; select c as c_a from t1 where c='a'; select c as c_a from t1 where c='б'; drop table t1; # # Bug 4531: unique key prefix interacts poorly with utf8 Loading
sql/ha_heap.cc +1 −1 Original line number Diff line number Diff line Loading @@ -430,7 +430,7 @@ int ha_heap::create(const char *name, TABLE *table_arg, { if (!f_is_packed(flag) && f_packtype(flag) == (int) FIELD_TYPE_DECIMAL && !(flag & FIELDFLAG_BINARY)) !(field->charset() == &my_charset_bin)) seg->type= (int) HA_KEYTYPE_TEXT; else seg->type= (int) HA_KEYTYPE_BINARY; Loading