WL#3726 "DDL locking", post-review fixes.

----------------------------------------------------------
revno: 2630.2.23
committer: Konstantin Osipov <konstantin@mysql.com>
branch nick: mysql-6.0-runtime
timestamp: Fri 2008-06-27 21:15:11 +0400
message:
  Add an assert that we never call COMMIT or ROLLBACK while having
  a table lock.
This commit is contained in:
Konstantin Osipov 2009-12-03 14:41:29 +03:00
parent d64cf75806
commit 0f9c02d49a

View file

@ -3989,12 +3989,16 @@ end_with_restore_list:
my_ok(thd);
break;
case SQLCOM_COMMIT:
DBUG_ASSERT(thd->lock == NULL ||
thd->locked_tables_mode == LTM_LOCK_TABLES);
if (end_trans(thd, lex->tx_release ? COMMIT_RELEASE :
lex->tx_chain ? COMMIT_AND_CHAIN : COMMIT))
goto error;
my_ok(thd);
break;
case SQLCOM_ROLLBACK:
DBUG_ASSERT(thd->lock == NULL ||
thd->locked_tables_mode == LTM_LOCK_TABLES);
if (end_trans(thd, lex->tx_release ? ROLLBACK_RELEASE :
lex->tx_chain ? ROLLBACK_AND_CHAIN : ROLLBACK))
goto error;