diff options
author | konstantin@mysql.com <> | 2005-07-19 22:22:12 +0400 |
---|---|---|
committer | konstantin@mysql.com <> | 2005-07-19 22:22:12 +0400 |
commit | e3af1b6ec6ecd95b6f42192c75af08fcc7c3618a (patch) | |
tree | 830ecb8cde21d2fbd50c5ef14bdbfa2d7a79b607 /sql/handler.cc | |
parent | a0170139a7ad37a4288f77475a1ff9edff395571 (diff) | |
parent | 14344b658a2a41a221bc71399c9211145dac8b03 (diff) | |
download | mariadb-git-e3af1b6ec6ecd95b6f42192c75af08fcc7c3618a.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/kostja/mysql/mysql-5.0-10760-new
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 9f8fdceb69e..0d0f9a75e52 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -208,15 +208,8 @@ handler *get_new_handler(TABLE *table, enum db_type db_type) case DB_TYPE_HASH: return new ha_hash(table); #endif -#ifdef HAVE_ISAM - case DB_TYPE_MRG_ISAM: - return new ha_isammrg(table); - case DB_TYPE_ISAM: - return new ha_isam(table); -#else case DB_TYPE_MRG_ISAM: return new ha_myisammrg(table); -#endif #ifdef HAVE_BERKELEY_DB case DB_TYPE_BERKELEY_DB: return new ha_berkeley(table); @@ -634,6 +627,11 @@ int ha_commit_trans(THD *thd, bool all) DBUG_RETURN(1); } DBUG_EXECUTE_IF("crash_commit_before", abort();); + + /* Close all cursors that can not survive COMMIT */ + if (is_real_trans) /* not a statement commit */ + thd->stmt_map.close_transient_cursors(); + if (!trans->no_2pc && trans->nht > 1) { for (; *ht && !error; ht++) @@ -735,6 +733,10 @@ int ha_rollback_trans(THD *thd, bool all) #ifdef USING_TRANSACTIONS if (trans->nht) { + /* Close all cursors that can not survive ROLLBACK */ + if (is_real_trans) /* not a statement commit */ + thd->stmt_map.close_transient_cursors(); + for (handlerton **ht=trans->ht; *ht; ht++) { int err; |