mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed crashing bug with alter table when table was in use (Bug #3643)
We didn't use 'only index' for tables of type 'const'. (Bug #3497)
This commit is contained in:
@ -1029,14 +1029,15 @@ bool reopen_table(TABLE *table,bool locked)
|
||||
*table=tmp;
|
||||
table->file->change_table_ptr(table);
|
||||
|
||||
DBUG_ASSERT(table->table_name);
|
||||
for (field=table->field ; *field ; field++)
|
||||
{
|
||||
(*field)->table=table;
|
||||
(*field)->table= (*field)->orig_table= table;
|
||||
(*field)->table_name=table->table_name;
|
||||
}
|
||||
for (key=0 ; key < table->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->table= table;
|
||||
VOID(pthread_cond_broadcast(&COND_refresh));
|
||||
error=0;
|
||||
|
||||
|
Reference in New Issue
Block a user