List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:April 13 2012 10:23am
Subject:bzr push into mysql-5.5-cluster-7.3 branch (magnus.blaudd:3878 to 3880)
View as plain text  
 3880 magnus.blaudd@stripped	2012-04-13 [merge]
      Merge 7.2 -> 7.3

    modified:
      sql/ha_ndbcluster.cc
 3879 magnus.blaudd@stripped	2012-04-13 [merge]
      Merge 7.2 -> 7.3

    added:
      mysql-test/suite/sys_vars/r/transaction_allow_batching_basic.result
      mysql-test/suite/sys_vars/t/transaction_allow_batching_basic.test
    modified:
      mysql-test/suite/ndb/t/disabled.def
      sql/sys_vars.cc
 3878 magnus.blaudd@stripped	2012-04-11 [merge]
      Merge 7.2 -> 7.3

    modified:
      storage/ndb/CMakeLists.txt
      storage/ndb/compile-cluster
=== modified file 'mysql-test/suite/ndb/t/disabled.def'
--- a/mysql-test/suite/ndb/t/disabled.def	2012-02-13 21:10:43 +0000
+++ b/mysql-test/suite/ndb/t/disabled.def	2012-04-13 09:03:32 +0000
@@ -16,6 +16,4 @@ ndb_partition_error2 : Bug#40989 ndb_par
 ndb_cache_trans           : Bug#42197 Query cache and autocommit
 ndb_disconnect_ddl        : Bug#31853 flaky testcase...
 
-ndb_sql_allow_batching   : SEAGULL WL3733 xxx_allow_batching
-
 ndb_dbug_lock : SEAGULL gsl locking order

=== added file 'mysql-test/suite/sys_vars/r/transaction_allow_batching_basic.result'
--- a/mysql-test/suite/sys_vars/r/transaction_allow_batching_basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/transaction_allow_batching_basic.result	2012-04-13 09:03:32 +0000
@@ -0,0 +1,35 @@
+SET @start_global_value = @@session.transaction_allow_batching;
+SELECT @start_global_value as "Should be off by default";
+Should be off by default
+0
+select @@global.transaction_allow_batching;
+ERROR HY000: Variable 'transaction_allow_batching' is a SESSION variable
+select @@session.transaction_allow_batching;
+@@session.transaction_allow_batching
+0
+show global variables like 'transaction_allow_batching';
+Variable_name	Value
+show session variables like 'transaction_allow_batching';
+Variable_name	Value
+transaction_allow_batching	OFF
+select * from information_schema.global_variables where variable_name='transaction_allow_batching';
+VARIABLE_NAME	VARIABLE_VALUE
+select * from information_schema.session_variables where variable_name='transaction_allow_batching';
+VARIABLE_NAME	VARIABLE_VALUE
+TRANSACTION_ALLOW_BATCHING	OFF
+set global transaction_allow_batching = 1;
+ERROR HY000: Variable 'transaction_allow_batching' is a SESSION variable and can't be used with SET GLOBAL
+set session transaction_allow_batching = TRUE;
+select @@session.transaction_allow_batching;
+@@session.transaction_allow_batching
+1
+set transaction_allow_batching=1.1;
+ERROR 42000: Incorrect argument type to variable 'transaction_allow_batching'
+set transaction_allow_batching=1e1;
+ERROR 42000: Incorrect argument type to variable 'transaction_allow_batching'
+set transaction_allow_batching="foobar";
+ERROR 42000: Variable 'transaction_allow_batching' can't be set to the value of 'foobar'
+set session transaction_allow_batching = @start_global_value;
+select @@session.transaction_allow_batching;
+@@session.transaction_allow_batching
+0

=== added file 'mysql-test/suite/sys_vars/t/transaction_allow_batching_basic.test'
--- a/mysql-test/suite/sys_vars/t/transaction_allow_batching_basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/transaction_allow_batching_basic.test	2012-04-13 09:03:32 +0000
@@ -0,0 +1,44 @@
+--source include/not_embedded.inc
+
+SET @start_global_value = @@session.transaction_allow_batching;
+SELECT @start_global_value as "Should be off by default";
+
+#
+# exists as session only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@global.transaction_allow_batching;
+select @@session.transaction_allow_batching;
+show global variables like 'transaction_allow_batching';
+show session variables like 'transaction_allow_batching';
+select * from information_schema.global_variables where variable_name='transaction_allow_batching';
+select * from information_schema.session_variables where variable_name='transaction_allow_batching';
+
+#
+# show that it is writable
+#
+--error ER_LOCAL_VARIABLE
+set global transaction_allow_batching = 1;
+set session transaction_allow_batching = TRUE;
+select @@session.transaction_allow_batching;
+
+#
+# incorrect assignments
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set transaction_allow_batching=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set transaction_allow_batching=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set transaction_allow_batching="foobar";
+
+
+#
+# restore original value
+#
+set session transaction_allow_batching = @start_global_value;
+select @@session.transaction_allow_batching;
+
+#
+# See ndb_sql_transaction_allow_batching.test for a comprehensive test case.
+#

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2012-03-30 13:18:59 +0000
+++ b/sql/ha_ndbcluster.cc	2012-04-13 09:51:28 +0000
@@ -4444,11 +4444,7 @@ bool ha_ndbcluster::isManualBinlogExec(T
 static inline bool
 thd_allow_batch(const THD* thd)
 {
-#ifndef OPTION_ALLOW_BATCH
-  return false;
-#else
   return (thd_options(thd) & OPTION_ALLOW_BATCH);
-#endif
 }
 
 

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2012-03-30 06:33:44 +0000
+++ b/sql/sys_vars.cc	2012-04-13 09:03:32 +0000
@@ -2496,6 +2496,13 @@ static Sys_var_mybool Sys_log_binlog(
        DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_sql_log_bin),
        ON_UPDATE(fix_sql_log_bin_after_update));
 
+#ifndef MCP_WL3733
+static Sys_var_bit Sys_transaction_allow_batching(
+       "transaction_allow_batching", "transaction_allow_batching",
+       SESSION_ONLY(option_bits), NO_CMD_LINE, OPTION_ALLOW_BATCH,
+       DEFAULT(FALSE));
+#endif
+
 static Sys_var_bit Sys_sql_warnings(
        "sql_warnings", "sql_warnings",
        SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_WARNINGS,

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.3 branch (magnus.blaudd:3878 to 3880) magnus.blaudd13 Apr