summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-12-08 12:33:33 -0800
committerunknown <jimw@mysql.com>2005-12-08 12:33:33 -0800
commitab597139a7e96d8e3194739299b9dbde5a6cf961 (patch)
tree17c25f1452a24b4c5142a7cd6aa2a37e7558efcf /sql/sql_delete.cc
parent5aeb69296a4e134f0215da3e6bcce4956b7d76ad (diff)
downloadmariadb-git-ab597139a7e96d8e3194739299b9dbde5a6cf961.tar.gz
Fix calls to free_underlaid_joins() in INSERT, DELETE, and UPDATE
handling so that indexes are closed before trying to commit the transaction. (Bug #15536) mysql-test/r/bdb.result: Add new results mysql-test/t/bdb.test: Add new test sql/sql_delete.cc: Move call to free_underlaid_joins() to before ha_autocommit_or_rollback(). sql/sql_insert.cc: Move call to free_underlaid_joins() to before ha_autocommit_or_rollback(). sql/sql_update.cc: Move call to free_underlaid_joins() to before ha_autocommit_or_rollback().
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 079a301818c..203173f52f4 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -241,6 +241,7 @@ cleanup:
if (!log_delayed)
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
}
+ free_underlaid_joins(thd, &thd->lex->select_lex);
if (transactional_table)
{
if (ha_autocommit_or_rollback(thd,error >= 0))
@@ -252,7 +253,6 @@ cleanup:
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
- free_underlaid_joins(thd, &thd->lex->select_lex);
if (error >= 0 || thd->net.report_error)
send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN: 0);
else