From: magnus.blaudd Date: April 13 2012 9:09am Subject: bzr push into mysql-5.5-cluster-7.2 branch (magnus.blaudd:3884 to 3885) Bug#13947227 List-Archive: http://lists.mysql.com/commits/143479 X-Bug: 13947227 Message-Id: <201204130909.q3D99Wn5026262@acsmt356.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3885 magnus.blaudd@stripped 2012-04-13 Bug#13947227 "TRANSACTION_ALLOW_BATCHING" VARIABLE NOT FOUND IN THE CLUSTER 7.2 - The variable was unfortunately lost when rebasing to 5.5 - Readd variable, add sys_vars test and enable the ndb_sql_allow_batching 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 3884 magnus.blaudd@stripped 2012-04-11 ndb - switch back to use our bundled SSL library since error messages are different otherwise and openssl_1.tets fails. We shuld consider switching to "yes" again when that problem is fixed modified: 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/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).