diff options
author | unknown <joreland@mysql.com> | 2005-01-10 11:49:58 +0100 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2005-01-10 11:49:58 +0100 |
commit | 0b7895b9b14981926c34fbd833aed0d9235da68a (patch) | |
tree | 25170c5b2212afbf97860d211ab9cf8d7ddd9db0 /sql | |
parent | cfe5650cab8aa95c620e59d26d68b035d7a6da0e (diff) | |
parent | 815f62223aa9892b19916724ca76514cb1d899b2 (diff) | |
download | mariadb-git-0b7895b9b14981926c34fbd833aed0d9235da68a.tar.gz |
merge
Diffstat (limited to 'sql')
-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 d7a272f804c..5f8e6cf1f5a 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3588,6 +3588,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->s->fields])) DBUG_RETURN(-1); /* purecov: inspected */ @@ -3646,17 +3656,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 */ |