diff options
author | unknown <monty@mysql.com> | 2005-01-10 15:28:17 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-01-10 15:28:17 +0200 |
commit | f702a7dd3da1df6f3e454448b2c2fdbeca3ec935 (patch) | |
tree | 24e7d70af6ca5177d0682290abecbd3d4b5139b1 /sql/sql_table.cc | |
parent | 84ed6ed3cf40aff89699a6cbafc427a26b1d4f12 (diff) | |
parent | a749dd50028d4838a067735303a013ddb49200d8 (diff) | |
download | mariadb-git-f702a7dd3da1df6f3e454448b2c2fdbeca3ec935.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 8ee55150a18..c3bfbe086f1 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3446,6 +3446,16 @@ copy_data_between_tables(TABLE *from,TABLE *to, ulong save_sql_mode; DBUG_ENTER("copy_data_between_tables"); + /* + Turn off recovery logging since rollback of an alter table is to + delete the new table so there is no need to log the changes to it. + + This needs to be done before external_lock + */ + error= ha_enable_transaction(thd, FALSE); + if (error) + DBUG_RETURN(-1); + if (!(copy= new Copy_field[to->fields])) DBUG_RETURN(-1); /* purecov: inspected */ @@ -3504,17 +3514,6 @@ copy_data_between_tables(TABLE *from,TABLE *to, goto err; }; - /* - Turn off recovery logging since rollback of an alter table is to - delete the new table so there is no need to log the changes to it. - */ - error= ha_enable_transaction(thd,FALSE); - if (error) - { - error= 1; - goto err; - } - /* Handler must be told explicitly to retrieve all columns, because this function does not set field->query_id in the columns to the current query id */ |