List:Internals« Previous MessageNext Message »
From:Lars Thalmann Date:June 7 2005 4:49pm
Subject:bk commit into 5.0 tree (lars:1.1939)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of lars. When lars does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1939 05/06/07 16:48:38 lars@stripped +3 -0
  Merge mysql.com:/home/bkroot/mysql-5.0 into mysql.com:/home/bk/mysql-5.0

  sql/sql_parse.cc
    1.451 05/06/07 16:48:28 lars@stripped +0 -0
    Auto merged

  mysql-test/t/sp_trans.test
    1.4 05/06/07 16:48:25 lars@stripped +0 -0
    Auto merged

  mysql-test/r/sp_trans.result
    1.4 05/06/07 16:48:25 lars@stripped +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	lars
# Host:	dhcppc0.ver
# Root:	/home/bk/mysql-5.0/RESYNC

--- 1.450/sql/sql_parse.cc	2005-06-07 14:28:05 +02:00
+++ 1.451/sql/sql_parse.cc	2005-06-07 16:48:28 +02:00
@@ -2764,6 +2764,20 @@
 
   case SQLCOM_CREATE_TABLE:
   {
+    /* If CREATE TABLE of non-temporary table, do implicit commit */
+    if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
+    {
+      if (end_active_trans(thd))
+      {
+	res= -1;
+	break;
+      }
+    }
+    else 
+    {
+      /* So that CREATE TEMPORARY TABLE gets to binlog at commit/rollback */
+      thd->options|= OPTION_STATUS_NO_TRANS_UPDATE;
+    }
     DBUG_ASSERT(first_table == all_tables && first_table != 0);
     bool link_to_local;
     // Skip first table, which is the table we are creating
@@ -3258,6 +3272,11 @@
     break;
   }
   case SQLCOM_TRUNCATE:
+    if (end_active_trans(thd))
+    {
+      res= -1;
+      break;
+    }
     DBUG_ASSERT(first_table == all_tables && first_table != 0);
     if (check_one_table_access(thd, DELETE_ACL, all_tables))
       goto error;
@@ -3352,6 +3371,9 @@
       */
       if (thd->slave_thread)
 	lex->drop_if_exists= 1;
+
+      /* So that DROP TEMPORARY TABLE gets to binlog at commit/rollback */
+      thd->options|= OPTION_STATUS_NO_TRANS_UPDATE;
     }
     res= mysql_rm_table(thd, first_table, lex->drop_if_exists,
 			lex->drop_temporary);
@@ -3490,6 +3512,11 @@
     break;
   case SQLCOM_CREATE_DB:
   {
+    if (end_active_trans(thd))
+    {
+      res= -1;
+      break;
+    }
     char *alias;
     if (!(alias=thd->strdup(lex->name)) || check_db_name(lex->name))
     {
@@ -3520,6 +3547,11 @@
   }
   case SQLCOM_DROP_DB:
   {
+    if (end_active_trans(thd))
+    {
+      res= -1;
+      break;
+    }
     if (check_db_name(lex->name))
     {
       my_error(ER_WRONG_DB_NAME, MYF(0), lex->name);

--- 1.3/mysql-test/r/sp_trans.result	2005-06-07 12:53:03 +02:00
+++ 1.4/mysql-test/r/sp_trans.result	2005-06-07 16:48:25 +02:00
@@ -8,17 +8,13 @@
 set autocommit=0|
 insert t1 values (2)|
 call bug8850()|
-ERROR HY000: Can't execute the given command because you have active locked tables or an
active transaction
 commit|
 select * from t1|
 a
-2
 call bug8850()|
-ERROR HY000: Can't execute the given command because you have active locked tables or an
active transaction
 set autocommit=1|
 select * from t1|
 a
-2
 drop table t1|
 drop procedure bug8850|
 drop function if exists bug10015_1|

--- 1.3/mysql-test/t/sp_trans.test	2005-06-07 12:53:03 +02:00
+++ 1.4/mysql-test/t/sp_trans.test	2005-06-07 16:48:25 +02:00
@@ -24,14 +24,10 @@
 
 set autocommit=0|
 insert t1 values (2)|
---error 1192
 call bug8850()|
 commit|
 select * from t1|
-#
-# when CALL will be fixed to not start a transaction, the error should
-# go away
---error 1192
+
 call bug8850()|
 set autocommit=1|
 select * from t1|
Thread
bk commit into 5.0 tree (lars:1.1939)Lars Thalmann7 Jun