1'#--------------------FN_DYNVARS_023_01-------------------------#' 2SET @start_value= @@global.delay_key_write; 3SET @@global.delay_key_write = ON; 4SELECT @@global.delay_key_write; 5@@global.delay_key_write 6ON 7'connect (user1,localhost,root,,,,)' 8'connection user1' 9SELECT @@global.delay_key_write AS res_is_ON; 10res_is_ON 11ON 12SET @@global.delay_key_write = ALL; 13'connect (user1,localhost,root,,,,)' 14'connection user1' 15SELECT @@global.delay_key_write AS res_is_ALL; 16res_is_ALL 17ALL 18'#--------------------FN_DYNVARS_023_02-------------------------#' 19'---check when delay_key_write is OFF---' 20SET @@global.delay_key_write = OFF; 21FLUSH STATUS; 22CALL sp_addRecords(1,10); 23SHOW STATUS LIKE 'Key_reads'; 24Variable_name Value 25Key_reads 0 26SHOW STATUS LIKE 'Key_writes'; 27Variable_name Value 28Key_writes 9 29SHOW STATUS LIKE 'Key_write_requests'; 30Variable_name Value 31Key_write_requests 9 32SELECT COUNT(*) FROM t1; 33COUNT(*) 349 35'----check when delay_key_write is ON---' 36SET @@global.delay_key_write = ON; 37FLUSH STATUS; 38CALL sp_addRecords(1,10); 39SHOW STATUS LIKE 'Key_reads'; 40Variable_name Value 41Key_reads 0 42SHOW STATUS LIKE 'Key_writes'; 43Variable_name Value 44Key_writes 0 45SHOW STATUS LIKE 'Key_write_requests'; 46Variable_name Value 47Key_write_requests 9 48SELECT COUNT(*) FROM t1; 49COUNT(*) 509 51'----check when delay_key_write is ALL---' 52SET @@global.delay_key_write = ALL; 53FLUSH STATUS; 54CALL sp_addRecords(1,10); 55SHOW STATUS LIKE 'Key_reads'; 56Variable_name Value 57Key_reads 0 58SHOW STATUS LIKE 'Key_writes'; 59Variable_name Value 60Key_writes 0 61SHOW STATUS LIKE 'Key_write_requests'; 62Variable_name Value 63Key_write_requests 9 64SELECT COUNT(*) FROM t1; 65COUNT(*) 669 67DROP PROCEDURE sp_addRecords; 68DROP TABLE t1; 69SET @@global.delay_key_write= @start_value; 70