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

merge few bug fixes from 5.6

This commit is contained in:
Sergei Golubchik
2013-07-17 18:51:12 +02:00
parent 1b82512914
commit c1d6a2d7e1
18 changed files with 1278 additions and 25 deletions

View File

@ -6613,6 +6613,12 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
if (def)
{ // Field is changed
def->field=field;
/*
Add column being updated to the list of new columns.
Note that columns with AFTER clauses are added to the end
of the list for now. Their positions will be corrected later.
*/
new_create_list.push_back(def);
if (field->stored_in_db != def->stored_in_db)
{
my_error(ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN, MYF(0));
@ -6620,7 +6626,13 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
if (!def->after)
{
new_create_list.push_back(def);
/*
If this ALTER TABLE doesn't have an AFTER clause for the modified
column then remove this column from the list of columns to be
processed. So later we can iterate over the columns remaining
in this list and process modified columns with AFTER clause or
add new columns.
*/
def_it.remove();
}
}