Loading mysql-test/r/innodb_mysql.result +6 −0 Original line number Diff line number Diff line Loading @@ -1261,4 +1261,10 @@ a b c 5 1 1 4 1 1 DROP TABLE t1; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a char(50)) ENGINE=InnoDB; CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; a DROP TABLE t1; End of 5.0 tests mysql-test/t/innodb_mysql.test +11 −0 Original line number Diff line number Diff line Loading @@ -1014,4 +1014,15 @@ SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5; DROP TABLE t1; # # Bug#37284 Crash in Field_string::type() # --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings CREATE TABLE t1 (a char(50)) ENGINE=InnoDB; CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; DROP TABLE t1; --echo End of 5.0 tests sql/sql_base.cc +3 −0 Original line number Diff line number Diff line Loading @@ -2102,7 +2102,10 @@ bool reopen_table(TABLE *table,bool locked) for (key=0 ; key < table->s->keys ; key++) { for (part=0 ; part < table->key_info[key].usable_key_parts ; part++) { table->key_info[key].key_part[part].field->table= table; table->key_info[key].key_part[part].field->orig_table= table; } } if (table->triggers) table->triggers->set_table(table); Loading Loading
mysql-test/r/innodb_mysql.result +6 −0 Original line number Diff line number Diff line Loading @@ -1261,4 +1261,10 @@ a b c 5 1 1 4 1 1 DROP TABLE t1; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a char(50)) ENGINE=InnoDB; CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; a DROP TABLE t1; End of 5.0 tests
mysql-test/t/innodb_mysql.test +11 −0 Original line number Diff line number Diff line Loading @@ -1014,4 +1014,15 @@ SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5; DROP TABLE t1; # # Bug#37284 Crash in Field_string::type() # --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings CREATE TABLE t1 (a char(50)) ENGINE=InnoDB; CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; DROP TABLE t1; --echo End of 5.0 tests
sql/sql_base.cc +3 −0 Original line number Diff line number Diff line Loading @@ -2102,7 +2102,10 @@ bool reopen_table(TABLE *table,bool locked) for (key=0 ; key < table->s->keys ; key++) { for (part=0 ; part < table->key_info[key].usable_key_parts ; part++) { table->key_info[key].key_part[part].field->table= table; table->key_info[key].key_part[part].field->orig_table= table; } } if (table->triggers) table->triggers->set_table(table); Loading