List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:June 27 2008 5:15pm
Subject:bzr commit into mysql-6.0 branch (konstantin:2661)
View as plain text  
#At file:///opt/local/work/mysql-6.0-runtime/

 2661 Konstantin Osipov	2008-06-27
      Add an assert that we never call COMMIT or ROLLBACK while having
      a table lock.
modified:
  sql/sql_parse.cc

per-file messages:
  sql/sql_parse.cc
    We should never call COMMIT or ROLLBACK with a table lock, except
    when under LOCK TABLES.
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2008-06-26 18:56:36 +0000
+++ b/sql/sql_parse.cc	2008-06-27 17:15:11 +0000
@@ -3880,6 +3880,8 @@ 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;
@@ -3890,6 +3892,8 @@ end_with_restore_list:
     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;

Thread
bzr commit into mysql-6.0 branch (konstantin:2661) Konstantin Osipov27 Jun