1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#46760: Fast ALTER TABLE no longer works for InnoDB

Despite copying the value of the old table's row type
we don't always have to mark row type as being specified.
Innodb uses this to check if it can do fast ALTER TABLE
or not.
Fixed by correctly flagging the presence of row_type 
only when it's actually changed.
Added a test case for 39200.
This commit is contained in:
Georgi Kodinov
2009-09-18 16:01:18 +03:00
parent 64badb5f26
commit 01e5bc703d
5 changed files with 102 additions and 0 deletions

View File

@ -6656,9 +6656,19 @@ view_err:
goto err;
}
/*
If this is an ALTER TABLE and no explicit row type specified reuse
the table's row type.
Note : this is the same as if the row type was specified explicitly.
*/
if (create_info->row_type == ROW_TYPE_NOT_USED)
{
/* ALTER TABLE without explicit row type */
create_info->row_type= table->s->row_type;
}
else
{
/* ALTER TABLE with specific row type */
create_info->used_fields |= HA_CREATE_USED_ROW_FORMAT;
}