summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-28 14:24:02 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-28 14:24:02 +0200
commite3efc3d88d8ed52e1a686368a775e96bc84b5526 (patch)
treedc0accc3fb2a4d4e6767b564672195f5eb1f87a4
parent29d01b0ac787fe4dc14d84e76ef3cf1106bc2179 (diff)
downloadmariadb-git-e3efc3d88d8ed52e1a686368a775e96bc84b5526.tar.gz
fixes for sys_vars and pbxt suites
-rw-r--r--client/CMakeLists.txt1
-rw-r--r--mysql-test/r/mysqld--help-notwin.result9
-rw-r--r--mysql-test/suite/pbxt/r/lock_multi.result11
-rw-r--r--mysql-test/suite/pbxt/t/lock_multi.test35
-rw-r--r--mysql-test/suite/sys_vars/r/all_vars.result19
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_annotate_rows_events_basic.result50
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_optimize_thread_scheduling_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/in_transaction_basic.result19
-rw-r--r--mysql-test/suite/sys_vars/r/join_buffer_space_limit_basic.result57
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_block_size_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/progress_report_time_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_strip_comments_basic.result39
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_annotate_rows_events_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/thread_alarm_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/t/all_vars.test2
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_annotate_rows_events_basic.test39
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_dbug_fsync_sleep_basic.test46
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_optimize_thread_scheduling_basic.test21
-rw-r--r--mysql-test/suite/sys_vars/t/in_transaction_basic.test21
-rw-r--r--mysql-test/suite/sys_vars/t/join_buffer_space_limit_basic.test44
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_block_size_basic.test21
-rw-r--r--mysql-test/suite/sys_vars/t/progress_report_time_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_strip_comments_basic.test38
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_annotate_rows_events_basic.test21
-rw-r--r--mysql-test/suite/sys_vars/t/thread_alarm_basic.test21
-rw-r--r--sql/mysqld.cc2
-rw-r--r--sql/sys_vars.cc2
27 files changed, 619 insertions, 69 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 80c5bbd1c9f..97fb4289872 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -31,6 +31,7 @@ MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc
TARGET_LINK_LIBRARIES(mysql mysqlclient)
IF(UNIX)
TARGET_LINK_LIBRARIES(mysql ${READLINE_LIBRARY})
+ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -rdynamic")
ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result
index 593a147096c..b9bdee3211b 100644
--- a/mysql-test/r/mysqld--help-notwin.result
+++ b/mysql-test/r/mysqld--help-notwin.result
@@ -266,13 +266,10 @@ The following options may be given as the first argument:
use --general-log/--general-log-file instead).
--log-basename=name Basename for all log files and the .pid file. This sets
all log file names at once (in 'datadir') and is normally
- the only option you need for specifying log files. This
- is especially recommend to be set if you are using
- replication as it ensures that your log file names are
- not depending on your host name. Sets names for
- --log-bin, --log-bin-index, --relay-log,
+ the only option you need for specifying log files. Sets
+ names for --log-bin, --log-bin-index, --relay-log,
--relay-log-index, --general-log-file,
- --log-slow-query-log-file, --log-error-file and
+ --log-slow-query-log-file, --log-error-file, and
--pid-file
--log-bin[=name] Log update queries in binary format. Optional argument
should be name for binary log. If not given
diff --git a/mysql-test/suite/pbxt/r/lock_multi.result b/mysql-test/suite/pbxt/r/lock_multi.result
index b860da24e64..29010d93bfe 100644
--- a/mysql-test/suite/pbxt/r/lock_multi.result
+++ b/mysql-test/suite/pbxt/r/lock_multi.result
@@ -138,17 +138,6 @@ unlock tables;
unlock tables;
drop table t1,t2;
End of 5.0 tests
-create table t1 (i int);
-lock table t1 read;
-update t1 set i= 10;
-select * from t1;
-Timeout in wait_condition.inc for select count(*) = 1 from information_schema.processlist
-where state = "Table Lock" and info = "select * from t1"
-kill query ID;
-i
-ERROR 70100: Query execution was interrupted
-unlock tables;
-drop table t1;
drop table if exists t1;
create table t1 (i int);
connection: default
diff --git a/mysql-test/suite/pbxt/t/lock_multi.test b/mysql-test/suite/pbxt/t/lock_multi.test
index 82188e36098..b15e6c9dea3 100644
--- a/mysql-test/suite/pbxt/t/lock_multi.test
+++ b/mysql-test/suite/pbxt/t/lock_multi.test
@@ -416,41 +416,6 @@ drop table t1,t2;
--echo End of 5.0 tests
-#
-# Bug#21281 Pending write lock is incorrectly removed when its
-# statement being KILLed
-#
-create table t1 (i int);
-connection locker;
-lock table t1 read;
-connection writer;
-send
-update t1 set i= 10;
-connection reader;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Table Lock" and info = "update t1 set i= 10";
---source include/wait_condition.inc
-send
-select * from t1;
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Table Lock" and info = "select * from t1";
---source include/wait_condition.inc
-let $ID= `select id from information_schema.processlist where state = "Table Lock" and info = "update t1 set i= 10"`;
---replace_result $ID ID
-eval kill query $ID;
-connection reader;
---reap
-connection writer;
---error ER_QUERY_INTERRUPTED
---reap
-connection locker;
-unlock tables;
-connection default;
-drop table t1;
-
# Disconnect sessions used in many subtests above
disconnect locker;
disconnect reader;
diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result
index 39065701100..50720052513 100644
--- a/mysql-test/suite/sys_vars/r/all_vars.result
+++ b/mysql-test/suite/sys_vars/r/all_vars.result
@@ -5,22 +5,11 @@ insert into t2 select variable_name from information_schema.global_variables;
insert into t2 select variable_name from information_schema.session_variables;
delete from t2 where variable_name='innodb_change_buffering_debug';
update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
-select distinct variable_name as `There should be *no* long test name listed below:` from t2
+select distinct variable_name as `there should be *no* long test name listed below:` from t2
where length(variable_name) > 50;
-There should be *no* long test name listed below:
-select distinct variable_name as `There should be *no* variables listed below:` from t2
+there should be *no* long test name listed below:
+select distinct variable_name as `there should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null;
-There should be *no* variables listed below:
-BINLOG_ANNOTATE_ROWS_EVENTS
-BINLOG_DBUG_FSYNC_SLEEP
-BINLOG_OPTIMIZE_THREAD_SCHEDULING
-IN_TRANSACTION
-JOIN_BUFFER_SPACE_LIMIT
-LOG_BASENAME
-MYISAM_BLOCK_SIZE
-PROGRESS_REPORT_TIME
-QUERY_CACHE_STRIP_COMMENTS
-REPLICATE_ANNOTATE_ROWS_EVENTS
-THREAD_ALARM
+there should be *no* variables listed below:
drop table t1;
drop table t2;
diff --git a/mysql-test/suite/sys_vars/r/binlog_annotate_rows_events_basic.result b/mysql-test/suite/sys_vars/r/binlog_annotate_rows_events_basic.result
new file mode 100644
index 00000000000..af6b27972e5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_annotate_rows_events_basic.result
@@ -0,0 +1,50 @@
+SET @start_global_value = @@global.binlog_annotate_rows_events;
+select @@global.binlog_annotate_rows_events;
+@@global.binlog_annotate_rows_events
+0
+select @@session.binlog_annotate_rows_events;
+@@session.binlog_annotate_rows_events
+0
+show global variables like 'binlog_annotate_rows_events';
+Variable_name Value
+binlog_annotate_rows_events OFF
+show session variables like 'binlog_annotate_rows_events';
+Variable_name Value
+binlog_annotate_rows_events OFF
+select * from information_schema.global_variables where variable_name='binlog_annotate_rows_events';
+VARIABLE_NAME VARIABLE_VALUE
+BINLOG_ANNOTATE_ROWS_EVENTS OFF
+select * from information_schema.session_variables where variable_name='binlog_annotate_rows_events';
+VARIABLE_NAME VARIABLE_VALUE
+BINLOG_ANNOTATE_ROWS_EVENTS OFF
+set global binlog_annotate_rows_events=ON;
+select @@global.binlog_annotate_rows_events;
+@@global.binlog_annotate_rows_events
+1
+set global binlog_annotate_rows_events=OFF;
+select @@global.binlog_annotate_rows_events;
+@@global.binlog_annotate_rows_events
+0
+set global binlog_annotate_rows_events=1;
+select @@global.binlog_annotate_rows_events;
+@@global.binlog_annotate_rows_events
+1
+set session binlog_annotate_rows_events=ON;
+select @@session.binlog_annotate_rows_events;
+@@session.binlog_annotate_rows_events
+1
+set session binlog_annotate_rows_events=OFF;
+select @@session.binlog_annotate_rows_events;
+@@session.binlog_annotate_rows_events
+0
+set session binlog_annotate_rows_events=1;
+select @@session.binlog_annotate_rows_events;
+@@session.binlog_annotate_rows_events
+1
+set global binlog_annotate_rows_events=1.1;
+ERROR 42000: Incorrect argument type to variable 'binlog_annotate_rows_events'
+set session binlog_annotate_rows_events=1e1;
+ERROR 42000: Incorrect argument type to variable 'binlog_annotate_rows_events'
+set session binlog_annotate_rows_events="foo";
+ERROR 42000: Variable 'binlog_annotate_rows_events' can't be set to the value of 'foo'
+SET @@global.binlog_annotate_rows_events = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/binlog_optimize_thread_scheduling_basic.result b/mysql-test/suite/sys_vars/r/binlog_optimize_thread_scheduling_basic.result
new file mode 100644
index 00000000000..278199b4af7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_optimize_thread_scheduling_basic.result
@@ -0,0 +1,21 @@
+select @@global.binlog_optimize_thread_scheduling;
+@@global.binlog_optimize_thread_scheduling
+1
+select @@session.binlog_optimize_thread_scheduling;
+ERROR HY000: Variable 'binlog_optimize_thread_scheduling' is a GLOBAL variable
+show global variables like 'binlog_optimize_thread_scheduling';
+Variable_name Value
+binlog_optimize_thread_scheduling ON
+show session variables like 'binlog_optimize_thread_scheduling';
+Variable_name Value
+binlog_optimize_thread_scheduling ON
+select * from information_schema.global_variables where variable_name='binlog_optimize_thread_scheduling';
+VARIABLE_NAME VARIABLE_VALUE
+BINLOG_OPTIMIZE_THREAD_SCHEDULING ON
+select * from information_schema.session_variables where variable_name='binlog_optimize_thread_scheduling';
+VARIABLE_NAME VARIABLE_VALUE
+BINLOG_OPTIMIZE_THREAD_SCHEDULING ON
+set global binlog_optimize_thread_scheduling=1;
+ERROR HY000: Variable 'binlog_optimize_thread_scheduling' is a read only variable
+set session binlog_optimize_thread_scheduling=1;
+ERROR HY000: Variable 'binlog_optimize_thread_scheduling' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/in_transaction_basic.result b/mysql-test/suite/sys_vars/r/in_transaction_basic.result
new file mode 100644
index 00000000000..4d22d0b2c8b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/in_transaction_basic.result
@@ -0,0 +1,19 @@
+select @@global.in_transaction;
+ERROR HY000: Variable 'in_transaction' is a SESSION variable
+select @@session.in_transaction;
+@@session.in_transaction
+0
+show global variables like 'in_transaction';
+Variable_name Value
+show session variables like 'in_transaction';
+Variable_name Value
+in_transaction 0
+select * from information_schema.global_variables where variable_name='in_transaction';
+VARIABLE_NAME VARIABLE_VALUE
+select * from information_schema.session_variables where variable_name='in_transaction';
+VARIABLE_NAME VARIABLE_VALUE
+IN_TRANSACTION 0
+set global in_transaction=1;
+ERROR HY000: Variable 'in_transaction' is a read only variable
+set session in_transaction=1;
+ERROR HY000: Variable 'in_transaction' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/join_buffer_space_limit_basic.result b/mysql-test/suite/sys_vars/r/join_buffer_space_limit_basic.result
new file mode 100644
index 00000000000..7377528cfad
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/join_buffer_space_limit_basic.result
@@ -0,0 +1,57 @@
+SET @start_global_value = @@global.join_buffer_space_limit;
+select @@global.join_buffer_space_limit;
+@@global.join_buffer_space_limit
+2097152
+select @@session.join_buffer_space_limit;
+@@session.join_buffer_space_limit
+2097152
+show global variables like 'join_buffer_space_limit';
+Variable_name Value
+join_buffer_space_limit 2097152
+show session variables like 'join_buffer_space_limit';
+Variable_name Value
+join_buffer_space_limit 2097152
+select * from information_schema.global_variables where variable_name='join_buffer_space_limit';
+VARIABLE_NAME VARIABLE_VALUE
+JOIN_BUFFER_SPACE_LIMIT 2097152
+select * from information_schema.session_variables where variable_name='join_buffer_space_limit';
+VARIABLE_NAME VARIABLE_VALUE
+JOIN_BUFFER_SPACE_LIMIT 2097152
+set global join_buffer_space_limit=10;
+Warnings:
+Warning 1292 Truncated incorrect join_buffer_space_limit value: '10'
+select @@global.join_buffer_space_limit;
+@@global.join_buffer_space_limit
+2048
+set session join_buffer_space_limit=10;
+Warnings:
+Warning 1292 Truncated incorrect join_buffer_space_limit value: '10'
+select @@session.join_buffer_space_limit;
+@@session.join_buffer_space_limit
+2048
+set global join_buffer_space_limit=1.1;
+ERROR 42000: Incorrect argument type to variable 'join_buffer_space_limit'
+set session join_buffer_space_limit=1e1;
+ERROR 42000: Incorrect argument type to variable 'join_buffer_space_limit'
+set global join_buffer_space_limit="foo";
+ERROR 42000: Incorrect argument type to variable 'join_buffer_space_limit'
+set global join_buffer_space_limit=0;
+Warnings:
+Warning 1292 Truncated incorrect join_buffer_space_limit value: '0'
+select @@global.join_buffer_space_limit;
+@@global.join_buffer_space_limit
+2048
+set global join_buffer_space_limit=4095;
+Warnings:
+Warning 1292 Truncated incorrect join_buffer_space_limit value: '4095'
+select @@global.join_buffer_space_limit;
+@@global.join_buffer_space_limit
+2048
+set session join_buffer_space_limit=cast(-1 as unsigned int);
+Warnings:
+Warning 1105 Cast to unsigned converted negative integer to it's positive complement
+Warning 1292 Truncated incorrect join_buffer_space_limit value: '18446744073709551615'
+select @@session.join_buffer_space_limit;
+@@session.join_buffer_space_limit
+18446744073709549568
+SET @@global.join_buffer_space_limit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/myisam_block_size_basic.result b/mysql-test/suite/sys_vars/r/myisam_block_size_basic.result
new file mode 100644
index 00000000000..907b96c1b6a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/myisam_block_size_basic.result
@@ -0,0 +1,21 @@
+select @@global.myisam_block_size;
+@@global.myisam_block_size
+1024
+select @@session.myisam_block_size;
+ERROR HY000: Variable 'myisam_block_size' is a GLOBAL variable
+show global variables like 'myisam_block_size';
+Variable_name Value
+myisam_block_size 1024
+show session variables like 'myisam_block_size';
+Variable_name Value
+myisam_block_size 1024
+select * from information_schema.global_variables where variable_name='myisam_block_size';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_BLOCK_SIZE 1024
+select * from information_schema.session_variables where variable_name='myisam_block_size';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_BLOCK_SIZE 1024
+set global myisam_block_size=1;
+ERROR HY000: Variable 'myisam_block_size' is a read only variable
+set session myisam_block_size=1;
+ERROR HY000: Variable 'myisam_block_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/progress_report_time_basic.result b/mysql-test/suite/sys_vars/r/progress_report_time_basic.result
new file mode 100644
index 00000000000..8436ee699e2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/progress_report_time_basic.result
@@ -0,0 +1,44 @@
+SET @start_global_value = @@global.progress_report_time;
+select @@global.progress_report_time;
+@@global.progress_report_time
+56
+select @@session.progress_report_time;
+@@session.progress_report_time
+56
+show global variables like 'progress_report_time';
+Variable_name Value
+progress_report_time 56
+show session variables like 'progress_report_time';
+Variable_name Value
+progress_report_time 56
+select * from information_schema.global_variables where variable_name='progress_report_time';
+VARIABLE_NAME VARIABLE_VALUE
+PROGRESS_REPORT_TIME 56
+select * from information_schema.session_variables where variable_name='progress_report_time';
+VARIABLE_NAME VARIABLE_VALUE
+PROGRESS_REPORT_TIME 56
+set global progress_report_time=10;
+select @@global.progress_report_time;
+@@global.progress_report_time
+10
+set session progress_report_time=10;
+select @@session.progress_report_time;
+@@session.progress_report_time
+10
+set global progress_report_time=1.1;
+ERROR 42000: Incorrect argument type to variable 'progress_report_time'
+set session progress_report_time=1e1;
+ERROR 42000: Incorrect argument type to variable 'progress_report_time'
+set global progress_report_time="foo";
+ERROR 42000: Incorrect argument type to variable 'progress_report_time'
+set global progress_report_time=0;
+select @@global.progress_report_time;
+@@global.progress_report_time
+0
+set session progress_report_time=cast(-1 as unsigned int);
+Warnings:
+Warning 1105 Cast to unsigned converted negative integer to it's positive complement
+select @@session.progress_report_time;
+@@session.progress_report_time
+18446744073709551615
+SET @@global.progress_report_time = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/query_cache_strip_comments_basic.result b/mysql-test/suite/sys_vars/r/query_cache_strip_comments_basic.result
new file mode 100644
index 00000000000..33c76f05868
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/query_cache_strip_comments_basic.result
@@ -0,0 +1,39 @@
+SET @start_global_value = @@global.query_cache_strip_comments;
+select @@global.query_cache_strip_comments;
+@@global.query_cache_strip_comments
+0
+select @@session.query_cache_strip_comments;
+ERROR HY000: Variable 'query_cache_strip_comments' is a GLOBAL variable
+show global variables like 'query_cache_strip_comments';
+Variable_name Value
+query_cache_strip_comments OFF
+show session variables like 'query_cache_strip_comments';
+Variable_name Value
+query_cache_strip_comments OFF
+select * from information_schema.global_variables where variable_name='query_cache_strip_comments';
+VARIABLE_NAME VARIABLE_VALUE
+QUERY_CACHE_STRIP_COMMENTS OFF
+select * from information_schema.session_variables where variable_name='query_cache_strip_comments';
+VARIABLE_NAME VARIABLE_VALUE
+QUERY_CACHE_STRIP_COMMENTS OFF
+set global query_cache_strip_comments=ON;
+select @@global.query_cache_strip_comments;
+@@global.query_cache_strip_comments
+1
+set global query_cache_strip_comments=OFF;
+select @@global.query_cache_strip_comments;
+@@global.query_cache_strip_comments
+0
+set global query_cache_strip_comments=1;
+select @@global.query_cache_strip_comments;
+@@global.query_cache_strip_comments
+1
+set session query_cache_strip_comments=1;
+ERROR HY000: Variable 'query_cache_strip_comments' is a GLOBAL variable and should be set with SET GLOBAL
+set global query_cache_strip_comments=1.1;
+ERROR 42000: Incorrect argument type to variable 'query_cache_strip_comments'
+set global query_cache_strip_comments=1e1;
+ERROR 42000: Incorrect argument type to variable 'query_cache_strip_comments'
+set global query_cache_strip_comments="foo";
+ERROR 42000: Variable 'query_cache_strip_comments' can't be set to the value of 'foo'
+SET @@global.query_cache_strip_comments = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/replicate_annotate_rows_events_basic.result b/mysql-test/suite/sys_vars/r/replicate_annotate_rows_events_basic.result
new file mode 100644
index 00000000000..ef0d29fad07
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/replicate_annotate_rows_events_basic.result
@@ -0,0 +1,21 @@
+select @@global.replicate_annotate_rows_events;
+@@global.replicate_annotate_rows_events
+0
+select @@session.replicate_annotate_rows_events;
+ERROR HY000: Variable 'replicate_annotate_rows_events' is a GLOBAL variable
+show global variables like 'replicate_annotate_rows_events';
+Variable_name Value
+replicate_annotate_rows_events OFF
+show session variables like 'replicate_annotate_rows_events';
+Variable_name Value
+replicate_annotate_rows_events OFF
+select * from information_schema.global_variables where variable_name='replicate_annotate_rows_events';
+VARIABLE_NAME VARIABLE_VALUE
+REPLICATE_ANNOTATE_ROWS_EVENTS OFF
+select * from information_schema.session_variables where variable_name='replicate_annotate_rows_events';
+VARIABLE_NAME VARIABLE_VALUE
+REPLICATE_ANNOTATE_ROWS_EVENTS OFF
+set global replicate_annotate_rows_events=1;
+ERROR HY000: Variable 'replicate_annotate_rows_events' is a read only variable
+set session replicate_annotate_rows_events=1;
+ERROR HY000: Variable 'replicate_annotate_rows_events' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/thread_alarm_basic.result b/mysql-test/suite/sys_vars/r/thread_alarm_basic.result
new file mode 100644
index 00000000000..f298c0204eb
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_alarm_basic.result
@@ -0,0 +1,21 @@
+select @@global.thread_alarm;
+@@global.thread_alarm
+1
+select @@session.thread_alarm;
+ERROR HY000: Variable 'thread_alarm' is a GLOBAL variable
+show global variables like 'thread_alarm';
+Variable_name Value
+thread_alarm ON
+show session variables like 'thread_alarm';
+Variable_name Value
+thread_alarm ON
+select * from information_schema.global_variables where variable_name='thread_alarm';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_ALARM ON
+select * from information_schema.session_variables where variable_name='thread_alarm';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_ALARM ON
+set global thread_alarm=1;
+ERROR HY000: Variable 'thread_alarm' is a read only variable
+set session thread_alarm=1;
+ERROR HY000: Variable 'thread_alarm' is a read only variable
diff --git a/mysql-test/suite/sys_vars/t/all_vars.test b/mysql-test/suite/sys_vars/t/all_vars.test
index 054a74277da..3f7e778fd2c 100644
--- a/mysql-test/suite/sys_vars/t/all_vars.test
+++ b/mysql-test/suite/sys_vars/t/all_vars.test
@@ -74,10 +74,12 @@ delete from t2 where variable_name='innodb_change_buffering_debug';
update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
--sorted_result
+--lowercase_result
select distinct variable_name as `There should be *no* long test name listed below:` from t2
where length(variable_name) > 50;
--sorted_result
+--lowercase_result
select distinct variable_name as `There should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null;
diff --git a/mysql-test/suite/sys_vars/t/binlog_annotate_rows_events_basic.test b/mysql-test/suite/sys_vars/t/binlog_annotate_rows_events_basic.test
new file mode 100644
index 00000000000..89bdb0986e5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_annotate_rows_events_basic.test
@@ -0,0 +1,39 @@
+# bool session
+
+SET @start_global_value = @@global.binlog_annotate_rows_events;
+
+select @@global.binlog_annotate_rows_events;
+select @@session.binlog_annotate_rows_events;
+show global variables like 'binlog_annotate_rows_events';
+show session variables like 'binlog_annotate_rows_events';
+select * from information_schema.global_variables where variable_name='binlog_annotate_rows_events';
+select * from information_schema.session_variables where variable_name='binlog_annotate_rows_events';
+
+#
+# show that it's writable
+#
+set global binlog_annotate_rows_events=ON;
+select @@global.binlog_annotate_rows_events;
+set global binlog_annotate_rows_events=OFF;
+select @@global.binlog_annotate_rows_events;
+set global binlog_annotate_rows_events=1;
+select @@global.binlog_annotate_rows_events;
+
+set session binlog_annotate_rows_events=ON;
+select @@session.binlog_annotate_rows_events;
+set session binlog_annotate_rows_events=OFF;
+select @@session.binlog_annotate_rows_events;
+set session binlog_annotate_rows_events=1;
+select @@session.binlog_annotate_rows_events;
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global binlog_annotate_rows_events=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session binlog_annotate_rows_events=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set session binlog_annotate_rows_events="foo";
+
+SET @@global.binlog_annotate_rows_events = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/binlog_dbug_fsync_sleep_basic.test b/mysql-test/suite/sys_vars/t/binlog_dbug_fsync_sleep_basic.test
new file mode 100644
index 00000000000..f4e1161aa07
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_dbug_fsync_sleep_basic.test
@@ -0,0 +1,46 @@
+# ulong global
+
+SET @start_global_value = @@global.binlog_dbug_fsync_sleep;
+
+#
+# exists as global only
+#
+select @@global.binlog_dbug_fsync_sleep;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.binlog_dbug_fsync_sleep;
+show global variables like 'binlog_dbug_fsync_sleep';
+show session variables like 'binlog_dbug_fsync_sleep';
+select * from information_schema.global_variables where variable_name='binlog_dbug_fsync_sleep';
+select * from information_schema.session_variables where variable_name='binlog_dbug_fsync_sleep';
+
+#
+# show that it's writable
+#
+set global binlog_dbug_fsync_sleep=200;
+select @@global.binlog_dbug_fsync_sleep;
+--error ER_GLOBAL_VARIABLE
+set session binlog_dbug_fsync_sleep=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global binlog_dbug_fsync_sleep=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global binlog_dbug_fsync_sleep=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global binlog_dbug_fsync_sleep="foo";
+
+#
+# min/max values, block size
+#
+set global binlog_dbug_fsync_sleep=1;
+select @@global.binlog_dbug_fsync_sleep;
+set global binlog_dbug_fsync_sleep=@@global.binlog_dbug_fsync_sleep + 100 - 1;
+select @@global.binlog_dbug_fsync_sleep;
+set global binlog_dbug_fsync_sleep=@@global.binlog_dbug_fsync_sleep + 100;
+select @@global.binlog_dbug_fsync_sleep;
+set global binlog_dbug_fsync_sleep=cast(-1 as unsigned int);
+select @@global.binlog_dbug_fsync_sleep;
+
+SET @@global.binlog_dbug_fsync_sleep = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/binlog_optimize_thread_scheduling_basic.test b/mysql-test/suite/sys_vars/t/binlog_optimize_thread_scheduling_basic.test
new file mode 100644
index 00000000000..01726907ea0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_optimize_thread_scheduling_basic.test
@@ -0,0 +1,21 @@
+# bool readonly
+
+#
+# show values;
+#
+select @@global.binlog_optimize_thread_scheduling;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.binlog_optimize_thread_scheduling;
+show global variables like 'binlog_optimize_thread_scheduling';
+show session variables like 'binlog_optimize_thread_scheduling';
+select * from information_schema.global_variables where variable_name='binlog_optimize_thread_scheduling';
+select * from information_schema.session_variables where variable_name='binlog_optimize_thread_scheduling';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global binlog_optimize_thread_scheduling=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session binlog_optimize_thread_scheduling=1;
+
diff --git a/mysql-test/suite/sys_vars/t/in_transaction_basic.test b/mysql-test/suite/sys_vars/t/in_transaction_basic.test
new file mode 100644
index 00000000000..906c971d9ab
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/in_transaction_basic.test
@@ -0,0 +1,21 @@
+# bool readonly
+
+#
+# show values;
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@global.in_transaction;
+select @@session.in_transaction;
+show global variables like 'in_transaction';
+show session variables like 'in_transaction';
+select * from information_schema.global_variables where variable_name='in_transaction';
+select * from information_schema.session_variables where variable_name='in_transaction';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global in_transaction=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session in_transaction=1;
+
diff --git a/mysql-test/suite/sys_vars/t/join_buffer_space_limit_basic.test b/mysql-test/suite/sys_vars/t/join_buffer_space_limit_basic.test
new file mode 100644
index 00000000000..46d09062abc
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/join_buffer_space_limit_basic.test
@@ -0,0 +1,44 @@
+# ulonglong session
+
+SET @start_global_value = @@global.join_buffer_space_limit;
+
+#
+# exists as global and session
+#
+select @@global.join_buffer_space_limit;
+select @@session.join_buffer_space_limit;
+show global variables like 'join_buffer_space_limit';
+show session variables like 'join_buffer_space_limit';
+select * from information_schema.global_variables where variable_name='join_buffer_space_limit';
+select * from information_schema.session_variables where variable_name='join_buffer_space_limit';
+
+#
+# show that it's writable
+#
+set global join_buffer_space_limit=10;
+select @@global.join_buffer_space_limit;
+set session join_buffer_space_limit=10;
+select @@session.join_buffer_space_limit;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global join_buffer_space_limit=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session join_buffer_space_limit=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global join_buffer_space_limit="foo";
+
+#
+# min/max values, block size
+#
+set global join_buffer_space_limit=0;
+select @@global.join_buffer_space_limit;
+set global join_buffer_space_limit=4095;
+select @@global.join_buffer_space_limit;
+set session join_buffer_space_limit=cast(-1 as unsigned int);
+select @@session.join_buffer_space_limit;
+
+SET @@global.join_buffer_space_limit = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/myisam_block_size_basic.test b/mysql-test/suite/sys_vars/t/myisam_block_size_basic.test
new file mode 100644
index 00000000000..a564d54226e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/myisam_block_size_basic.test
@@ -0,0 +1,21 @@
+# ulong readonly
+
+#
+# show the global and session values;
+#
+select @@global.myisam_block_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.myisam_block_size;
+show global variables like 'myisam_block_size';
+show session variables like 'myisam_block_size';
+select * from information_schema.global_variables where variable_name='myisam_block_size';
+select * from information_schema.session_variables where variable_name='myisam_block_size';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global myisam_block_size=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session myisam_block_size=1;
+
diff --git a/mysql-test/suite/sys_vars/t/progress_report_time_basic.test b/mysql-test/suite/sys_vars/t/progress_report_time_basic.test
new file mode 100644
index 00000000000..1292ddecda6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/progress_report_time_basic.test
@@ -0,0 +1,42 @@
+# ulong session
+
+SET @start_global_value = @@global.progress_report_time;
+
+#
+# exists as global only
+#
+select @@global.progress_report_time;
+select @@session.progress_report_time;
+show global variables like 'progress_report_time';
+show session variables like 'progress_report_time';
+select * from information_schema.global_variables where variable_name='progress_report_time';
+select * from information_schema.session_variables where variable_name='progress_report_time';
+
+#
+# show that it's writable
+#
+set global progress_report_time=10;
+select @@global.progress_report_time;
+set session progress_report_time=10;
+select @@session.progress_report_time;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global progress_report_time=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session progress_report_time=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global progress_report_time="foo";
+
+#
+# min/max values, block size
+#
+set global progress_report_time=0;
+select @@global.progress_report_time;
+set session progress_report_time=cast(-1 as unsigned int);
+select @@session.progress_report_time;
+
+SET @@global.progress_report_time = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/query_cache_strip_comments_basic.test b/mysql-test/suite/sys_vars/t/query_cache_strip_comments_basic.test
new file mode 100644
index 00000000000..9a060bc9a0a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/query_cache_strip_comments_basic.test
@@ -0,0 +1,38 @@
+# bool global
+
+SET @start_global_value = @@global.query_cache_strip_comments;
+
+#
+# exists as global only
+#
+select @@global.query_cache_strip_comments;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.query_cache_strip_comments;
+show global variables like 'query_cache_strip_comments';
+show session variables like 'query_cache_strip_comments';
+select * from information_schema.global_variables where variable_name='query_cache_strip_comments';
+select * from information_schema.session_variables where variable_name='query_cache_strip_comments';
+
+#
+# show that it's writable
+#
+set global query_cache_strip_comments=ON;
+select @@global.query_cache_strip_comments;
+set global query_cache_strip_comments=OFF;
+select @@global.query_cache_strip_comments;
+set global query_cache_strip_comments=1;
+select @@global.query_cache_strip_comments;
+--error ER_GLOBAL_VARIABLE
+set session query_cache_strip_comments=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global query_cache_strip_comments=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global query_cache_strip_comments=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global query_cache_strip_comments="foo";
+
+SET @@global.query_cache_strip_comments = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/replicate_annotate_rows_events_basic.test b/mysql-test/suite/sys_vars/t/replicate_annotate_rows_events_basic.test
new file mode 100644
index 00000000000..535f83da7ea
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/replicate_annotate_rows_events_basic.test
@@ -0,0 +1,21 @@
+# bool readonly
+
+#
+# show values;
+#
+select @@global.replicate_annotate_rows_events;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.replicate_annotate_rows_events;
+show global variables like 'replicate_annotate_rows_events';
+show session variables like 'replicate_annotate_rows_events';
+select * from information_schema.global_variables where variable_name='replicate_annotate_rows_events';
+select * from information_schema.session_variables where variable_name='replicate_annotate_rows_events';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global replicate_annotate_rows_events=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session replicate_annotate_rows_events=1;
+
diff --git a/mysql-test/suite/sys_vars/t/thread_alarm_basic.test b/mysql-test/suite/sys_vars/t/thread_alarm_basic.test
new file mode 100644
index 00000000000..56bdc3d765b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_alarm_basic.test
@@ -0,0 +1,21 @@
+# bool readonly
+
+#
+# show values;
+#
+select @@global.thread_alarm;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.thread_alarm;
+show global variables like 'thread_alarm';
+show session variables like 'thread_alarm';
+select * from information_schema.global_variables where variable_name='thread_alarm';
+select * from information_schema.session_variables where variable_name='thread_alarm';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global thread_alarm=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session thread_alarm=1;
+
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 20090d0f313..d9143e43e42 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -6287,7 +6287,6 @@ struct my_option my_long_options[]=
{"log", 'l', "Log connections and queries to file (deprecated option, use "
"--general-log/--general-log-file instead).", &opt_logname, &opt_logname,
0, GET_STR_ALLOC, OPT_ARG, 0, 0, 0, 0, 0, 0},
-#if 0
{"log-basename", OPT_LOG_BASENAME,
"Basename for all log files and the .pid file. This sets all log file "
"names at once (in 'datadir') and is normally the only option you need "
@@ -6296,7 +6295,6 @@ struct my_option my_long_options[]=
"--log-slow-query-log-file, --log-error-file, and --pid-file",
&opt_log_basename, &opt_log_basename, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
-#endif
{"log-bin", OPT_BIN_LOG,
"Log update queries in binary format. Optional argument should be name for "
"binary log. If not given "
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index bb6a130cf5a..88a1b2f6da6 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -3385,6 +3385,7 @@ static Sys_var_mybool Sys_thread_alarm(
READ_ONLY GLOBAL_VAR(opt_thread_alarm), CMD_LINE(OPT_ARG),
DEFAULT(TRUE));
+#if 0
static Sys_var_charptr Sys_log_basename(
"log_basename",
"Basename for all log files and the .pid file. This sets all log file "
@@ -3397,6 +3398,7 @@ static Sys_var_charptr Sys_log_basename(
READ_ONLY GLOBAL_VAR(opt_log_basename),
CMD_LINE(REQUIRED_ARG, OPT_LOG_BASENAME),
IN_FS_CHARSET, DEFAULT(0));
+#endif
static Sys_var_mybool Sys_query_cache_strip_comments(
"query_cache_strip_comments",