summaryrefslogtreecommitdiff
path: root/mysql-test/r/variables.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/variables.result')
-rw-r--r--mysql-test/r/variables.result199
1 files changed, 175 insertions, 24 deletions
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 60010183d32..6927f07da6b 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -9,12 +9,11 @@ set @my_key_buffer_size =@@global.key_buffer_size;
set @my_max_binlog_cache_size =@@global.max_binlog_cache_size;
set @my_max_binlog_size =@@global.max_binlog_size;
set @my_max_connect_errors =@@global.max_connect_errors;
+set @my_max_connections =@@global.max_connections;
set @my_max_delayed_threads =@@global.max_delayed_threads;
set @my_max_heap_table_size =@@global.max_heap_table_size;
set @my_max_insert_delayed_threads=@@global.max_insert_delayed_threads;
set @my_max_join_size =@@global.max_join_size;
-set @my_max_user_connections =@@global.max_user_connections;
-set @my_max_write_lock_count =@@global.max_write_lock_count;
set @my_myisam_data_pointer_size =@@global.myisam_data_pointer_size;
set @my_net_buffer_length =@@global.net_buffer_length;
set @my_net_write_timeout =@@global.net_write_timeout;
@@ -72,8 +71,8 @@ select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3;
@t1:=(@t2:=1)+@t3:=4 @t1 @t2 @t3
5 5 1 4
explain extended select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select (@t1:=((@t2:=1) + (@t3:=4))) AS `@t1:=(@t2:=1)+@t3:=4`,(@t1) AS `@t1`,(@t2) AS `@t2`,(@t3) AS `@t3`
select @t5;
@@ -103,21 +102,36 @@ set max_join_size=100;
show variables like 'max_join_size';
Variable_name Value
max_join_size 100
+select * from information_schema.session_variables where variable_name like 'max_join_size';
+VARIABLE_NAME VARIABLE_VALUE
+MAX_JOIN_SIZE 100
show global variables like 'max_join_size';
Variable_name Value
max_join_size 10
+select * from information_schema.global_variables where variable_name like 'max_join_size';
+VARIABLE_NAME VARIABLE_VALUE
+MAX_JOIN_SIZE 10
set GLOBAL max_join_size=2000;
show global variables like 'max_join_size';
Variable_name Value
max_join_size 2000
+select * from information_schema.global_variables where variable_name like 'max_join_size';
+VARIABLE_NAME VARIABLE_VALUE
+MAX_JOIN_SIZE 2000
set max_join_size=DEFAULT;
show variables like 'max_join_size';
Variable_name Value
max_join_size 2000
+select * from information_schema.session_variables where variable_name like 'max_join_size';
+VARIABLE_NAME VARIABLE_VALUE
+MAX_JOIN_SIZE 2000
set GLOBAL max_join_size=DEFAULT;
show global variables like 'max_join_size';
Variable_name Value
max_join_size HA_POS_ERROR
+select * from information_schema.global_variables where variable_name like 'max_join_size';
+VARIABLE_NAME VARIABLE_VALUE
+MAX_JOIN_SIZE HA_POS_ERROR
set @@max_join_size=1000, @@global.max_join_size=2000;
select @@local.max_join_size, @@global.max_join_size;
@@local.max_join_size @@global.max_join_size
@@ -132,16 +146,16 @@ select last_insert_id(345);
last_insert_id(345)
345
explain extended select last_insert_id(345);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select last_insert_id(345) AS `last_insert_id(345)`
select @@IDENTITY,last_insert_id(), @@identity;
@@IDENTITY last_insert_id() @@identity
345 345 345
explain extended select @@IDENTITY,last_insert_id(), @@identity;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select 345 AS `@@IDENTITY`,last_insert_id() AS `last_insert_id()`,345 AS `@@identity`
set big_tables=OFF, big_tables=ON, big_tables=0, big_tables=1, big_tables="OFF", big_tables="ON";
@@ -149,14 +163,23 @@ set global concurrent_insert=2;
show variables like 'concurrent_insert';
Variable_name Value
concurrent_insert 2
+select * from information_schema.session_variables where variable_name like 'concurrent_insert';
+VARIABLE_NAME VARIABLE_VALUE
+CONCURRENT_INSERT 2
set global concurrent_insert=1;
show variables like 'concurrent_insert';
Variable_name Value
concurrent_insert 1
+select * from information_schema.session_variables where variable_name like 'concurrent_insert';
+VARIABLE_NAME VARIABLE_VALUE
+CONCURRENT_INSERT 1
set global concurrent_insert=0;
show variables like 'concurrent_insert';
Variable_name Value
concurrent_insert 0
+select * from information_schema.session_variables where variable_name like 'concurrent_insert';
+VARIABLE_NAME VARIABLE_VALUE
+CONCURRENT_INSERT 0
set global concurrent_insert=DEFAULT;
select @@concurrent_insert;
@@concurrent_insert
@@ -165,26 +188,44 @@ set global timed_mutexes=ON;
show variables like 'timed_mutexes';
Variable_name Value
timed_mutexes ON
+select * from information_schema.session_variables where variable_name like 'timed_mutexes';
+VARIABLE_NAME VARIABLE_VALUE
+TIMED_MUTEXES ON
set global timed_mutexes=0;
show variables like 'timed_mutexes';
Variable_name Value
timed_mutexes OFF
+select * from information_schema.session_variables where variable_name like 'timed_mutexes';
+VARIABLE_NAME VARIABLE_VALUE
+TIMED_MUTEXES OFF
set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="MERGE";
show local variables like 'storage_engine';
Variable_name Value
storage_engine MEMORY
+select * from information_schema.session_variables where variable_name like 'storage_engine';
+VARIABLE_NAME VARIABLE_VALUE
+STORAGE_ENGINE MEMORY
show global variables like 'storage_engine';
Variable_name Value
storage_engine MRG_MYISAM
+select * from information_schema.global_variables where variable_name like 'storage_engine';
+VARIABLE_NAME VARIABLE_VALUE
+STORAGE_ENGINE MRG_MYISAM
set GLOBAL query_cache_size=100000;
set GLOBAL myisam_max_sort_file_size=2000000;
show global variables like 'myisam_max_sort_file_size';
Variable_name Value
myisam_max_sort_file_size 1048576
+select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_MAX_SORT_FILE_SIZE 1048576
set GLOBAL myisam_max_sort_file_size=default;
show variables like 'myisam_max_sort_file_size';
Variable_name Value
myisam_max_sort_file_size FILE_SIZE
+select * from information_schema.session_variables where variable_name like 'myisam_max_sort_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_MAX_SORT_FILE_SIZE FILE_SIZE
set global net_retry_count=10, session net_retry_count=10;
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600;
@@ -194,12 +235,24 @@ net_buffer_length 1024
net_read_timeout 300
net_retry_count 10
net_write_timeout 200
+select * from information_schema.global_variables where variable_name like 'net_%';
+VARIABLE_NAME VARIABLE_VALUE
+NET_BUFFER_LENGTH 1024
+NET_READ_TIMEOUT 300
+NET_RETRY_COUNT 10
+NET_WRITE_TIMEOUT 200
show session variables like 'net_%';
Variable_name Value
net_buffer_length 2048
net_read_timeout 600
net_retry_count 10
net_write_timeout 500
+select * from information_schema.session_variables where variable_name like 'net_%';
+VARIABLE_NAME VARIABLE_VALUE
+NET_BUFFER_LENGTH 2048
+NET_READ_TIMEOUT 600
+NET_RETRY_COUNT 10
+NET_WRITE_TIMEOUT 500
set session net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000;
show global variables like 'net_%';
Variable_name Value
@@ -207,24 +260,45 @@ net_buffer_length 1024
net_read_timeout 900
net_retry_count 10
net_write_timeout 1000
+select * from information_schema.global_variables where variable_name like 'net_%';
+VARIABLE_NAME VARIABLE_VALUE
+NET_BUFFER_LENGTH 1024
+NET_READ_TIMEOUT 900
+NET_RETRY_COUNT 10
+NET_WRITE_TIMEOUT 1000
show session variables like 'net_%';
Variable_name Value
net_buffer_length 7168
net_read_timeout 600
net_retry_count 10
net_write_timeout 500
+select * from information_schema.session_variables where variable_name like 'net_%';
+VARIABLE_NAME VARIABLE_VALUE
+NET_BUFFER_LENGTH 7168
+NET_READ_TIMEOUT 600
+NET_RETRY_COUNT 10
+NET_WRITE_TIMEOUT 500
set net_buffer_length=1;
show variables like 'net_buffer_length';
Variable_name Value
net_buffer_length 1024
+select * from information_schema.session_variables where variable_name like 'net_buffer_length';
+VARIABLE_NAME VARIABLE_VALUE
+NET_BUFFER_LENGTH 1024
set net_buffer_length=2000000000;
show variables like 'net_buffer_length';
Variable_name Value
net_buffer_length 1048576
+select * from information_schema.session_variables where variable_name like 'net_buffer_length';
+VARIABLE_NAME VARIABLE_VALUE
+NET_BUFFER_LENGTH 1048576
set character set cp1251_koi8;
show variables like "character_set_client";
Variable_name Value
character_set_client cp1251
+select * from information_schema.session_variables where variable_name like 'character_set_client';
+VARIABLE_NAME VARIABLE_VALUE
+CHARACTER_SET_CLIENT cp1251
select @@timestamp>0;
@@timestamp>0
1
@@ -239,6 +313,13 @@ query_prealloc_size 8192
range_alloc_block_size 2048
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
+select * from information_schema.session_variables where variable_name like '%alloc%';
+VARIABLE_NAME VARIABLE_VALUE
+QUERY_ALLOC_BLOCK_SIZE 8192
+QUERY_PREALLOC_SIZE 8192
+RANGE_ALLOC_BLOCK_SIZE 2048
+TRANSACTION_ALLOC_BLOCK_SIZE 8192
+TRANSACTION_PREALLOC_SIZE 4096
set @@range_alloc_block_size=1024*16;
set @@query_alloc_block_size=1024*17+2;
set @@query_prealloc_size=1024*18;
@@ -254,6 +335,13 @@ query_prealloc_size 18432
range_alloc_block_size 16384
transaction_alloc_block_size 19456
transaction_prealloc_size 20480
+select * from information_schema.session_variables where variable_name like '%alloc%';
+VARIABLE_NAME VARIABLE_VALUE
+QUERY_ALLOC_BLOCK_SIZE 17408
+QUERY_PREALLOC_SIZE 18432
+RANGE_ALLOC_BLOCK_SIZE 16384
+TRANSACTION_ALLOC_BLOCK_SIZE 19456
+TRANSACTION_PREALLOC_SIZE 20480
set @@range_alloc_block_size=default;
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
@@ -264,6 +352,13 @@ query_prealloc_size 8192
range_alloc_block_size 2048
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
+select * from information_schema.session_variables where variable_name like '%alloc%';
+VARIABLE_NAME VARIABLE_VALUE
+QUERY_ALLOC_BLOCK_SIZE 8192
+QUERY_PREALLOC_SIZE 8192
+RANGE_ALLOC_BLOCK_SIZE 2048
+TRANSACTION_ALLOC_BLOCK_SIZE 8192
+TRANSACTION_PREALLOC_SIZE 4096
SELECT @@version LIKE 'non-existent';
@@version LIKE 'non-existent'
0
@@ -413,7 +508,7 @@ set sql_safe_updates=1;
set sql_select_limit=1;
set sql_select_limit=default;
set sql_warnings=1;
-set global table_cache=100;
+set global table_open_cache=100;
set storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
@@ -485,6 +580,9 @@ set global myisam_max_sort_file_size=4294967296;
show global variables like 'myisam_max_sort_file_size';
Variable_name Value
myisam_max_sort_file_size MAX_FILE_SIZE
+select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_MAX_SORT_FILE_SIZE MAX_FILE_SIZE
set global myisam_max_sort_file_size=default;
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@local.max_join_size
@@ -524,18 +622,30 @@ set @tstlw = @@log_warnings;
show global variables like 'log_warnings';
Variable_name Value
log_warnings 1
+select * from information_schema.global_variables where variable_name like 'log_warnings';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_WARNINGS 1
set global log_warnings = 0;
show global variables like 'log_warnings';
Variable_name Value
log_warnings 0
+select * from information_schema.global_variables where variable_name like 'log_warnings';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_WARNINGS 0
set global log_warnings = 42;
show global variables like 'log_warnings';
Variable_name Value
log_warnings 42
+select * from information_schema.global_variables where variable_name like 'log_warnings';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_WARNINGS 42
set global log_warnings = @tstlw;
show global variables like 'log_warnings';
Variable_name Value
log_warnings 1
+select * from information_schema.global_variables where variable_name like 'log_warnings';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_WARNINGS 1
create table t1 (
c1 tinyint,
c2 smallint,
@@ -545,11 +655,11 @@ c5 bigint);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` tinyint(4) default NULL,
- `c2` smallint(6) default NULL,
- `c3` mediumint(9) default NULL,
- `c4` int(11) default NULL,
- `c5` bigint(20) default NULL
+ `c1` tinyint(4) DEFAULT NULL,
+ `c2` smallint(6) DEFAULT NULL,
+ `c3` mediumint(9) DEFAULT NULL,
+ `c4` int(11) DEFAULT NULL,
+ `c5` bigint(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
set @arg00= 8, @arg01= 8.8, @arg02= 'a string', @arg03= 0.2e0;
@@ -557,21 +667,27 @@ create table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` bigint(20) default NULL,
- `c2` decimal(65,30) default NULL,
+ `c1` bigint(20) DEFAULT NULL,
+ `c2` decimal(65,30) DEFAULT NULL,
`c3` longtext,
- `c4` double default NULL
+ `c4` double DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
SET GLOBAL MYISAM_DATA_POINTER_SIZE= 7;
SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE';
Variable_name Value
myisam_data_pointer_size 7
-SET GLOBAL table_cache=-1;
-SHOW VARIABLES LIKE 'table_cache';
-Variable_name Value
-table_cache 1
-SET GLOBAL table_cache=DEFAULT;
+SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'MYISAM_DATA_POINTER_SIZE';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_DATA_POINTER_SIZE 7
+SET GLOBAL table_open_cache=-1;
+SHOW VARIABLES LIKE 'table_open_cache';
+Variable_name Value
+table_open_cache 1
+SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
+VARIABLE_NAME VARIABLE_VALUE
+TABLE_OPEN_CACHE 1
+SET GLOBAL table_open_cache=DEFAULT;
set character_set_results=NULL;
select ifnull(@@character_set_results,"really null");
ifnull(@@character_set_results,"really null")
@@ -696,21 +812,36 @@ set @@sql_big_selects = 1;
show variables like 'sql_big_selects';
Variable_name Value
sql_big_selects ON
+select * from information_schema.session_variables where variable_name like 'sql_big_selects';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_BIG_SELECTS ON
set @@sql_big_selects = @old_sql_big_selects;
set @@sql_notes = 0, @@sql_warnings = 0;
show variables like 'sql_notes';
Variable_name Value
sql_notes OFF
+select * from information_schema.session_variables where variable_name like 'sql_notes';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_NOTES OFF
show variables like 'sql_warnings';
Variable_name Value
sql_warnings OFF
+select * from information_schema.session_variables where variable_name like 'sql_warnings';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_WARNINGS OFF
set @@sql_notes = 1, @@sql_warnings = 1;
show variables like 'sql_notes';
Variable_name Value
sql_notes ON
+select * from information_schema.session_variables where variable_name like 'sql_notes';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_NOTES ON
show variables like 'sql_warnings';
Variable_name Value
sql_warnings ON
+select * from information_schema.session_variables where variable_name like 'sql_warnings';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_WARNINGS ON
select @@system_time_zone;
@@system_time_zone
#
@@ -724,12 +855,21 @@ select @@basedir, @@datadir, @@tmpdir;
show variables like 'basedir';
Variable_name Value
basedir #
+select * from information_schema.session_variables where variable_name like 'basedir';
+VARIABLE_NAME VARIABLE_VALUE
+BASEDIR #
show variables like 'datadir';
Variable_name Value
datadir #
+select * from information_schema.session_variables where variable_name like 'datadir';
+VARIABLE_NAME VARIABLE_VALUE
+DATADIR #
show variables like 'tmpdir';
Variable_name Value
tmpdir #
+select * from information_schema.session_variables where variable_name like 'tmpdir';
+VARIABLE_NAME VARIABLE_VALUE
+TMPDIR #
select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key;
@@ssl_ca @@ssl_capath @@ssl_cert @@ssl_cipher @@ssl_key
# # # # #
@@ -740,12 +880,22 @@ ssl_capath #
ssl_cert #
ssl_cipher #
ssl_key #
+select * from information_schema.session_variables where variable_name like 'ssl%';
+VARIABLE_NAME VARIABLE_VALUE
+SSL_CA #
+SSL_CAPATH #
+SSL_CERT #
+SSL_CIPHER #
+SSL_KEY #
select @@log_queries_not_using_indexes;
@@log_queries_not_using_indexes
0
show variables like 'log_queries_not_using_indexes';
Variable_name Value
log_queries_not_using_indexes OFF
+select * from information_schema.session_variables where variable_name like 'log_queries_not_using_indexes';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_QUERIES_NOT_USING_INDEXES OFF
select @@"";
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '""' at line 1
select @@&;
@@ -771,12 +921,13 @@ set global key_buffer_size =@my_key_buffer_size;
set global max_binlog_cache_size =default;
set global max_binlog_size =@my_max_binlog_size;
set global max_connect_errors =@my_max_connect_errors;
+set global max_connections =@my_max_connections;
set global max_delayed_threads =@my_max_delayed_threads;
set global max_heap_table_size =@my_max_heap_table_size;
set global max_insert_delayed_threads=@my_max_insert_delayed_threads;
set global max_join_size =@my_max_join_size;
-set global max_user_connections =@my_max_user_connections;
-set global max_write_lock_count =@my_max_write_lock_count;
+set global max_user_connections =default;
+set global max_write_lock_count =default;
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
set global net_buffer_length =@my_net_buffer_length;
set global net_write_timeout =@my_net_write_timeout;