1
0
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:
monty@mysql.com
2004-05-05 12:31:17 +03:00
parent 59ddd8c738
commit 7e3cf5958c
11 changed files with 82 additions and 20 deletions

View File

@ -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;