mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#37284 Crash in Field_string::type()
The bug is repeatable with latest(1.0.1) InnoDB plugin on Linux, Win, If MySQL is compiled with valgrind there are errors about using of uninitialized variable(orig_table). The fix is to set field->orig_table correct value. mysql-test/r/innodb_mysql.result: test result mysql-test/t/innodb_mysql.test: test case sql/sql_base.cc: set field->orig_table to 'table' value because it may be bogus and it leads to crash on Field_string::type() function.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user