diff options
author | joreland@mysql.com <> | 2005-01-10 11:33:08 +0100 |
---|---|---|
committer | joreland@mysql.com <> | 2005-01-10 11:33:08 +0100 |
commit | 4ddd79fb69dd090240f0639b56551cf7e96370d8 (patch) | |
tree | c2c44608394946e44e4fe59110c69ce95673e88a /sql/sql_table.cc | |
parent | 6331241cb3d6f8c05a2616676bca7c10da5bdca8 (diff) | |
download | mariadb-git-4ddd79fb69dd090240f0639b56551cf7e96370d8.tar.gz |
bug#7761 - ndb does not autcommit - postreview fixes
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 52f178946c4..f9f635081cb 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3444,21 +3444,18 @@ copy_data_between_tables(TABLE *from,TABLE *to, ulong save_sql_mode; DBUG_ENTER("copy_data_between_tables"); - if (!(copy= new Copy_field[to->fields])) - DBUG_RETURN(-1); /* purecov: inspected */ - /* 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); + error= ha_enable_transaction(thd, FALSE); if (error) - { DBUG_RETURN(-1); - } - + + if (!(copy= new Copy_field[to->fields])) + DBUG_RETURN(-1); /* purecov: inspected */ if (to->file->external_lock(thd, F_WRLCK)) DBUG_RETURN(-1); |