403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/suite/sys_vars/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/suite/sys_vars/t/delay_key_write_func.test
##################### mysql-test\t\delay_key_write_func.test  #################
#                                                                             #
# Variable Name: delay_key_write                                              #
# Scope: GLOBAL                                                               #
# Access Type: Dynamic                                                        #
# Data Type: enumeration                                                      #
# Default Value: ON                                                           #
# Valid Values: ON, OFF & ALL                                                 #
#                                                                             #
#                                                                             #
# Creation Date: 2008-03-08                                                   #
# Author:  Rizwan                                                             #
#                                                                             #
# Description: Test Cases of Dynamic System Variable delay_key_write          #
#              that checks the behavior of this variable                      #
#                                                                             #
# Reference:                                                                  #
#  http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html        #
#                                                                             #
###############################################################################

--echo '#--------------------FN_DYNVARS_023_01-------------------------#'
SET @start_value= @@global.delay_key_write;

--echo '#--------------------FN_DYNVARS_023_02-------------------------#'
######################################################
# Begin the functionality Testing of delay_key_write #
######################################################

# create procedure to add rows
DELIMITER //;
CREATE PROCEDURE sp_addRecords (IN var1 INT,IN var2 INT)
BEGIN
   WHILE (var1 < var2) DO
      INSERT INTO t1 VALUES(var1,REPEAT('MYSQL',10),100000.0/var1);
      SET var1=var1+1;
   END WHILE;
END//
DELIMITER ;//

#==============================================================================
--echo '---check when delay_key_write is OFF---'
#==============================================================================

SET @@global.delay_key_write = OFF;

# create a table with delay_key_write enabled
CREATE TABLE t1(
a INT PRIMARY KEY,
b VARCHAR(512),
c DOUBLE
) DELAY_KEY_WRITE = 1;

FLUSH STATUS;

CALL sp_addRecords(1,10);

SHOW STATUS LIKE 'Key_reads';
SHOW STATUS LIKE 'Key_writes';
SHOW STATUS LIKE 'Key_write_requests';
SELECT COUNT(*) FROM t1;
DROP TABLE t1;

#==============================================================================
--echo '----check when delay_key_write is ON---'
#==============================================================================

SET @@global.delay_key_write = ON;

# create a table with delay_key_write enabled
CREATE TABLE t1(
a INT PRIMARY KEY,
b VARCHAR(512),
c DOUBLE
) DELAY_KEY_WRITE = 1;

FLUSH STATUS;
CALL sp_addRecords(1,10);

SHOW STATUS LIKE 'Key_reads';
SHOW STATUS LIKE 'Key_writes';
SHOW STATUS LIKE 'Key_write_requests';
SELECT COUNT(*) FROM t1;
DROP TABLE t1;

#==============================================================================
--echo '----check when delay_key_write is ALL---'
#==============================================================================
SET @@global.delay_key_write = ALL;

# create a table with delay_key_write disabled
CREATE TABLE t1(
a INT PRIMARY KEY,
b VARCHAR(512),
c DOUBLE
) DELAY_KEY_WRITE = 0;

FLUSH STATUS;
CALL sp_addRecords(1,10);

SHOW STATUS LIKE 'Key_reads';
SHOW STATUS LIKE 'Key_writes';
SHOW STATUS LIKE 'Key_write_requests';
SELECT COUNT(*) FROM t1;

DROP PROCEDURE sp_addRecords;
DROP TABLE t1;

SET @@global.delay_key_write= @start_value;

####################################################
# End of functionality testing for delay_key_write #
####################################################

Youez - 2016 - github.com/yon3zu
LinuXploit