/mysql-test/r/variables.result
Unknown | 1778 lines | 1733 code | 45 blank | 0 comment | 0 complexity | 8a9382881098aa11363879234512a695 MD5 | raw file
1drop table if exists t1,t2; 2set @my_binlog_cache_size =@@global.binlog_cache_size; 3set @my_connect_timeout =@@global.connect_timeout; 4set @my_delayed_insert_timeout =@@global.delayed_insert_timeout; 5set @my_delayed_queue_size =@@global.delayed_queue_size; 6set @my_flush =@@global.flush; 7set @my_flush_time =@@global.flush_time; 8set @my_key_buffer_size =@@global.key_buffer_size; 9set @my_max_binlog_cache_size =@@global.max_binlog_cache_size; 10set @my_max_binlog_size =@@global.max_binlog_size; 11set @my_max_connect_errors =@@global.max_connect_errors; 12set @my_max_connections =@@global.max_connections; 13set @my_max_delayed_threads =@@global.max_delayed_threads; 14set @my_max_heap_table_size =@@global.max_heap_table_size; 15set @my_max_insert_delayed_threads=@@global.max_insert_delayed_threads; 16set @my_max_join_size =@@global.max_join_size; 17set @my_myisam_data_pointer_size =@@global.myisam_data_pointer_size; 18set @my_myisam_max_sort_file_size =@@global.myisam_max_sort_file_size; 19set @my_net_buffer_length =@@global.net_buffer_length; 20set @my_net_write_timeout =@@global.net_write_timeout; 21set @my_net_read_timeout =@@global.net_read_timeout; 22set @my_query_cache_limit =@@global.query_cache_limit; 23set @my_query_cache_type =@@global.query_cache_type; 24set @my_rpl_recovery_rank =@@global.rpl_recovery_rank; 25set @my_server_id =@@global.server_id; 26set @my_slow_launch_time =@@global.slow_launch_time; 27set @my_storage_engine =@@global.default_storage_engine; 28set @my_thread_cache_size =@@global.thread_cache_size; 29set @my_max_allowed_packet =@@global.max_allowed_packet; 30set @my_join_buffer_size =@@global.join_buffer_size; 31set @`test`=1; 32select @test, @`test`, @TEST, @`TEST`, @"teSt"; 33@test @`test` @TEST @`TEST` @"teSt" 341 1 1 1 1 35set @TEST=2; 36select @test, @`test`, @TEST, @`TEST`, @"teSt"; 37@test @`test` @TEST @`TEST` @"teSt" 382 2 2 2 2 39set @"tEST"=3; 40select @test, @`test`, @TEST, @`TEST`, @"teSt"; 41@test @`test` @TEST @`TEST` @"teSt" 423 3 3 3 3 43set @`TeST`=4; 44select @test, @`test`, @TEST, @`TEST`, @"teSt"; 45@test @`test` @TEST @`TEST` @"teSt" 464 4 4 4 4 47select @`teST`:=5; 48@`teST`:=5 495 50select @test, @`test`, @TEST, @`TEST`, @"teSt"; 51@test @`test` @TEST @`TEST` @"teSt" 525 5 5 5 5 53set @select=2,@t5=1.23456; 54select @`select`,@not_used; 55@`select` @not_used 562 NULL 57set @test_int=10,@test_double=1e-10,@test_string="abcdeghi",@test_string2="abcdefghij",@select=NULL; 58select @test_int,@test_double,@test_string,@test_string2,@select; 59@test_int @test_double @test_string @test_string2 @select 6010 0.0000000001 abcdeghi abcdefghij NULL 61set @test_int="hello",@test_double="hello",@test_string="hello",@test_string2="hello"; 62select @test_int,@test_double,@test_string,@test_string2; 63@test_int @test_double @test_string @test_string2 64hello hello hello hello 65set @test_int="hellohello",@test_double="hellohello",@test_string="hellohello",@test_string2="hellohello"; 66select @test_int,@test_double,@test_string,@test_string2; 67@test_int @test_double @test_string @test_string2 68hellohello hellohello hellohello hellohello 69set @test_int=null,@test_double=null,@test_string=null,@test_string2=null; 70select @test_int,@test_double,@test_string,@test_string2; 71@test_int @test_double @test_string @test_string2 72NULL NULL NULL NULL 73select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3; 74@t1:=(@t2:=1)+@t3:=4 @t1 @t2 @t3 755 5 1 4 76explain extended select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3; 77id select_type table type possible_keys key key_len ref rows filtered Extra 781 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used 79Warnings: 80Note 1003 select (@t1:=((@t2:=1) + (@t3:=4))) AS `@t1:=(@t2:=1)+@t3:=4`,(@t1) AS `@t1`,(@t2) AS `@t2`,(@t3) AS `@t3` 81select @t5; 82@t5 831.23456 84CREATE TABLE t1 (c_id INT(4) NOT NULL, c_name CHAR(20), c_country CHAR(3), PRIMARY KEY(c_id)); 85INSERT INTO t1 VALUES (1,'Bozo','USA'),(2,'Ronald','USA'),(3,'Kinko','IRE'),(4,'Mr. Floppy','GB'); 86SELECT @min_cid:=min(c_id), @max_cid:=max(c_id) from t1; 87@min_cid:=min(c_id) @max_cid:=max(c_id) 881 4 89SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid; 90c_id c_name c_country 911 Bozo USA 924 Mr. Floppy GB 93SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid OR c_id=666; 94c_id c_name c_country 951 Bozo USA 964 Mr. Floppy GB 97ALTER TABLE t1 DROP PRIMARY KEY; 98select * from t1 where c_id=@min_cid OR c_id=@max_cid; 99c_id c_name c_country 1001 Bozo USA 1014 Mr. Floppy GB 102drop table t1; 103set GLOBAL max_join_size=10; 104set max_join_size=100; 105show variables like 'max_join_size'; 106Variable_name Value 107max_join_size 100 108select * from information_schema.session_variables where variable_name like 'max_join_size'; 109VARIABLE_NAME VARIABLE_VALUE 110MAX_JOIN_SIZE 100 111show global variables like 'max_join_size'; 112Variable_name Value 113max_join_size 10 114select * from information_schema.global_variables where variable_name like 'max_join_size'; 115VARIABLE_NAME VARIABLE_VALUE 116MAX_JOIN_SIZE 10 117set GLOBAL max_join_size=2000; 118show global variables like 'max_join_size'; 119Variable_name Value 120max_join_size 2000 121select * from information_schema.global_variables where variable_name like 'max_join_size'; 122VARIABLE_NAME VARIABLE_VALUE 123MAX_JOIN_SIZE 2000 124set max_join_size=DEFAULT; 125show variables like 'max_join_size'; 126Variable_name Value 127max_join_size 2000 128select * from information_schema.session_variables where variable_name like 'max_join_size'; 129VARIABLE_NAME VARIABLE_VALUE 130MAX_JOIN_SIZE 2000 131set GLOBAL max_join_size=DEFAULT; 132show global variables like 'max_join_size'; 133Variable_name Value 134max_join_size HA_POS_ERROR 135select * from information_schema.global_variables where variable_name like 'max_join_size'; 136VARIABLE_NAME VARIABLE_VALUE 137MAX_JOIN_SIZE HA_POS_ERROR 138set @@max_join_size=1000, @@global.max_join_size=2000; 139select @@local.max_join_size, @@global.max_join_size; 140@@local.max_join_size @@global.max_join_size 1411000 2000 142select @@identity, length(@@version)>0; 143@@identity length(@@version)>0 1440 1 145select @@VERSION=version(); 146@@VERSION=version() 1471 148select last_insert_id(345); 149last_insert_id(345) 150345 151explain extended select last_insert_id(345); 152id select_type table type possible_keys key key_len ref rows filtered Extra 1531 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used 154Warnings: 155Note 1003 select last_insert_id(345) AS `last_insert_id(345)` 156select @@IDENTITY,last_insert_id(), @@identity; 157@@IDENTITY last_insert_id() @@identity 158345 345 345 159explain extended select @@IDENTITY,last_insert_id(), @@identity; 160id select_type table type possible_keys key key_len ref rows filtered Extra 1611 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used 162Warnings: 163Note 1003 select @@IDENTITY AS `@@IDENTITY`,last_insert_id() AS `last_insert_id()`,@@identity AS `@@identity` 164set big_tables=OFF, big_tables=ON, big_tables=0, big_tables=1, big_tables="OFF", big_tables="ON"; 165set global concurrent_insert=2; 166show variables like 'concurrent_insert'; 167Variable_name Value 168concurrent_insert ALWAYS 169select * from information_schema.session_variables where variable_name like 'concurrent_insert'; 170VARIABLE_NAME VARIABLE_VALUE 171CONCURRENT_INSERT ALWAYS 172set global concurrent_insert=1; 173show variables like 'concurrent_insert'; 174Variable_name Value 175concurrent_insert AUTO 176select * from information_schema.session_variables where variable_name like 'concurrent_insert'; 177VARIABLE_NAME VARIABLE_VALUE 178CONCURRENT_INSERT AUTO 179set global concurrent_insert=0; 180show variables like 'concurrent_insert'; 181Variable_name Value 182concurrent_insert NEVER 183select * from information_schema.session_variables where variable_name like 'concurrent_insert'; 184VARIABLE_NAME VARIABLE_VALUE 185CONCURRENT_INSERT NEVER 186set global concurrent_insert=DEFAULT; 187select @@concurrent_insert; 188@@concurrent_insert 189AUTO 190set global timed_mutexes=ON; 191show variables like 'timed_mutexes'; 192Variable_name Value 193timed_mutexes ON 194select * from information_schema.session_variables where variable_name like 'timed_mutexes'; 195VARIABLE_NAME VARIABLE_VALUE 196TIMED_MUTEXES ON 197set global timed_mutexes=0; 198show variables like 'timed_mutexes'; 199Variable_name Value 200timed_mutexes OFF 201select * from information_schema.session_variables where variable_name like 'timed_mutexes'; 202VARIABLE_NAME VARIABLE_VALUE 203TIMED_MUTEXES OFF 204set default_storage_engine=MYISAM, default_storage_engine="HEAP", global default_storage_engine="MERGE"; 205show local variables like 'default_storage_engine'; 206Variable_name Value 207default_storage_engine MEMORY 208select * from information_schema.session_variables where variable_name like 'default_storage_engine'; 209VARIABLE_NAME VARIABLE_VALUE 210DEFAULT_STORAGE_ENGINE MEMORY 211show global variables like 'default_storage_engine'; 212Variable_name Value 213default_storage_engine MRG_MYISAM 214select * from information_schema.global_variables where variable_name like 'default_storage_engine'; 215VARIABLE_NAME VARIABLE_VALUE 216DEFAULT_STORAGE_ENGINE MRG_MYISAM 217set GLOBAL query_cache_size=102400; 218set GLOBAL myisam_max_sort_file_size=2000000; 219Warnings: 220Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '2000000' 221show global variables like 'myisam_max_sort_file_size'; 222Variable_name Value 223myisam_max_sort_file_size 1048576 224select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size'; 225VARIABLE_NAME VARIABLE_VALUE 226MYISAM_MAX_SORT_FILE_SIZE 1048576 227set GLOBAL myisam_max_sort_file_size=default; 228show global variables like 'myisam_max_sort_file_size'; 229Variable_name Value 230myisam_max_sort_file_size FILE_SIZE 231select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size'; 232VARIABLE_NAME VARIABLE_VALUE 233MYISAM_MAX_SORT_FILE_SIZE FILE_SIZE 234set global net_retry_count=10, session net_retry_count=10; 235set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300; 236show global variables like 'net_%'; 237Variable_name Value 238net_buffer_length 1024 239net_read_timeout 300 240net_retry_count 10 241net_write_timeout 200 242select * from information_schema.global_variables where variable_name like 'net_%' order by 1; 243VARIABLE_NAME VARIABLE_VALUE 244NET_BUFFER_LENGTH 1024 245NET_READ_TIMEOUT 300 246NET_RETRY_COUNT 10 247NET_WRITE_TIMEOUT 200 248show session variables like 'net_%'; 249Variable_name Value 250net_buffer_length 16384 251net_read_timeout 30 252net_retry_count 10 253net_write_timeout 60 254select * from information_schema.session_variables where variable_name like 'net_%' order by 1; 255VARIABLE_NAME VARIABLE_VALUE 256NET_BUFFER_LENGTH 16384 257NET_READ_TIMEOUT 30 258NET_RETRY_COUNT 10 259NET_WRITE_TIMEOUT 60 260set global net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000; 261Warnings: 262Warning 1292 Truncated incorrect net_buffer_length value: '8000' 263show global variables like 'net_%'; 264Variable_name Value 265net_buffer_length 7168 266net_read_timeout 900 267net_retry_count 10 268net_write_timeout 1000 269select * from information_schema.global_variables where variable_name like 'net_%' order by 1; 270VARIABLE_NAME VARIABLE_VALUE 271NET_BUFFER_LENGTH 7168 272NET_READ_TIMEOUT 900 273NET_RETRY_COUNT 10 274NET_WRITE_TIMEOUT 1000 275set global net_buffer_length=1; 276Warnings: 277Warning 1292 Truncated incorrect net_buffer_length value: '1' 278show global variables like 'net_buffer_length'; 279Variable_name Value 280net_buffer_length 1024 281select * from information_schema.global_variables where variable_name like 'net_buffer_length'; 282VARIABLE_NAME VARIABLE_VALUE 283NET_BUFFER_LENGTH 1024 284set global net_buffer_length=2000000000; 285Warnings: 286Warning 1292 Truncated incorrect net_buffer_length value: '2000000000' 287show global variables like 'net_buffer_length'; 288Variable_name Value 289net_buffer_length 1048576 290select * from information_schema.global_variables where variable_name like 'net_buffer_length'; 291VARIABLE_NAME VARIABLE_VALUE 292NET_BUFFER_LENGTH 1048576 293set character set cp1251_koi8; 294show variables like "character_set_client"; 295Variable_name Value 296character_set_client cp1251 297select * from information_schema.session_variables where variable_name like 'character_set_client'; 298VARIABLE_NAME VARIABLE_VALUE 299CHARACTER_SET_CLIENT cp1251 300select @@timestamp>0; 301@@timestamp>0 3021 303set @@rand_seed1=10000000,@@rand_seed2=1000000; 304select ROUND(RAND(),5); 305ROUND(RAND(),5) 3060.02887 307 308==+ Testing %alloc% system variables +== 309==+ NOTE: These values *must* be a multiple of 1024 +== 310==+ Other values will be rounded down to nearest multiple +== 311 312==+ Show initial values +== 313SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', 314'query_alloc_block_size', 'query_prealloc_size', 315'transaction_alloc_block_size', 'transaction_prealloc_size'); 316Variable_name Value 317query_alloc_block_size 8192 318query_prealloc_size 8192 319range_alloc_block_size 4096 320transaction_alloc_block_size 8192 321transaction_prealloc_size 4096 322==+ information_schema data +== 323SELECT * FROM information_schema.session_variables 324WHERE variable_name IN ('range_alloc_block_size', 325'query_alloc_block_size', 'query_prealloc_size', 326'transaction_alloc_block_size', 'transaction_prealloc_size') ORDER BY 1; 327VARIABLE_NAME VARIABLE_VALUE 328QUERY_ALLOC_BLOCK_SIZE 8192 329QUERY_PREALLOC_SIZE 8192 330RANGE_ALLOC_BLOCK_SIZE 4096 331TRANSACTION_ALLOC_BLOCK_SIZE 8192 332TRANSACTION_PREALLOC_SIZE 4096 333Testing values that are multiples of 1024 334set @@range_alloc_block_size=1024*15+1024; 335set @@query_alloc_block_size=1024*15+1024*2; 336set @@query_prealloc_size=1024*18-1024; 337set @@transaction_alloc_block_size=1024*21-1024*1; 338set @@transaction_prealloc_size=1024*21-2048; 339==+ Check manipulated values ==+ 340select @@query_alloc_block_size; 341@@query_alloc_block_size 34217408 343SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', 344'query_alloc_block_size', 'query_prealloc_size', 345'transaction_alloc_block_size', 'transaction_prealloc_size'); 346Variable_name Value 347query_alloc_block_size 17408 348query_prealloc_size 17408 349range_alloc_block_size 16384 350transaction_alloc_block_size 20480 351transaction_prealloc_size 19456 352==+ information_schema data +== 353SELECT * FROM information_schema.session_variables 354WHERE variable_name IN ('range_alloc_block_size', 355'query_alloc_block_size', 'query_prealloc_size', 356'transaction_alloc_block_size', 'transaction_prealloc_size') ORDER BY 1; 357VARIABLE_NAME VARIABLE_VALUE 358QUERY_ALLOC_BLOCK_SIZE 17408 359QUERY_PREALLOC_SIZE 17408 360RANGE_ALLOC_BLOCK_SIZE 16384 361TRANSACTION_ALLOC_BLOCK_SIZE 20480 362TRANSACTION_PREALLOC_SIZE 19456 363==+ Manipulate variable values +== 364Testing values that are not 1024 multiples 365set @@range_alloc_block_size=1024*16+1023; 366Warnings: 367Warning 1292 Truncated incorrect range_alloc_block_size value: '17407' 368set @@query_alloc_block_size=1024*17+2; 369Warnings: 370Warning 1292 Truncated incorrect query_alloc_block_size value: '17410' 371set @@query_prealloc_size=1024*18-1023; 372Warnings: 373Warning 1292 Truncated incorrect query_prealloc_size value: '17409' 374set @@transaction_alloc_block_size=1024*20-1; 375Warnings: 376Warning 1292 Truncated incorrect transaction_alloc_block_size value: '20479' 377set @@transaction_prealloc_size=1024*21-1; 378Warnings: 379Warning 1292 Truncated incorrect transaction_prealloc_size value: '21503' 380==+ Check manipulated values ==+ 381SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', 382'query_alloc_block_size', 'query_prealloc_size', 383'transaction_alloc_block_size', 'transaction_prealloc_size'); 384Variable_name Value 385query_alloc_block_size 17408 386query_prealloc_size 17408 387range_alloc_block_size 16384 388transaction_alloc_block_size 19456 389transaction_prealloc_size 20480 390==+ information_schema data +== 391SELECT * FROM information_schema.session_variables 392WHERE variable_name IN ('range_alloc_block_size', 393'query_alloc_block_size', 'query_prealloc_size', 394'transaction_alloc_block_size', 'transaction_prealloc_size') ORDER BY 1; 395VARIABLE_NAME VARIABLE_VALUE 396QUERY_ALLOC_BLOCK_SIZE 17408 397QUERY_PREALLOC_SIZE 17408 398RANGE_ALLOC_BLOCK_SIZE 16384 399TRANSACTION_ALLOC_BLOCK_SIZE 19456 400TRANSACTION_PREALLOC_SIZE 20480 401==+ Set values back to the default values +== 402set @@range_alloc_block_size=default; 403set @@query_alloc_block_size=default, @@query_prealloc_size=default; 404set transaction_alloc_block_size=default, @@transaction_prealloc_size=default; 405==+ Check the values now that they are reset +== 406SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', 407'query_alloc_block_size', 'query_prealloc_size', 408'transaction_alloc_block_size', 'transaction_prealloc_size'); 409Variable_name Value 410query_alloc_block_size 8192 411query_prealloc_size 8192 412range_alloc_block_size 4096 413transaction_alloc_block_size 8192 414transaction_prealloc_size 4096 415SELECT @@version LIKE 'non-existent'; 416@@version LIKE 'non-existent' 4170 418SELECT @@version_compile_os LIKE 'non-existent'; 419@@version_compile_os LIKE 'non-existent' 4200 421set big_tables=OFFF; 422ERROR 42000: Variable 'big_tables' can't be set to the value of 'OFFF' 423set big_tables="OFFF"; 424ERROR 42000: Variable 'big_tables' can't be set to the value of 'OFFF' 425set unknown_variable=1; 426ERROR HY000: Unknown system variable 'unknown_variable' 427set max_join_size="hello"; 428ERROR 42000: Incorrect argument type to variable 'max_join_size' 429set default_storage_engine=UNKNOWN_TABLE_TYPE; 430ERROR 42000: Unknown storage engine 'UNKNOWN_TABLE_TYPE' 431set default_storage_engine=MERGE, big_tables=2; 432ERROR 42000: Variable 'big_tables' can't be set to the value of '2' 433show local variables like 'default_storage_engine'; 434Variable_name Value 435default_storage_engine MEMORY 436set SESSION query_cache_size=10000; 437ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL 438set character_set_client=UNKNOWN_CHARACTER_SET; 439ERROR 42000: Unknown character set: 'UNKNOWN_CHARACTER_SET' 440set collation_connection=UNKNOWN_COLLATION; 441ERROR HY000: Unknown collation: 'UNKNOWN_COLLATION' 442set character_set_client=NULL; 443ERROR 42000: Variable 'character_set_client' can't be set to the value of 'NULL' 444set collation_connection=NULL; 445ERROR 42000: Variable 'collation_connection' can't be set to the value of 'NULL' 446select @@global.timestamp; 447ERROR HY000: Variable 'timestamp' is a SESSION variable 448set @@version=''; 449ERROR HY000: Variable 'version' is a read only variable 450set @@concurrent_insert=1; 451ERROR HY000: Variable 'concurrent_insert' is a GLOBAL variable and should be set with SET GLOBAL 452set myisam_max_sort_file_size=100; 453ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL 454set @@SQL_WARNINGS=NULL; 455ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'NULL' 456set autocommit=1; 457set big_tables=1; 458select @@autocommit, @@big_tables; 459@@autocommit @@big_tables 4601 1 461set global binlog_cache_size=100; 462Warnings: 463Warning 1292 Truncated incorrect binlog_cache_size value: '100' 464set bulk_insert_buffer_size=100; 465set character set cp1251_koi8; 466set character set default; 467set @@global.concurrent_insert=1; 468set global connect_timeout=100; 469select @@delay_key_write; 470@@delay_key_write 471ON 472set global delay_key_write="OFF"; 473select @@delay_key_write; 474@@delay_key_write 475OFF 476set global delay_key_write=ALL; 477select @@delay_key_write; 478@@delay_key_write 479ALL 480set global delay_key_write=1; 481select @@delay_key_write; 482@@delay_key_write 483ON 484set global delayed_insert_limit=100; 485set global delayed_insert_timeout=100; 486set global delayed_queue_size=100; 487set global flush=1; 488set global flush_time=100; 489set insert_id=1; 490set interactive_timeout=100; 491set join_buffer_size=100; 492Warnings: 493Warning 1292 Truncated incorrect join_buffer_size value: '100' 494set last_insert_id=1; 495set global local_infile=1; 496set long_query_time=0.000001; 497select @@long_query_time; 498@@long_query_time 4990.000001 500set long_query_time=100.000001; 501select @@long_query_time; 502@@long_query_time 503100.000001 504set low_priority_updates=1; 505set global max_allowed_packet=100; 506Warnings: 507Warning 1292 Truncated incorrect max_allowed_packet value: '100' 508Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length' 509set global max_binlog_cache_size=100; 510Warnings: 511Warning 1292 Truncated incorrect max_binlog_cache_size value: '100' 512set global max_binlog_size=100; 513Warnings: 514Warning 1292 Truncated incorrect max_binlog_size value: '100' 515set global max_connect_errors=100; 516set global max_connections=100; 517set global max_delayed_threads=100; 518set max_heap_table_size=100; 519Warnings: 520Warning 1292 Truncated incorrect max_heap_table_size value: '100' 521set max_join_size=100; 522set max_sort_length=100; 523set max_tmp_tables=100; 524set global max_user_connections=100; 525select @@max_user_connections; 526@@max_user_connections 527100 528set global max_write_lock_count=100; 529set myisam_sort_buffer_size=100; 530Warnings: 531Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '100' 532set global net_buffer_length=100; 533Warnings: 534Warning 1292 Truncated incorrect net_buffer_length value: '100' 535set net_read_timeout=100; 536set net_write_timeout=100; 537set global query_cache_limit=100; 538set global query_cache_size=100; 539Warnings: 540Warning 1292 Truncated incorrect query_cache_size value: '100' 541set global query_cache_type=demand; 542set read_buffer_size=100; 543Warnings: 544Warning 1292 Truncated incorrect read_buffer_size value: '100' 545set read_rnd_buffer_size=100; 546set global rpl_recovery_rank=100; 547Warnings: 548Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release. 549set global server_id=100; 550set global slow_launch_time=100; 551set sort_buffer_size=100; 552Warnings: 553Warning 1292 Truncated incorrect sort_buffer_size value: '100' 554set @@max_sp_recursion_depth=10; 555select @@max_sp_recursion_depth; 556@@max_sp_recursion_depth 55710 558set @@max_sp_recursion_depth=0; 559select @@max_sp_recursion_depth; 560@@max_sp_recursion_depth 5610 562set sql_auto_is_null=1; 563select @@sql_auto_is_null; 564@@sql_auto_is_null 5651 566set @@sql_auto_is_null=0; 567select @@sql_auto_is_null; 568@@sql_auto_is_null 5690 570set sql_big_selects=1; 571set sql_big_tables=1; 572set sql_buffer_result=1; 573set sql_log_bin=1; 574set sql_log_off=1; 575set sql_low_priority_updates=1; 576set sql_quote_show_create=1; 577set sql_safe_updates=1; 578set sql_select_limit=1; 579set sql_select_limit=default; 580set sql_warnings=1; 581set global table_open_cache=100; 582set default_storage_engine=myisam; 583set global thread_cache_size=100; 584set timestamp=1, timestamp=default; 585set tmp_table_size=100; 586Warnings: 587Warning 1292 Truncated incorrect tmp_table_size value: '100' 588set tx_isolation="READ-COMMITTED"; 589set wait_timeout=100; 590set log_warnings=1; 591set global log_warnings=1; 592select @@session.insert_id; 593@@session.insert_id 5941 595set @save_insert_id=@@session.insert_id; 596set session insert_id=20; 597select @@session.insert_id; 598@@session.insert_id 59920 600set session last_insert_id=100; 601select @@session.insert_id; 602@@session.insert_id 60320 604select @@session.last_insert_id; 605@@session.last_insert_id 606100 607select @@session.insert_id; 608@@session.insert_id 60920 610set @@session.insert_id=@save_insert_id; 611select @@session.insert_id; 612@@session.insert_id 6131 614create table t1 (a int not null auto_increment, primary key(a)); 615create table t2 (a int not null auto_increment, primary key(a)); 616insert into t1 values(null),(null),(null); 617insert into t2 values(null),(null),(null); 618set global key_buffer_size=100000; 619Warnings: 620Warning 1292 Truncated incorrect key_buffer_size value: '100000' 621select @@key_buffer_size; 622@@key_buffer_size 62398304 624select * from t1 where a=2; 625a 6262 627select * from t2 where a=3; 628a 6293 630check table t1,t2; 631Table Op Msg_type Msg_text 632test.t1 check status OK 633test.t2 check status OK 634select max(a) +1, max(a) +2 into @xx,@yy from t1; 635drop table t1,t2; 636select @@xxxxxxxxxx; 637ERROR HY000: Unknown system variable 'xxxxxxxxxx' 638select 1; 6391 6401 641select @@session.key_buffer_size; 642ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable 643set ft_boolean_syntax = @@init_connect; 644ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL 645set global ft_boolean_syntax = @@init_connect; 646ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '' 647set init_connect = NULL; 648ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL 649set global init_connect = NULL; 650set ft_boolean_syntax = @@init_connect; 651ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL 652set global ft_boolean_syntax = @@init_connect; 653ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '' 654set global myisam_max_sort_file_size=4294967296; 655show global variables like 'myisam_max_sort_file_size'; 656Variable_name Value 657myisam_max_sort_file_size MAX_FILE_SIZE 658select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size'; 659VARIABLE_NAME VARIABLE_VALUE 660MYISAM_MAX_SORT_FILE_SIZE MAX_FILE_SIZE 661set global myisam_max_sort_file_size=default; 662select @@global.max_user_connections,@@local.max_join_size; 663@@global.max_user_connections @@local.max_join_size 664100 100 665set @svc=@@global.max_user_connections, @svj=@@local.max_join_size; 666select @@global.max_user_connections,@@local.max_join_size; 667@@global.max_user_connections @@local.max_join_size 668100 100 669set @@global.max_user_connections=111,@@local.max_join_size=222; 670select @@global.max_user_connections,@@local.max_join_size; 671@@global.max_user_connections @@local.max_join_size 672111 222 673set @@global.max_user_connections=@@local.max_join_size,@@local.max_join_size=@@global.max_user_connections; 674select @@global.max_user_connections,@@local.max_join_size; 675@@global.max_user_connections @@local.max_join_size 676222 111 677set @@global.max_user_connections=@svc, @@local.max_join_size=@svj; 678select @@global.max_user_connections,@@local.max_join_size; 679@@global.max_user_connections @@local.max_join_size 680100 100 681set @a=1, @b=2; 682set @a=@b, @b=@a; 683select @a, @b; 684@a @b 6852 1 686set @@global.global.key_buffer_size= 1; 687ERROR 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 'key_buffer_size= 1' at line 1 688set GLOBAL global.key_buffer_size= 1; 689ERROR 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 'key_buffer_size= 1' at line 1 690SELECT @@global.global.key_buffer_size; 691ERROR 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 'key_buffer_size' at line 1 692SELECT @@global.session.key_buffer_size; 693ERROR 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 'key_buffer_size' at line 1 694SELECT @@global.local.key_buffer_size; 695ERROR 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 'key_buffer_size' at line 1 696set @tstlw = @@log_warnings; 697show global variables like 'log_warnings'; 698Variable_name Value 699log_warnings 1 700select * from information_schema.global_variables where variable_name like 'log_warnings'; 701VARIABLE_NAME VARIABLE_VALUE 702LOG_WARNINGS 1 703set global log_warnings = 0; 704show global variables like 'log_warnings'; 705Variable_name Value 706log_warnings 0 707select * from information_schema.global_variables where variable_name like 'log_warnings'; 708VARIABLE_NAME VARIABLE_VALUE 709LOG_WARNINGS 0 710set global log_warnings = 42; 711show global variables like 'log_warnings'; 712Variable_name Value 713log_warnings 42 714select * from information_schema.global_variables where variable_name like 'log_warnings'; 715VARIABLE_NAME VARIABLE_VALUE 716LOG_WARNINGS 42 717set global log_warnings = @tstlw; 718show global variables like 'log_warnings'; 719Variable_name Value 720log_warnings 1 721select * from information_schema.global_variables where variable_name like 'log_warnings'; 722VARIABLE_NAME VARIABLE_VALUE 723LOG_WARNINGS 1 724create table t1 ( 725c1 tinyint, 726c2 smallint, 727c3 mediumint, 728c4 int, 729c5 bigint); 730show create table t1; 731Table Create Table 732t1 CREATE TABLE `t1` ( 733 `c1` tinyint(4) DEFAULT NULL, 734 `c2` smallint(6) DEFAULT NULL, 735 `c3` mediumint(9) DEFAULT NULL, 736 `c4` int(11) DEFAULT NULL, 737 `c5` bigint(20) DEFAULT NULL 738) ENGINE=MyISAM DEFAULT CHARSET=latin1 739drop table t1; 740set @arg00= 8, @arg01= 8.8, @arg02= 'a string', @arg03= 0.2e0; 741create table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4; 742show create table t1; 743Table Create Table 744t1 CREATE TABLE `t1` ( 745 `c1` bigint(20) DEFAULT NULL, 746 `c2` decimal(65,30) DEFAULT NULL, 747 `c3` longtext, 748 `c4` double DEFAULT NULL 749) ENGINE=MyISAM DEFAULT CHARSET=latin1 750drop table t1; 751SET GLOBAL MYISAM_DATA_POINTER_SIZE= 7; 752SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE'; 753Variable_name Value 754myisam_data_pointer_size 7 755SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'MYISAM_DATA_POINTER_SIZE'; 756VARIABLE_NAME VARIABLE_VALUE 757MYISAM_DATA_POINTER_SIZE 7 758SET GLOBAL table_open_cache=-1; 759Warnings: 760Warning 1292 Truncated incorrect table_open_cache value: '-1' 761SHOW VARIABLES LIKE 'table_open_cache'; 762Variable_name Value 763table_open_cache 1 764SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache'; 765VARIABLE_NAME VARIABLE_VALUE 766TABLE_OPEN_CACHE 1 767SET GLOBAL table_open_cache=DEFAULT; 768set character_set_results=NULL; 769select ifnull(@@character_set_results,"really null"); 770ifnull(@@character_set_results,"really null") 771really null 772set names latin1; 773select @@have_innodb; 774@@have_innodb 775# 776*** Various tests with LC_TIME_NAMES 777*** LC_TIME_NAMES: testing case insensitivity 778set @@lc_time_names='ru_ru'; 779select @@lc_time_names; 780@@lc_time_names 781ru_RU 782*** LC_TIME_NAMES: testing with a user variable 783set @lc='JA_JP'; 784set @@lc_time_names=@lc; 785select @@lc_time_names; 786@@lc_time_names 787ja_JP 788*** LC_TIME_NAMES: testing with string expressions 789set lc_time_names=concat('de','_','DE'); 790select @@lc_time_names; 791@@lc_time_names 792de_DE 793set lc_time_names=concat('de','+','DE'); 794ERROR HY000: Unknown locale: 'de+DE' 795select @@lc_time_names; 796@@lc_time_names 797de_DE 798LC_TIME_NAMES: testing with numeric expressions 799set @@lc_time_names=1+2; 800select @@lc_time_names; 801@@lc_time_names 802sv_SE 803set @@lc_time_names=1/0; 804ERROR 42000: Incorrect argument type to variable 'lc_time_names' 805select @@lc_time_names; 806@@lc_time_names 807sv_SE 808set lc_time_names=en_US; 809LC_TIME_NAMES: testing NULL and a negative number: 810set lc_time_names=NULL; 811ERROR 42000: Variable 'lc_time_names' can't be set to the value of 'NULL' 812set lc_time_names=-1; 813ERROR HY000: Unknown locale: '-1' 814select @@lc_time_names; 815@@lc_time_names 816en_US 817LC_TIME_NAMES: testing locale with the last ID: 818set lc_time_names=109; 819select @@lc_time_names; 820@@lc_time_names 821el_GR 822LC_TIME_NAMES: testing a number beyond the valid ID range: 823set lc_time_names=110; 824ERROR HY000: Unknown locale: '110' 825select @@lc_time_names; 826@@lc_time_names 827el_GR 828LC_TIME_NAMES: testing that 0 is en_US: 829set lc_time_names=0; 830select @@lc_time_names; 831@@lc_time_names 832en_US 833select @@global.lc_time_names, @@lc_time_names; 834@@global.lc_time_names @@lc_time_names 835en_US en_US 836set @@global.lc_time_names=fr_FR; 837select @@global.lc_time_names, @@lc_time_names; 838@@global.lc_time_names @@lc_time_names 839fr_FR en_US 840New connection 841select @@global.lc_time_names, @@lc_time_names; 842@@global.lc_time_names @@lc_time_names 843fr_FR fr_FR 844set @@lc_time_names=ru_RU; 845select @@global.lc_time_names, @@lc_time_names; 846@@global.lc_time_names @@lc_time_names 847fr_FR ru_RU 848Returnung to default connection 849select @@global.lc_time_names, @@lc_time_names; 850@@global.lc_time_names @@lc_time_names 851fr_FR en_US 852set lc_time_names=default; 853select @@global.lc_time_names, @@lc_time_names; 854@@global.lc_time_names @@lc_time_names 855fr_FR fr_FR 856set @@global.lc_time_names=default; 857select @@global.lc_time_names, @@lc_time_names; 858@@global.lc_time_names @@lc_time_names 859en_US fr_FR 860set @@lc_time_names=default; 861select @@global.lc_time_names, @@lc_time_names; 862@@global.lc_time_names @@lc_time_names 863en_US en_US 864set @test = @@query_prealloc_size; 865set @@query_prealloc_size = @test; 866select @@query_prealloc_size = @test; 867@@query_prealloc_size = @test 8681 869set global sql_mode=repeat('a',80); 870ERROR 42000: Variable 'sql_mode' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' 871End of 4.1 tests 872create table t1 (a int); 873select a into @x from t1; 874Warnings: 875Warning 1329 No data - zero rows fetched, selected, or processed 876show warnings; 877Level Code Message 878Warning 1329 No data - zero rows fetched, selected, or processed 879drop table t1; 880set @@warning_count=1; 881ERROR HY000: Variable 'warning_count' is a read only variable 882set @@global.error_count=1; 883ERROR HY000: Variable 'error_count' is a read only variable 884set @@max_heap_table_size= 4294967296; 885select @@max_heap_table_size > 0; 886@@max_heap_table_size > 0 8871 888set global max_heap_table_size= 4294967296; 889select @@max_heap_table_size > 0; 890@@max_heap_table_size > 0 8911 892set @@max_heap_table_size= 4294967296; 893select @@max_heap_table_size > 0; 894@@max_heap_table_size > 0 8951 896select @@character_set_system; 897@@character_set_system 898utf8 899set global character_set_system = latin1; 900ERROR HY000: Variable 'character_set_system' is a read only variable 901set @@global.version_compile_os='234'; 902ERROR HY000: Variable 'version_compile_os' is a read only variable 903set character_set_filesystem=latin1; 904select @@character_set_filesystem; 905@@character_set_filesystem 906latin1 907set @@global.character_set_filesystem=latin2; 908set character_set_filesystem=latin1; 909select @@character_set_filesystem; 910@@character_set_filesystem 911latin1 912set @@global.character_set_filesystem=latin2; 913set character_set_filesystem=default; 914select @@character_set_filesystem; 915@@character_set_filesystem 916latin2 917set @@global.character_set_filesystem=default; 918select @@global.character_set_filesystem; 919@@global.character_set_filesystem 920binary 921set @old_sql_big_selects = @@sql_big_selects; 922set @@sql_big_selects = 1; 923show variables like 'sql_big_selects'; 924Variable_name Value 925sql_big_selects ON 926select * from information_schema.session_variables where variable_name like 'sql_big_selects'; 927VARIABLE_NAME VARIABLE_VALUE 928SQL_BIG_SELECTS ON 929set @@sql_big_selects = @old_sql_big_selects; 930set @@sql_notes = 0, @@sql_warnings = 0; 931show variables like 'sql_notes'; 932Variable_name Value 933sql_notes OFF 934select * from information_schema.session_variables where variable_name like 'sql_notes'; 935VARIABLE_NAME VARIABLE_VALUE 936SQL_NOTES OFF 937show variables like 'sql_warnings'; 938Variable_name Value 939sql_warnings OFF 940select * from information_schema.session_variables where variable_name like 'sql_warnings'; 941VARIABLE_NAME VARIABLE_VALUE 942SQL_WARNINGS OFF 943set @@sql_notes = 1, @@sql_warnings = 1; 944show variables like 'sql_notes'; 945Variable_name Value 946sql_notes ON 947select * from information_schema.session_variables where variable_name like 'sql_notes'; 948VARIABLE_NAME VARIABLE_VALUE 949SQL_NOTES ON 950show variables like 'sql_warnings'; 951Variable_name Value 952sql_warnings ON 953select * from information_schema.session_variables where variable_name like 'sql_warnings'; 954VARIABLE_NAME VARIABLE_VALUE 955SQL_WARNINGS ON 956select @@system_time_zone; 957@@system_time_zone 958# 959select @@version, @@version_comment, @@version_compile_machine, 960@@version_compile_os; 961@@version @@version_comment @@version_compile_machine @@version_compile_os 962# # # # 963select @@basedir, @@datadir, @@tmpdir; 964@@basedir @@datadir @@tmpdir 965# # # 966show variables like 'basedir'; 967Variable_name Value 968basedir # 969select * from information_schema.session_variables where variable_name like 'basedir'; 970VARIABLE_NAME VARIABLE_VALUE 971BASEDIR # 972show variables like 'datadir'; 973Variable_name Value 974datadir # 975select * from information_schema.session_variables where variable_name like 'datadir'; 976VARIABLE_NAME VARIABLE_VALUE 977DATADIR # 978show variables like 'tmpdir'; 979Variable_name Value 980tmpdir # 981select * from information_schema.session_variables where variable_name like 'tmpdir'; 982VARIABLE_NAME VARIABLE_VALUE 983TMPDIR # 984select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key; 985@@ssl_ca @@ssl_capath @@ssl_cert @@ssl_cipher @@ssl_key 986# # # # # 987show variables like 'ssl%'; 988Variable_name Value 989ssl_ca # 990ssl_capath # 991ssl_cert # 992ssl_cipher # 993ssl_key # 994select * from information_schema.session_variables where variable_name like 'ssl%' order by 1; 995VARIABLE_NAME VARIABLE_VALUE 996SSL_CA # 997SSL_CAPATH # 998SSL_CERT # 999SSL_CIPHER # 1000SSL_KEY # 1001select @@log_queries_not_using_indexes; 1002@@log_queries_not_using_indexes 10030 1004show variables like 'log_queries_not_using_indexes'; 1005Variable_name Value 1006log_queries_not_using_indexes OFF 1007select * from information_schema.session_variables where variable_name like 'log_queries_not_using_indexes'; 1008VARIABLE_NAME VARIABLE_VALUE 1009LOG_QUERIES_NOT_USING_INDEXES OFF 1010select @@""; 1011ERROR 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 1012select @@&; 1013ERROR 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 1014select @@@; 1015ERROR 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 1016select @@hostname; 1017@@hostname 1018# 1019set @@hostname= "anothername"; 1020ERROR HY000: Variable 'hostname' is a read only variable 1021show variables like 'hostname'; 1022Variable_name Value 1023hostname # 1024# 1025# BUG#37408 - Compressed MyISAM files should not require/use mmap() 1026# 1027# Test 'myisam_mmap_size' option is not dynamic 1028SET @@myisam_mmap_size= 500M; 1029ERROR HY000: Variable 'myisam_mmap_size' is a read only variable 1030# 1031# Bug #52315: utc_date() crashes when system time > year 2037 1032# 1033SET TIMESTAMP=2*1024*1024*1024; 1034#Should not crash 1035SELECT UTC_DATE(); 1036SET TIMESTAMP=DEFAULT; 1037End of 5.0 tests 1038set join_buffer_size=1; 1039Warnings: 1040Warning 1292 Truncated incorrect join_buffer_size value: '1' 1041set @save_join_buffer_size=@@join_buffer_size; 1042set join_buffer_size=@save_join_buffer_size; 1043set global binlog_cache_size =@my_binlog_cache_size; 1044set global connect_timeout =@my_connect_timeout; 1045set global delayed_insert_timeout =@my_delayed_insert_timeout; 1046set global delayed_queue_size =@my_delayed_queue_size; 1047set global flush =@my_flush; 1048set global flush_time =@my_flush_time; 1049set global key_buffer_size =@my_key_buffer_size; 1050set global max_binlog_cache_size =@my_max_binlog_cache_size; 1051set global max_binlog_size =@my_max_binlog_size; 1052set global max_connect_errors =@my_max_connect_errors; 1053set global max_connections =@my_max_connections; 1054set global max_delayed_threads =@my_max_delayed_threads; 1055set global max_heap_table_size =@my_max_heap_table_size; 1056set global max_insert_delayed_threads=@my_max_insert_delayed_threads; 1057set global max_join_size =@my_max_join_size; 1058set global max_user_connections =default; 1059set global max_write_lock_count =default; 1060set global myisam_data_pointer_size =@my_myisam_data_pointer_size; 1061set global myisam_max_sort_file_size =@my_myisam_max_sort_file_size; 1062set global net_buffer_length =@my_net_buffer_length; 1063Warnings: 1064Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length' 1065set global net_write_timeout =@my_net_write_timeout; 1066set global net_read_timeout =@my_net_read_timeout; 1067set global query_cache_limit =@my_query_cache_limit; 1068set global query_cache_type =@my_query_cache_type; 1069set global rpl_recovery_rank =@my_rpl_recovery_rank; 1070Warnings: 1071Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release. 1072set global server_id =@my_server_id; 1073set global slow_launch_time =@my_slow_launch_time; 1074set global default_storage_engine =@my_storage_engine; 1075set global thread_cache_size =@my_thread_cache_size; 1076set global max_allowed_packet =@my_max_allowed_packet; 1077set global join_buffer_size =@my_join_buffer_size; 1078show global variables where Variable_name='table_definition_cache'; 1079Variable_name Value 1080table_definition_cache # 1081 1082# -- 1083# -- Bug#34820: log_output can be set to illegal value. 1084# -- 1085SET GLOBAL log_output = ''; 1086ERROR 42000: Variable 'log_output' can't be set to the value of '' 1087SET GLOBAL log_output = 0; 1088ERROR 42000: Variable 'log_output' can't be set to the value of '0' 1089 1090# -- End of Bug#34820. 1091 1092# 1093SHOW VARIABLES like 'ft_max_word_len'; 1094Variable_name Value 1095ft_max_word_len 84 1096SELECT @@session.ft_max_word_len; 1097ERROR HY000: Variable 'ft_max_word_len' is a GLOBAL variable 1098SELECT @@global.ft_max_word_len; 1099@@global.ft_max_word_len 110084 1101SET @@session.ft_max_word_len= 7; 1102ERROR HY000: Variable 'ft_max_word_len' is a read only variable 1103SET @@global.ft_max_word_len= 7; 1104ERROR HY000: Variable 'ft_max_word_len' is a read only variable 1105# 1106SHOW VARIABLES like 'ft_min_word_len'; 1107Variable_name Value 1108ft_min_word_len 4 1109SELECT @@session.ft_min_word_len; 1110ERROR HY000: Variable 'ft_min_word_len' is a GLOBAL variable 1111SELECT @@global.ft_min_word_len; 1112@@global.ft_min_word_len 11134 1114SET @@session.ft_min_word_len= 7; 1115ERROR HY000: Variable 'ft_min_word_len' is a read only variable 1116SET @@global.ft_min_word_len= 7; 1117ERROR HY000: Variable 'ft_min_word_len' is a read only variable 1118# 1119SHOW VARIABLES like 'ft_query_expansion_limit'; 1120Variable_name Value 1121ft_query_expansion_limit 20 1122SELECT @@session.ft_query_expansion_limit; 1123ERROR HY000: Variable 'ft_query_expansion_limit' is a GLOBAL variable 1124SELECT @@global.ft_query_expansion_limit; 1125@@global.ft_query_expansion_limit 112620 1127SET @@session.ft_query_expansion_limit= 7; 1128ERROR HY000: Variable 'ft_query_expansion_limit' is a read only variable 1129SET @@global.ft_query_expansion_limit= 7; 1130ERROR HY000: Variable 'ft_query_expansion_limit' is a read only variable 1131# 1132SHOW VARIABLES like 'ft_stopword_file'; 1133Variable_name Value 1134ft_stopword_file (built-in) 1135SELECT @@session.ft_stopword_file; 1136ERROR HY000: Variable 'ft_stopword_file' is a GLOBAL variable 1137SELECT @@global.ft_stopword_file; 1138@@global.ft_stopword_file 1139(built-in) 1140SET @@session.ft_stopword_file= 'x'; 1141ERROR HY000: Variable 'ft_stopword_file' is a read only variable 1142SET @@global.ft_stopword_file= 'x'; 1143ERROR HY000: Variable 'ft_stopword_file' is a read only variable 1144# 1145SHOW VARIABLES like 'back_log'; 1146Variable_name Value 1147back_log 50 1148SELECT @@session.back_log; 1149ERROR HY000: Variable 'back_log' is a GLOBAL variable 1150SELECT @@global.back_log; 1151@@global.back_log 115250 1153SET @@session.back_log= 7; 1154ERROR HY000: Variable 'back_log' is a read only variable 1155SET @@global.back_log= 7; 1156ERROR HY000: Variable 'back_log' is a read only variable 1157# 1158SHOW VARIABLES like 'large_files_support'; 1159Variable_name Value 1160large_files_support # 1161SELECT @@session.large_files_support; 1162ERROR HY000: Variable 'large_files_support' is a GLOBAL variable 1163SELECT @@global.large_files_support; 1164@@global.large_files_support 1165# 1166SET @@session.large_files_support= true; 1167ERROR HY000: Variable 'large_files_support' is a read only variable 1168SET @@global.large_files_support= true; 1169ERROR HY000: Variable 'large_files_support' is a read only variable 1170# 1171SHOW VARIABLES like 'character_sets_dir'; 1172Variable_name Value 1173character_sets_dir # 1174SELECT @@session.character_sets_dir; 1175ERROR HY000: Variable 'character_sets_dir' is a GLOBAL variable 1176SELECT @@global.character_sets_dir; 1177@@global.character_sets_dir 1178# 1179SET @@session.character_sets_dir= 'x'; 1180ERROR HY000: Variable 'character_sets_dir' is a read only variable 1181SET @@global.character_sets_dir= 'x'; 1182ERROR HY000: Variable 'character_sets_dir' is a read only variable 1183# 1184SHOW VARIABLES like 'init_file'; 1185Variable_name Value 1186init_file # 1187SELECT @@session.init_file; 1188ERROR HY000: Variable 'init_file' is a GLOBAL variable 1189SELECT @@global.init_file; 1190@@global.init_file 1191# 1192SET @@session.init_file= 'x'; 1193ERROR HY000: Variable 'init_file' is a read only variable 1194SET @@global.init_file= 'x'; 1195ERROR HY000: Variable 'init_file' is a read only variable 1196# 1197SHOW VARIABLES like 'lc_messages_dir'; 1198Variable_name Value 1199lc_messages_dir # 1200SELECT @@session.lc_messages_dir; 1201ERROR HY000: Variable 'lc_messages_dir' is a GLOBAL variable 1202SELECT @@global.lc_messages_dir; 1203@@global.lc_messages_dir 1204# 1205SET @@session.lc_messages_dir= 'x'; 1206ERROR HY000: Variable 'lc_messages_dir' is a read only variable 1207SET @@global.lc_messages_dir= 'x'; 1208ERROR HY000: Variable 'lc_messages_dir' is a read only variable 1209# 1210SHOW VARIABLES like 'large_page_size'; 1211Variable_name Value 1212large_page_size # 1213SELECT @@session.large_page_size; 1214ERROR HY000: Variable 'large_page_size' is a GLOBAL variable 1215SELECT @@global.large_page_size; 1216@@global.large_page_size 1217# 1218SET @@session.large_page_size= 7; 1219ERROR HY000: Variable 'large_page_size' is a read only variable 1220SET @@global.large_page_size= 7; 1221ERROR HY000: Variable 'large_page_size' is a read only variable 1222# 1223SHOW VARIABLES like 'large_pages'; 1224Variable_name Value 1225large_pages # 1226SELECT @@session.large_pages; 1227ERROR HY000: Variable 'large_pages' is a GLOBAL variable 1228SELECT @@global.large_pages; 1229@@global.large_pages 1230# 1231SET @@session.large_pages= true; 1232ERROR HY000: Variable 'large_pages' is a read only variable 1233SET @@global.large_pages= true; 1234ERROR HY000: Variable 'large_pages' is a read only variable 1235# 1236SHOW VARIABLES like 'log_bin'; 1237Variable_name Value 1238log_bin OFF 1239SELECT @@session.log_bin; 1240ERROR HY000: Variable 'log_bin' is a GLOBAL variable 1241SELECT @@global.log_bin; 1242@@global.log_bin 12430 1244SET @@session.log_bin= true; 1245ERROR HY000: Variable 'log_bin' is a read only variable 1246SET @@global.log_bin= true; 1247ERROR HY000: Variable 'log_bin' is a read only variable 1248# 1249SHOW VARIABLES like 'log_error'; 1250Variable_name Value 1251log_error # 1252SELECT @@session.log_error; 1253ERROR HY000: Variable 'log_error' is a GLOBAL variable 1254SELECT @@global.log_error; 1255@@global.log_error 1256# 1257SET @@session.log_error= 'x'; 1258ERROR HY000: Variable 'log_error' is a read only variable 1259SET @@global.log_error= 'x'; 1260ERROR HY000: Variable 'log_error' is a read only variable 1261# 1262SHOW VARIABLES like 'lower_case_file_system'; 1263Variable_name Value 1264lower_case_file_system # 1265SELECT @@session.lower_case_file_system; 1266ERROR HY000: Variable 'lower_case_file_system' is a GLOBAL variable 1267SELECT @@global.lower_case_file_system; 1268@@global.lower_case_file_system 1269# 1270SET @@session.lower_case_file_system= true; 1271ERROR HY000: Variable 'lower_case_file_system' is a read only variable 1272SET @@global.lower_case_file_system= true; 1273ERROR HY000: Variable 'lower_case_file_system' is a read only variable 1274# 1275SHOW VARIABLES like 'lower_case_table_names'; 1276Variable_name Value 1277lower_case_table_names # 1278SELECT @@session.lower_case_table_names; 1279ERROR HY000: Variable 'lower_case_table_names' is a GLOBAL variable 1280SELECT @@global.lower_case_table_names; 1281@@global.lower_case_table_names 1282# 1283SET @@session.lower_case_table_names= 7; 1284ERROR HY000: Variable 'lower_case_table_names' is a read only variable 1285SET @@global.lower_case_table_names= 7; 1286ERROR HY000: Variable 'lower_case_table_names' is a read only variable 1287# 1288SHOW VARIABLES like 'myisam_recover_options'; 1289Variable_name Value 1290myisam_recover_options OFF 1291SELECT @@session.myisam_recover_options; 1292ERROR HY000: Variable 'myisam_recover_options' is a GLOBAL variable 1293SELECT @@global.myisam_recover_options; 1294@@global.myisam_recover_options 1295OFF 1296SET @@session.myisam_recover_options= 'x'; 1297ERROR HY000: Variable 'myisam_recover_options' is a read only variable 1298SET @@global.myisam_recover_options= 'x'; 1299ERROR HY000: Variable 'myisam_recover_options' is a read only variable 1300# 1301SHOW VARIABLES like 'open_files_limit'; 1302Variable_name Value 1303open_files_limit # 1304SELECT @@session.open_files_limit; 1305ERROR HY000: Variable 'open_files_limit' is a GLOBAL variable 1306SELECT @@global.open_files_limit; 1307@@global.open_files_limit 1308# 1309SET @@session.open_files_limit= 7; 1310ERROR HY000: Variable 'open_files_limit' is a read only variable 1311SET @@global.open_files_limit= 7; 1312ERROR HY000: Variable 'open_files_limit' is a read only variable 1313# 1314SHOW VARIABLES like 'pid_file'; 1315Variable_name Value 1316pid_file # 1317SELECT @@session.pid_file; 1318ERROR HY000: Variable 'pid_file' is a GLOBAL variable 1319SELECT @@global.pid_file; 1320@@global.pid_file 1321# 1322SET @@session.pid_file= 'x'; 1323ERROR HY000: Variable 'pid_file' is a read only variable 1324SET @@global.pid_file= 'x'; 1325ERROR HY000: Variable 'pid_file' is a read only variable 1326# 1327SHOW VARIABLES like 'plugin_dir'; 1328Variable_name Value 1329plugin_dir # 1330SELECT @@session.plugin_dir; 1331ERROR HY000: Variable 'plugin_dir' is a GLOBAL variable 1332SELECT @@global.plugin_dir; 1333@@global.plugin_dir 1334# 1335SET @@session.plugin_dir= 'x'; 1336ERROR HY000: Variable 'plugin_dir' is a read only variable 1337SET @@global.plugin_dir= 'x'; 1338ERROR HY000: Variable 'plugin_dir' is a read only variable 1339# 1340SHOW VARIABLES like 'port'; 1341Variable_name Value 1342port # 1343SELECT @@session.port; 1344ERROR HY000: Variable 'port' is a GLOBAL variable 1345SELECT @@global.port; 1346@@global.port 1347# 1348SET @@session.port= 7; 1349ERROR HY000: Variable 'port' is a read only variable 1350SET @@global.port= 7; 1351ERROR HY000: Variable 'port' is a read only variable 1352# 1353SHOW VARIABLES like 'protocol_version'; 1354Variable_name Value 1355protocol_version 10 1356SELECT @@session.protocol_version; 1357ERROR HY000: Variable 'protocol_version' is a GLOBAL variable 1358SELECT @@global.protocol_version; 1359@@global.protocol_version 136010 1361SET @@session.protocol_version= 7; 1362ERROR HY000: Variable 'protocol_version' is a read only variable 1363SET @@global.protocol_version= 7; 1364ERROR HY000: Variable 'protocol_version' is a read only variable 1365# 1366SHOW VARIABLES like 'skip_external_locking'; 1367Variable_name Value 1368skip_external_locking ON 1369SELECT @@session.skip_external_locking; 1370ERROR HY000: Variable 'skip_external_locking' is a GLOBAL variable 1371SELECT @@global.skip_external_locking; 1372@@global.skip_external_locking 13731 1374SET @@session.skip_external_locking= true; 1375ERROR HY000: Variable 'skip_external_locking' is a read only variable 1376SET @@global.skip_external_locking= true; 1377ERROR HY000: Variable 'skip_external_locking' is a read only variable 1378# 1379SHOW VARIABLES like 'skip_networking'; 1380Variable_name Value 1381skip_networking OFF 1382SELECT @@session.skip_networking; 1383ERROR HY000: Variable 'skip_networking' is a GLOBAL variable 1384SELECT @@global.skip_networking; 1385@@global.skip_networking 13860 1387SET @@session.skip_networking= true; 1388ERROR HY000: Variable 'skip_networking' is a read only variable 1389SET @@global.skip_networking= true; 1390ERROR HY000: Variable 'skip_networking' is a read only variable 1391# 1392SHOW VARIABLES like 'skip_show_database'; 1393Variable_name Value 1394skip_show_database OFF 1395SELECT @@session.skip_show_database; 1396ERROR HY000: Variable 'skip_show_database' is a GLOBAL variable 1397SELECT @@global.skip_show_database; 1398@@global.skip_show_database 13990 1400SET @@session.skip_show_database= true; 1401ERROR HY000: Variable 'skip_show_database' is a read only variable 1402SET @@global.skip_show_database= true; 1403ERROR HY000: Variable 'skip_show_database' is a read only variable 1404# 1405SHOW VARIABLES like 'thread_stack'; 1406Variable_name Value 1407thread_stack # 1408SELECT @@session.thread_stack; 1409ERROR HY000: Variable 'thread_stack' is a GLOBAL variable 1410SELECT @@global.thread_stack; 1411@@global.thread_stack 1412# 1413SET @@session.thread_stack= 7; 1414ERROR HY000: Variable 'thread_stack' is a read only variable 1415SET @@global.thread_stack= 7; 1416ERROR HY000: Variable 'thread_stack' is a read only variable 1417SELECT @@global.expire_logs_days INTO @old_eld; 1418SET GLOBAL expire_logs_days = -1; 1419Warnings: 1420Warning 1292 Truncated incorrect expire_logs_days value: '-1' 1421needs to've been adjusted (0) 1422SELECT @@global.expire_logs_days; 1423@@global.expire_logs_days 14240 1425SET GLOBAL expire_logs_days = 11; 1426SET @old_mode=@@sql_mode; 1427SET SESSION sql_mode = 'TRADITIONAL'; 1428SET GLOBAL expire_logs_days = 100; 1429ERROR 42000: Variable 'expire_logs_days' can't be set to the value of '100' 1430needs to be unchanged (11) 1431SELECT @@global.expire_logs_days; 1432@@global.expire_logs_days 143311 1434SET SESSION sql_mode = @old_mode; 1435SET GLOBAL expire_logs_days = 100; 1436Warnings: 1437Warning 1292 Truncated incorrect expire_logs_days value: '100' 1438needs to've been adjusted (99) 1439SELECT @@global.expire_logs_days; 1440@@global.expire_logs_days 144199 1442SET GLOBAL expire_logs_days = 11; 1443SET GLOBAL expire_logs_days = 99; 1444needs to pass with no warnings (99) 1445SELECT @@global.expire_logs_days; 1446@@global.expire_logs_days 144799 1448SET GLOBAL expire_logs_days = @old_eld; 1449SET GLOBAL auto_increment_offset=-1; 1450Warnings: 1451Warning 1292 Truncated incorrect auto_increment_offset value: '-1' 1452SET GLOBAL auto_increment_offset=0; 1453Warnings: 1454Warning 1292 Truncated incorrect auto_increment_offset value: '0' 1455select @@default_storage_engine; 1456Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr 1457def @@default_storage_engine 253 6 6 Y 0 31 8 1458@@default_storage_engine 1459MyISAM 1460SET @old_server_id = @@GLOBAL.server_id; 1461SET GLOBAL server_id = (1 << 32) - 1; 1462SELECT @@GLOBAL.server_id; 1463@@GLOBAL.server_id 14644294967295 1465SET GLOBAL server_id = (1 << 32); 1466Warnings: 1467Warning 1292 Truncated incorrect server_id value: '4294967296' 1468SELECT @@GLOBAL.server_id; 1469@@GLOBAL.server_id 14704294967295 1471SET GLOBAL server_id = (1 << 60); 1472Warnings: 1473Warning 1292 Truncated incorrect server_id value: '1152921504606846976' 1474SELECT @@GLOBAL.server_id; 1475@@GLOBAL.server_id 14764294967295 1477SET GLOBAL server_id = 0; 1478SELECT @@GLOBAL.server_id; 1479@@GLOBAL.server_id 14800 1481SET GLOBAL server_id = -1; 1482Warnings: 1483Warning 1292 Truncated incorrect server_id value: '-1' 1484SELECT @@GLOBAL.server_id; 1485@@GLOBAL.server_id 14860 1487SET GLOBAL server_id = @old_server_id; 1488SELECT @@GLOBAL.INIT_FILE, @@GLOBAL.INIT_FILE IS NULL; 1489@@GLOBAL.INIT_FILE @@GLOBAL.INIT_FILE IS NULL 1490NULL 1 1491CREATE TABLE t1 (a INT); 1492INSERT INTO t1 VALUES (); 1493SET @bug42778= @@sql_safe_updates; 1494SET @@sql_safe_updates= 0; 1495DELETE FROM t1 ORDER BY (@@GLOBAL.INIT_FILE) ASC LIMIT 10; 1496SET @@sql_safe_updates= @bug42778; 1497DROP TABLE t1; 1498# 1499# BUG#10206 - InnoDB: Transaction requiring Max_BinLog_Cache_size > 4GB always rollsback 1500# 1501SET @old_max_binlog_cache_size = @@GLOBAL.max_binlog_cache_size; 1502# Set the max_binlog_cache_size to size more than 4GB. 1503SET GLOBAL max_binlog_cache_size = 5 * 1024 * 1024 * 1024; 1504SELECT @@GLOBAL.max_binlog_cache_size; 1505@@GLOBAL.max_binlog_cache_size 15065368709120 1507SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size; 1508# 1509# Bug #37168 : Missing variable - skip_name_resolve 1510# 1511SELECT @@skip_name_resolve; 1512@@skip_name_resolve 15130 1514SHOW VARIABLES LIKE 'skip_name_resolve'; 1515Variable_name Value 1516skip_name_resolve OFF 1517# 1518# Bug #43233 : Some server variables are clipped during "update," 1519# not "check" stage 1520# 1521SET @kbs=@@global.key_buffer_size; 1522SET @kcbs=@@global.key_cache_block_size; 1523throw errors in STRICT mode 1524SET SQL_MODE=STRICT_ALL_TABLES; 1525SET @@global.max_binlog_cache_size=-1; 1526ERROR 42000: Variable 'max_binlog_cache_size' can't be set to the value of '-1' 1527SET @@global.max_join_size=0; 1528ERROR 42000: Variable 'max_join_size' can't be set to the value of '0' 1529SET @@global.key_buffer_size=0; 1530ERROR HY000: Cannot drop default keycache 1531SET @@global.key_cache_block_size=0; 1532ERROR 42000: Variable 'key_cache_block_size' can't be set to the value of '0' 1533throw warnings in default mode 1534SET SQL_MODE=DEFAULT; 1535SET @@global.max_binlog_cache_size=-1; 1536Warnings: 1537Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1' 1538SET @@global.max_join_size=0; 1539Warnings: 1540Warning 1292 Truncated incorrect max_join_size value: '0' 1541SET @@global.key_buffer_size=0; 1542ERROR HY000: Cannot drop default keycache 1543SET @@global.key_cache_block_size=0; 1544Warnings: 1545Warning 1292 Truncated incorrect key_cache_block_size value: '0' 1546select @@max_long_data_size; 1547@@max_long_data_size 15481048576 1549# 1550# Bug#11766424 59527: DECIMAL_BIN_SIZE: ASSERTION `SCALE >= 0 && PRECISION > 0 && SCALE <= PRE 1551# 1552CREATE TABLE t1(f1 DECIMAL(1,1) UNSIGNED); 1553INSERT INTO t1 VALUES (0.2),(0.1); 1554SELECT 1 FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE @a=f1); 15551 15561 1557DROP TABLE t1; 1558CREATE TABLE t1 AS SELECT @a:= CAST(1 AS UNSIGNED) AS a; 1559SHOW CREATE TABLE t1; 1560Table Create Table 1561t1 CREATE TABLE `t1` ( 1562 `a` int(1) unsigned NOT NULL DEFAULT '0' 1563) ENGINE=MyISAM DEFAULT CHARSET=latin1 1564DROP TABLE t1; 1565SET @@global.max_binlog_cache_size=DEFAULT; 1566SET @@global.max_join_size=DEFAULT; 1567SET @@global.key_buffer_size=@kbs; 1568SET @@global.key_cache_block_size=@kcbs; 1569End of 5.1 tests 1570 1571# 1572# Bug#34828: OF is taken as OFF and a value of 0 is set for variable SQL_notes. 1573# 1574 1575# Checking sql_notes... 1576SET @sql_notes_saved = @@sql_notes; 1577 1578SET @@sql_notes = ON; 1579SELECT @@sql_notes; 1580@@sql_notes 15811 1582 1583SET @@sql_notes = OF; 1584ERROR 42000: Variable 'sql_notes' can't be set to the value of 'OF' 1585SELECT @@sql_notes; 1586@@sql_notes 15871 1588 1589SET @@sql_notes = OFF; 1590SELECT @@sql_notes; 1591@@sql_notes 15920 1593 1594SET @@sql_notes = @sql_notes_saved; 1595 1596# Checking delay_key_write... 1597SET @delay_key_write_saved = @@delay_key_write; 1598 1599SET GLOBAL delay_key_write = ON; 1600SELECT @@delay_key_write; 1601@@delay_key_write 1602ON 1603 1604SET GLOBAL delay_key_write = OF; 1605ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'OF' 1606SELECT @@delay_key_write; 1607@@delay_key_write 1608ON 1609 1610SET GLOBAL delay_key_write = AL; 1611ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'AL' 1612SELECT @@delay_key_write; 1613@@delay_key_write 1614ON 1615 1616SET GLOBAL delay_key_write = OFF; 1617SELECT @@delay_key_write; 1618@@delay_key_write 1619OFF 1620 1621SET GLOBAL delay_key_write = ALL; 1622SELECT @@delay_key_write; 1623@@delay_key_write 1624ALL 1625 1626SET GLOBAL delay_key_write = @delay_key_write_saved; 1627 1628# Checking sql_safe_updates... 1629SET @sql_safe_updates_saved = @@sql_safe_updates; 1630 1631SET @@sql_safe_updates = ON; 1632SELECT @@sql_safe_updates; 1633@@sql_safe_updates 16341 1635 1636SET @@sql_safe_updates = OF; 1637ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of 'OF' 1638SELECT @@sql_safe_updates; 1639@@sql_safe_updates 16401 1641 1642SET @@sql_safe_updates = OFF; 1643SELECT @@sql_safe_updates; 1644@@sql_safe_updates 16450 1646 1647SET @@sql_safe_updates = @sql_safe_updates_saved; 1648 1649# Checking foreign_key_checks... 1650SET @foreign_key_checks_saved = @@foreign_key_checks; 1651 1652SET @@foreign_key_checks = ON; 1653SELECT @@foreign_key_checks; 1654@@foreign_key_checks 16551 1656 1657SET @@foreign_key_checks = OF; 1658ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'OF' 1659SELECT @@foreign_key_checks; 1660@@foreign_key_checks 16611 1662 1663SET @@foreign_key_checks = OFF; 1664SELECT @@foreign_key_checks; 1665@@foreign_key_checks 16660 1667 1668SET @@foreign_key_checks = @foreign_key_checks_saved; 1669 1670# Checking unique_checks... 1671SET @unique_checks_saved = @@unique_checks; 1672 1673SET @@unique_checks = ON; 1674SELECT @@unique_checks; 1675@@unique_checks 16761 1677 1678SET @@unique_checks = OF; 1679ERROR 42000: Variable 'unique_checks' can't be set to the value of 'OF' 1680SELECT @@unique_checks; 1681@@unique_checks 16821 1683 1684SET @@unique_checks = OFF; 1685SELECT @@unique_checks; 1686@@unique_checks 16870 1688 1689SET @@unique_checks = @unique_checks_saved; 1690 1691# Checking sql_buffer_result... 1692SET @sql_buffer_result_saved = @@sql_buffer_result; 1693 1694SET @@sql_buffer_result = ON; 1695SELECT @@sql_buffer_result; 1696@@sql_buffer_result 16971 1698 1699SET @@sql_buffer_result = OF; 1700ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of 'OF' 1701SELECT @@sql_buffer_result; 1702@@sql_buffer_result 17031 1704 1705SET @@sql_buffer_result = OFF; 1706SELECT @@sql_buffer_result; 1707@@sql_buffer_result 17080 1709 1710SET @@sql_buffer_result = @sql_buffer_result_saved; 1711 1712# Checking sql_quote_show_create... 1713SET @sql_quote_show_create_saved = @@sql_quote_show_create; 1714 1715SET @@sql_quote_show_create = ON; 1716SELECT @@sql_quote_show_create; 1717@@sql_quote_show_create 17181 1719 1720SET @@sql_quote_show_create = OF; 1721ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'OF' 1722SELECT @@sql_quote_show_create; 1723@@sql_quote_show_create 17241 1725 1726SET @@sql_quote_show_create = OFF; 1727SELECT @@sql_quote_show_create; 1728@@sql_quote_show_create 17290 1730 1731SET @@sql_quote_show_create = @sql_quote_show_create_saved; 1732 1733# End of Bug#34828. 1734 1735# Make sure we can manipulate with autocommit in the 1736# along with other variables. 1737drop table if exists t1; 1738drop function if exists t1_max; 1739drop function if exists t1_min; 1740create table t1 (a int) engine=innodb; 1741insert into t1(a) values (0), (1); 1742create function t1_max() returns int return (select max(a) from t1); 1743create function t1_min() returns int return (select min(a) from t1); 1744select t1_min(); 1745t1_min() 17460 1747select t1_max(); 1748t1_max() 17491 1750set @@session.autocommit=t1_min(), @@session.autocommit=t1_max(), 1751@@session.autocommit=t1_min(), @@session.autocommit=t1_max(), 1752@@session.autocommit=t1_min(), @@session.autocommit=t1_max(); 1753# Cleanup. 1754drop table t1; 1755drop function t1_min; 1756drop function t1_max; 1757# 1758# Bug #59884: setting charset to 2048 crashes 1759# 1760set session character_set_results = 2048; 1761ERROR 42000: Unknown character set: '2048' 1762set session character_set_client=2048; 1763ERROR 42000: Unknown character set: '2048' 1764set session character_set_connection=2048; 1765ERROR 42000: Unknown character set: '2048' 1766set session character_set_server=2048; 1767ERROR 42000: Unknown character set: '2048' 1768set session collation_server=2048; 1769ERROR HY000: Unknown collation: '2048' 1770set session character_set_filesystem=2048; 1771ERROR 42000: Unknown character set: '2048' 1772set session character_set_database=2048; 1773ERROR 42000: Unknown character set: '2048' 1774set session collation_connection=2048; 1775ERROR HY000: Unknown collation: '2048' 1776set session collation_database=2048; 1777ERROR HY000: Unknown collation: '2048' 1778End of 5.5 tests