diff options
author | Michael Widenius <monty@mariadb.org> | 2018-03-09 14:05:35 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-03-29 13:59:44 +0300 |
commit | a7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch) | |
tree | 70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/variables-notembedded.test | |
parent | ab1941266c59a19703a74b5593cf3f508a5752d7 (diff) | |
download | mariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz |
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/variables-notembedded.test')
-rw-r--r-- | mysql-test/main/variables-notembedded.test | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/mysql-test/main/variables-notembedded.test b/mysql-test/main/variables-notembedded.test new file mode 100644 index 00000000000..2aa77e1e254 --- /dev/null +++ b/mysql-test/main/variables-notembedded.test @@ -0,0 +1,177 @@ +# Tests that variables work correctly (setting and showing). This +# test is like the main.variables test, but for variables not +# available in embedded mode. + +source include/not_embedded.inc; + +--echo ---- Init ---- +# Backup global variables so they can be restored at end of test. +set @my_slave_net_timeout =@@global.slave_net_timeout; + +--echo ---- Test ---- +set global slave_net_timeout=100; +set global sql_slave_skip_counter=100; + +# End of 4.1 tests + +# BUG #7800: Add various-slave related variables to SHOW VARIABLES +show variables like 'slave_compressed_protocol'; +--replace_column 2 SLAVE_LOAD_TMPDIR +show variables like 'slave_load_tmpdir'; +# We just set some arbitrary values in variables-master.opt so we can test +# that a list of values works correctly +show variables like 'slave_skip_errors'; + +--echo ---- Clean Up ---- + +set global slave_net_timeout=default; +# sql_slave_skip_counter is write-only, so we can't save previous +# value and restore it here. That's ok, because it's normally 0. +set global sql_slave_skip_counter= 0; +set @@global.slave_net_timeout= @my_slave_net_timeout; + +# +# Bug#28234 - global/session scope - documentation vs implementation +# +--echo +# +# Additional variables fixed from sql_repl.cc. +# +--echo # +SHOW VARIABLES like 'log_slave_updates'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.log_slave_updates; +SELECT @@global.log_slave_updates; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.log_slave_updates= true; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.log_slave_updates= true; +# +--echo # +SHOW VARIABLES like 'relay_log'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.relay_log; +SELECT @@global.relay_log; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.relay_log= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.relay_log= 'x'; +# +--echo # +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW VARIABLES like 'relay_log_basename'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.relay_log_basename; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SELECT @@global.relay_log_basename; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.relay_log_basename= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.relay_log_basename= 'x'; +# +--echo # +SHOW VARIABLES like 'log_bin_basename'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.log_bin_basename; +SELECT @@global.log_bin_basename; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.log_bin_basename= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.log_bin_basename= 'x'; +# +--echo # +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW VARIABLES like 'relay_log_index'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.relay_log_index; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SELECT @@global.relay_log_index; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.relay_log_index= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.relay_log_index= 'x'; +# +--echo # +SHOW VARIABLES like 'log_bin_index'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.log_bin_index; +SELECT @@global.log_bin_index; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.log_bin_index= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.log_bin_index= 'x'; +# +--echo # +SHOW VARIABLES like 'relay_log_info_file'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.relay_log_info_file; +SELECT @@global.relay_log_info_file; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.relay_log_info_file= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.relay_log_info_file= 'x'; +# +--echo # +SHOW VARIABLES like 'relay_log_space_limit'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.relay_log_space_limit; +SELECT @@global.relay_log_space_limit; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.relay_log_space_limit= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.relay_log_space_limit= 7; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'slave_load_tmpdir'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.slave_load_tmpdir; +--replace_column 1 # +SELECT @@global.slave_load_tmpdir; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.slave_load_tmpdir= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.slave_load_tmpdir= 'x'; +# +--echo # +SHOW VARIABLES like 'slave_skip_errors'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.slave_skip_errors; +SELECT @@global.slave_skip_errors; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.slave_skip_errors= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.slave_skip_errors= 7; +# + +--echo # +--echo # Bug #11766769 : 59959: SMALL VALUES OF --MAX-ALLOWED-PACKET +--echo # ARE NOT BEING HONORED +--echo # + +CREATE TABLE t1 (a MEDIUMTEXT); + +SET GLOBAL max_allowed_packet=2048; +SET GLOBAL net_buffer_length=4096; +CONNECT (con1,localhost,root,,test); +SHOW SESSION VARIABLES LIKE 'max_allowed_packet'; +SHOW SESSION VARIABLES LIKE 'net_buffer_length'; +--disable_query_log +#Sending a packet that is too big can result in either +#ER_NET_PACKET_TOO_LARGE or a socket error on the client side (2013= CR_SERVER_LOST) +#The server does not make any attempts to gracefully close client connection and ensuring +#client fully read the last packet. Server just closes the socket after it has send. +#Client thus can get either a socket error, or EOF, or an error packet with ER_NET_PACKET_TOO_LARGE +--error ER_NET_PACKET_TOO_LARGE,2013 +INSERT INTO t1 VALUES ('123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'); +--enable_query_log + +CONNECTION default; +DISCONNECT con1; +SELECT LENGTH(a) FROM t1; + +SET GLOBAL max_allowed_packet=default; +SET GLOBAL net_buffer_length=default; +DROP TABLE t1; + +--echo End of 5.1 tests |