Server IP : 104.21.38.3 / Your IP : 172.68.164.11 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/r/ |
Upload File : |
'#________________________VAR_02_query_cache_size__________________#' echo '##' --echo '#---------------------WL6372_VAR_2_01----------------------#' #################################################################### # Checking default value # #################################################################### SELECT COUNT(@@GLOBAL.query_cache_size) 1 Expected SELECT @@GLOBAL.query_cache_size; @@GLOBAL.query_cache_size 1048576 Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. 1048576 Expected '#---------------------WL6372_VAR_2_02----------------------#' # Restart server with query_cache_size 51200; SELECT @@GLOBAL.query_cache_size; @@GLOBAL.query_cache_size 51200 Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. 51200 Expected SET @@GLOBAL.query_cache_size=DEFAULT; Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. SELECT @@GLOBAL.query_cache_size; @@GLOBAL.query_cache_size 1048576 Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. 1048576 Expected '#---------------------WL6372_VAR_2_03----------------------#' SET @@local.query_cache_size=1; ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL Expected error 'Global variable' SET @@session.query_cache_size=1; ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL Expected error 'Global variable' SET @@GLOBAL.query_cache_size=1; SET @@GLOBAL.query_cache_size=DEFAULT; Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. SELECT @@GLOBAL.query_cache_size; @@GLOBAL.query_cache_size 1048576 Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. 1048576 Expected '#---------------------WL6372_VAR_2_04----------------------#' SELECT @@GLOBAL.query_cache_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='query_cache_size'; @@GLOBAL.query_cache_size = VARIABLE_VALUE 1 1 Expected SELECT COUNT(@@GLOBAL.query_cache_size); COUNT(@@GLOBAL.query_cache_size) 1 Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. 1 Expected SELECT COUNT(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='query_cache_size'; COUNT(VARIABLE_VALUE) 1 1 Expected '#---------------------WL6372_VAR_2_05----------------------#' SELECT @@query_cache_size = @@GLOBAL.query_cache_size; @@query_cache_size = @@GLOBAL.query_cache_size 1 Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. 1 Expected SELECT COUNT(@@local.query_cache_size); ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable Expected error 'Variable is a GLOBAL variable' SELECT COUNT(@@SESSION.query_cache_size); ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable Expected error 'Variable is a GLOBAL variable' SELECT COUNT(@@GLOBAL.query_cache_size); COUNT(@@GLOBAL.query_cache_size) 1 Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. 1 Expected SELECT query_cache_size = @@SESSION.query_cache_size; ERROR 42S22: Unknown column 'query_cache_size' in 'field list' Expected error 'Unknown column query_cache_size in field list' '#---------------------WL6372_VAR_2_06----------------------#' Check the size of the vardir The output size is in unit blocks TRUE TRUE Expected '#---------------------WL6372_VAR_2_07----------------------#' # create 1 table and insert 3 rows each DROP TABLE IF EXISTS tab1; =============== create table & Index =============== CREATE TABLE tab1 (col_1 text(10)) ENGINE=INNODB ; =============== Load the data =============== SET @col_1 = repeat('a', 10); INSERT INTO tab1 VALUES (@col_1); INSERT INTO tab1 VALUES (@col_1); INSERT INTO tab1 VALUES (@col_1); commit; set @@GLOBAL.query_cache_size=DEFAULT; Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. select 1 from tab1 limit 1; 1 1 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_hits'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_inserts'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_queries_in_cache'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value 17 17 Expected select 1 from tab1 limit 1; 1 1 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_hits'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_inserts'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_queries_in_cache'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value 22 22 Expected select 1 from tab1 limit 2; 1 1 1 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_hits'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_inserts'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_queries_in_cache'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value 27 27 Expected # Restart server with query_cache_type ON select 1 from tab1 limit 1; 1 1 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_hits'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_inserts'; variable_value 1 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_queries_in_cache'; variable_value 1 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value 8 8 Expected select 1 from tab1 limit 2; 1 1 1 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_hits'; variable_value 0 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_inserts'; variable_value 2 2 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_queries_in_cache'; variable_value 2 2 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value 12 12 Expected select 1 from tab1 limit 1; 1 1 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_hits'; variable_value 1 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_inserts'; variable_value 2 2 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_queries_in_cache'; variable_value 2 2 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value 16 16 Expected # opening another client session select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value 17 17 Expected #cleanup DROP TABLE IF EXISTS tab1;