Loading mysql-test/r/innodb.result +10 −0 Original line number Diff line number Diff line Loading @@ -501,3 +501,13 @@ table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 4 Field Type Null Key Default Extra testint int(11) 1 a b 1 1 102 2 103 3 4 4 5 5 6 6 7 7 8 8 9 9 mysql-test/t/innodb.test +11 −0 Original line number Diff line number Diff line Loading @@ -537,3 +537,14 @@ drop table t1; create table t1 (testint int not null default 1) type=innodb; desc t1; drop table t1; # # Check update with conflicting key # CREATE TABLE t1 (a int not null primary key, b int not null, unique (b)) type=innodb; INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9); # We need the a < 1000 test here to quard against the halloween problems UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000; SELECT * from t1; drop table t1; sql/key.cc +8 −0 Original line number Diff line number Diff line Loading @@ -269,5 +269,13 @@ bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields) return 1; } } /* If table handler has primary key as part of the index, check that primary key is not updated */ if (idx != table->primary_key && table->primary_key < MAX_KEY && (table->file->option_flag() & HA_PRIMARY_KEY_IN_READ_INDEX)) return check_if_key_used(table, table->primary_key, fields); return 0; } strings/strto.c +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ it can be compiled with the UNSIGNED and/or LONGLONG flag set */ #define strtoll glob_strtoll /* Fix for True64 */ #include <global.h> #include "m_string.h" #include "m_ctype.h" Loading Loading
mysql-test/r/innodb.result +10 −0 Original line number Diff line number Diff line Loading @@ -501,3 +501,13 @@ table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 4 Field Type Null Key Default Extra testint int(11) 1 a b 1 1 102 2 103 3 4 4 5 5 6 6 7 7 8 8 9 9
mysql-test/t/innodb.test +11 −0 Original line number Diff line number Diff line Loading @@ -537,3 +537,14 @@ drop table t1; create table t1 (testint int not null default 1) type=innodb; desc t1; drop table t1; # # Check update with conflicting key # CREATE TABLE t1 (a int not null primary key, b int not null, unique (b)) type=innodb; INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9); # We need the a < 1000 test here to quard against the halloween problems UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000; SELECT * from t1; drop table t1;
sql/key.cc +8 −0 Original line number Diff line number Diff line Loading @@ -269,5 +269,13 @@ bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields) return 1; } } /* If table handler has primary key as part of the index, check that primary key is not updated */ if (idx != table->primary_key && table->primary_key < MAX_KEY && (table->file->option_flag() & HA_PRIMARY_KEY_IN_READ_INDEX)) return check_if_key_used(table, table->primary_key, fields); return 0; }
strings/strto.c +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ it can be compiled with the UNSIGNED and/or LONGLONG flag set */ #define strtoll glob_strtoll /* Fix for True64 */ #include <global.h> #include "m_string.h" #include "m_ctype.h" Loading