Commit 8ac45fb0 authored by Leonard Zhou's avatar Leonard Zhou

Merge

parents bcf70ef6 fcf6712e
......@@ -23,6 +23,7 @@
# #
###############################################################################
--source include/not_embedded.inc
--source include/load_sysvars.inc
###################################################################
......
......@@ -23,6 +23,7 @@
# #
###############################################################################
--source include/not_embedded.inc
--source include/load_sysvars.inc
##################################################################
......
......@@ -44,7 +44,7 @@ SET @@global.binlog_cache_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
SET @@global.binlog_cache_size = -1024;
Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '0'
Warning 1292 Truncated incorrect binlog_cache_size value: '-1024'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
......
......@@ -68,6 +68,8 @@ SELECT @@global.bulk_insert_buffer_size;
@@global.bulk_insert_buffer_size
4294967295
SET @@global.bulk_insert_buffer_size = -1024;
Warnings:
Warning 1292 Truncated incorrect bulk_insert_buffer_size value: '-1024'
SELECT @@global.bulk_insert_buffer_size;
@@global.bulk_insert_buffer_size
0
......@@ -84,6 +86,8 @@ SELECT @@session.bulk_insert_buffer_size;
@@session.bulk_insert_buffer_size
4294967295
SET @@session.bulk_insert_buffer_size = -2;
Warnings:
Warning 1292 Truncated incorrect bulk_insert_buffer_size value: '-2'
SELECT @@session.bulk_insert_buffer_size;
@@session.bulk_insert_buffer_size
0
......
......@@ -35,7 +35,7 @@ SELECT @@global.delayed_insert_limit;
1
SET @@global.delayed_insert_limit = -1024;
Warnings:
Warning 1292 Truncated incorrect delayed_insert_limit value: '0'
Warning 1292 Truncated incorrect delayed_insert_limit value: '-1024'
SELECT @@global.delayed_insert_limit;
@@global.delayed_insert_limit
1
......
......@@ -3,98 +3,75 @@
Creating connection con0
Creating connection con1
SET @global_delayed_insert_limit = @@GLOBAL.delayed_insert_limit;
CREATE TABLE t1 (a varchar(100));
CREATE TABLE t1 (a VARCHAR(100),b VARCHAR(100),c VARCHAR(100));
'#--------------------FN_DYNVARS_25_01-------------------------#'
SET GLOBAL delayed_insert_limit = 9;
** Connection con0 **
SET GLOBAL delayed_insert_limit = 9;
** Connection con1 **
SET GLOBAL delayed_insert_limit = 9;
** Connection default **
SET GLOBAL delayed_insert_limit = 9;
INSERT INTO t1 VALUES('1');
INSERT INTO t1 VALUES('2');
INSERT INTO t1 VALUES('3');
INSERT INTO t1 VALUES('4');
INSERT INTO t1 VALUES('5');
INSERT INTO t1 VALUES('6');
SET GLOBAL delayed_insert_limit = 14;
INSERT INTO t1 VALUES('1','1','1');
INSERT INTO t1 VALUES('2','1','1');
INSERT INTO t1 VALUES('3','1','1');
INSERT INTO t1 VALUES('4','1','1');
INSERT INTO t1 VALUES('5','1','1');
INSERT INTO t1 VALUES('6','1','1');
LOCK TABLE t1 WRITE;
** Connection con1 **
INSERT DELAYED INTO t1 VALUES('7');
INSERT DELAYED INTO t1 VALUES('8');
INSERT DELAYED INTO t1 VALUES('9');
INSERT DELAYED INTO t1 VALUES('10');
INSERT DELAYED INTO t1 VALUES('11');
INSERT DELAYED INTO t1 VALUES('12');
INSERT DELAYED INTO t1 VALUES('13');
INSERT DELAYED INTO t1 VALUES('14');
INSERT DELAYED INTO t1 VALUES('15');
INSERT DELAYED INTO t1 VALUES('16');
INSERT DELAYED INTO t1 VALUES('17');
INSERT DELAYED INTO t1 VALUES('18');
INSERT DELAYED INTO t1 VALUES('19');
INSERT DELAYED INTO t1 VALUES('20');
INSERT DELAYED INTO t1 VALUES('21');
INSERT DELAYED INTO t1 VALUES('22');|
INSERT DELAYED INTO t1 VALUES('7','1','1');
INSERT DELAYED INTO t1 VALUES('8','1','1');
INSERT DELAYED INTO t1 VALUES('9','1','1');
INSERT DELAYED INTO t1 VALUES('10','1','1');
INSERT DELAYED INTO t1 VALUES('11','1','1');
INSERT DELAYED INTO t1 VALUES('12','1','1');
INSERT DELAYED INTO t1 VALUES('13','1','1');
INSERT DELAYED INTO t1 VALUES('14','1','1');
INSERT DELAYED INTO t1 VALUES('15','1','1');
INSERT DELAYED INTO t1 VALUES('16','1','1');
INSERT DELAYED INTO t1 VALUES('17','1','1');
INSERT DELAYED INTO t1 VALUES('18','1','1');
INSERT DELAYED INTO t1 VALUES('19','1','1');
INSERT DELAYED INTO t1 VALUES('20','1','1');
INSERT DELAYED INTO t1 VALUES('21','1','1');
INSERT DELAYED INTO t1 VALUES('22','1','1');
INSERT DELAYED INTO t1 VALUES('23','1','1');
INSERT DELAYED INTO t1 VALUES('24','1','1');
INSERT DELAYED INTO t1 VALUES('25','1','1');
INSERT DELAYED INTO t1 VALUES('26','1','1');
INSERT DELAYED INTO t1 VALUES('27','1','1');
INSERT DELAYED INTO t1 VALUES('28','1','1');
INSERT DELAYED INTO t1 VALUES('29','1','1');
INSERT DELAYED INTO t1 VALUES('30','1','1');
INSERT DELAYED INTO t1 VALUES('31','1','1');
INSERT DELAYED INTO t1 VALUES('32','1','1');
INSERT DELAYED INTO t1 VALUES('33','1','1');
INSERT DELAYED INTO t1 VALUES('34','1','1');
INSERT DELAYED INTO t1 VALUES('35','1','1');
INSERT DELAYED INTO t1 VALUES('36','1','1');
INSERT DELAYED INTO t1 VALUES('37','1','1');
INSERT DELAYED INTO t1 VALUES('38','1','1');
INSERT DELAYED INTO t1 VALUES('39','1','1');
INSERT DELAYED INTO t1 VALUES('40','1','1');
INSERT DELAYED INTO t1 VALUES('41','1','1');
INSERT DELAYED INTO t1 VALUES('42','1','1');
INSERT DELAYED INTO t1 VALUES('43','1','1');|
** Connection con0 **
SELECT * FROM t1;|
SELECT COUNT(*) FROM t1;
** Connection default **
Waiting for 1 sec
** Wait till con0 is blocked **
UNLOCK TABLES;
** Connection con1 **
Asynchronous "reap" result
** Connection con0 **
a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'Bug#35386: insert delayed inserts 1 + limit rows instead of just limit rows'
Asynchronous "reap" result
The next result suffers from
'# Bug#35386 insert delayed inserts 1 + limit rows instead of just limit rows'
COUNT(*)
21
** Connection default **
Waiting for 1 sec
Checking if the delayed insert continued afterwards
SELECT * FROM t1;
a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DELETE FROM t1;
SELECT COUNT(*) FROM t1;
COUNT(*)
43
DROP TABLE t1;
'#--------------------FN_DYNVARS_25_02-------------------------#'
SET GLOBAL delayed_insert_limit = 20;
** Connection con0 **
SET GLOBAL delayed_insert_limit = 20;
** Connection con1 **
SET GLOBAL delayed_insert_limit = 20;
** Connection default **
CREATE TABLE t1 (a VARCHAR(100));
SET GLOBAL delayed_insert_limit = 20;
INSERT INTO t1 VALUES('1');
INSERT INTO t1 VALUES('2');
......@@ -123,64 +100,21 @@ INSERT DELAYED INTO t1 VALUES('21');
INSERT DELAYED INTO t1 VALUES('22');|
** Connection con0 **
Asynchronous execute
SELECT * FROM t1;|
SELECT COUNT(*) = 22 FROM t1;
** Connection default **
Waiting for 1 sec
** Wait till con0 is blocked **
UNLOCK TABLES;
** Connection con1 **
** Connection con0 **
Asynchronous execute result
a
Asynchronous "reap" result
COUNT(*) = 22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
** Connection default**
Waiting for 1 sec
Checking if the delayed insert gives the same result afterwards
SELECT * FROM t1;
a
SELECT COUNT(*) = 22 FROM t1;
COUNT(*) = 22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DELETE FROM t1;
Switching to default
Disconnecting from con1, con0
** Connection default**
DROP TABLE t1;
SET @@GLOBAL.delayed_insert_limit = @global_delayed_insert_limit;
Disconnecting from con1, con0
......@@ -35,7 +35,7 @@ SELECT @@global.delayed_queue_size;
1
SET @@global.delayed_queue_size = -1024;
Warnings:
Warning 1292 Truncated incorrect delayed_queue_size value: '0'
Warning 1292 Truncated incorrect delayed_queue_size value: '-1024'
SELECT @@global.delayed_queue_size;
@@global.delayed_queue_size
1
......
drop table if exists t1;
## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30)
);
'#--------------------FN_DYNVARS_018_01-------------------------#'
## Setting initial value of variable to ON ##
SET @@global.event_scheduler = ON;
SELECT @@event_scheduler;
@@event_scheduler
ON
## Creating new event ##
CREATE EVENT test_event_1
ON SCHEDULE EVERY 3 SECOND
DO
INSERT into t1(name) values('Record_1');
SELECT * from t1;
id name
1 Record_1
2 Record_1
DROP EVENT test_event_1;
DELETE from t1;
select * from t1;
id name
'#--------------------FN_DYNVARS_018_02-------------------------#'
## Setting value of variable to OFF ##
SET @@global.event_scheduler = OFF;
SELECT @@event_scheduler;
@@event_scheduler
OFF
## Creating new event ##
CREATE EVENT test_event_1
ON SCHEDULE EVERY 3 SECOND
DO
INSERT into t1(name) values('Record_2');
## Table should be empty ##
SELECT * from t1;
id name
DROP EVENT test_event_1;
## Dropping table ##
DROP table t1;
......@@ -70,7 +70,7 @@ FROM articles WHERE MATCH (title,body)
AGAINST ('+security configuring' IN BOOLEAN MODE);
id title body relevance
8 MySQL Security When configured properly, MySQL ... 1
9 Database Security Configuring MySQL for ... 1.3333333730698
9 Database Security Configuring MySQL for ... 1.33333337306976
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('"faster than"' IN BOOLEAN MODE);
id title body
......@@ -91,7 +91,7 @@ AGAINST ('+MySQL +(>show <dbms)' IN BOOLEAN MODE)
ORDER BY relevance DESC;
id title body relevance
4 Optimizing MySQL In this tutorial we will show .... Run command line ... 1.25
1 MySQL Tutorial DBMS stands for DataBase ... 0.83333337306976
1 MySQL Tutorial DBMS stands for DataBase ... 0.833333373069763
'---try setting different operators. Default '+ -><()~*:""&|'--'
SET @@global.ft_boolean_syntax='~ /!@#$%^&*()-';
SELECT * FROM articles WHERE MATCH (title,body)
......
......@@ -9,22 +9,27 @@ name VARCHAR(30)
'#--------------------FN_DYNVARS_052_01-------------------------#'
## Setting initial value of variable to 1 ##
SET @@global.interactive_timeout = 1;
## Creating new interactive connection test_con1 ##
## Creating new connection test_con1 ##
## Inserting record in table ##
INSERT into t1(name) values('Record_1');
## Setting session value of interactive_timeout ##
## Setting session value of interactive_timeout ##
SET @@session.interactive_timeout = 1;
## Verifying values of variable ##
## Verifying values of variable ##
SELECT @@session.interactive_timeout;
@@session.interactive_timeout
1
SELECT @@global.interactive_timeout;
@@global.interactive_timeout
1
## Using sleep to check timeout ##
connection default;
## Using sleep to check timeout ##
sleep 2;
connection test_con1;
SELECT * from t1;
id name
1 Record_1
'Bug#35377: Error should appear here because interactive_timeout value';
'is 1 and connection remains idle for 5 secs';
INSERT into t1(name) values('Record_2');
connection default;
disconnect test_con1;
DROP TABLE t1;
SET @@global.interactive_timeout= 28800;
......@@ -75,7 +75,7 @@ SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
1
SET @@global.join_buffer_size = -1024;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
Warning 1292 Truncated incorrect join_buffer_size value: '-1024'
SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
1
......@@ -109,7 +109,7 @@ SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
1
SET @@session.join_buffer_size = -2;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
Warning 1292 Truncated incorrect join_buffer_size value: '-2'
SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
@@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
1
......
......@@ -17,8 +17,6 @@ SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size BETWEEN 8 AND 36
1
SET @@global.key_buffer_size = 1800;
Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1800'
SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size BETWEEN 8 AND 36
1
......@@ -55,13 +53,13 @@ SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size BETWEEN 8 AND 36
1
'#----------------------FN_DYNVARS_055_06------------------------#'
SELECT @@global.key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
SELECT @@global.key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size';
@@global.key_buffer_size = VARIABLE_VALUE
1
SELECT @@key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
SELECT @@key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size';
@@key_buffer_size = VARIABLE_VALUE
1
......
......@@ -37,10 +37,14 @@ SELECT @@global.key_cache_age_threshold;
'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
'#--------------------FN_DYNVARS_056_04-------------------------#'
SET @@global.key_cache_age_threshold = -1;
Warnings:
Warning 1292 Truncated incorrect key_cache_age_threshold value: '18446744073709551615'
SELECT @@global.key_cache_age_threshold;
@@global.key_cache_age_threshold
4294967200
SET @@global.key_cache_age_threshold = 42949672951;
Warnings:
Warning 1292 Truncated incorrect key_cache_age_threshold value: '42949672951'
SELECT @@global.key_cache_age_threshold;
@@global.key_cache_age_threshold
4294967200
......@@ -50,9 +54,11 @@ SELECT @@global.key_cache_age_threshold;
@@global.key_cache_age_threshold
4294967200
SET @@global.key_cache_age_threshold = -1024;
Warnings:
Warning 1292 Truncated incorrect key_cache_age_threshold value: '18446744073709550592'
SELECT @@global.key_cache_age_threshold;
@@global.key_cache_age_threshold
4294966200
4294967200
SET @@global.key_cache_age_threshold = 99;
Warnings:
Warning 1292 Truncated incorrect key_cache_age_threshold value: '99'
......
......@@ -36,13 +36,13 @@ SELECT @@global.key_cache_block_size;
'#--------------------FN_DYNVARS_057_04-------------------------#'
SET @@global.key_cache_block_size = -1;
Warnings:
Warning 1292 Truncated incorrect key_cache_block_size value: '4294967295'
Warning 1292 Truncated incorrect key_cache_block_size value: '18446744073709551615'
SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
16384
SET @@global.key_cache_block_size = 42949672951;
Warnings:
Warning 1292 Truncated incorrect key_cache_block_size value: '4294967287'
Warning 1292 Truncated incorrect key_cache_block_size value: '42949672951'
SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
16384
......@@ -53,7 +53,7 @@ SELECT @@global.key_cache_block_size;
16384
SET @@global.key_cache_block_size = -1024;
Warnings:
Warning 1292 Truncated incorrect key_cache_block_size value: '4294966272'
Warning 1292 Truncated incorrect key_cache_block_size value: '18446744073709550592'
SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
16384
......
......@@ -35,7 +35,7 @@ SELECT @@global.key_cache_division_limit;
'#--------------------FN_DYNVARS_058_04-------------------------#'
SET @@global.key_cache_division_limit = -1;
Warnings:
Warning 1292 Truncated incorrect key_cache_division_limit value: '4294967295'
Warning 1292 Truncated incorrect key_cache_division_limit value: '18446744073709551615'
SELECT @@global.key_cache_division_limit;
@@global.key_cache_division_limit
100
......@@ -52,7 +52,7 @@ SELECT @@global.key_cache_division_limit;
100
SET @@global.key_cache_division_limit = -1024;
Warnings:
Warning 1292 Truncated incorrect key_cache_division_limit value: '4294966272'
Warning 1292 Truncated incorrect key_cache_division_limit value: '18446744073709550592'
SELECT @@global.key_cache_division_limit;
@@global.key_cache_division_limit
100
......
......@@ -76,6 +76,8 @@ SELECT @@global.log_warnings;
@@global.log_warnings
4294967295
SET @@global.log_warnings = -1024;
Warnings:
Warning 1292 Truncated incorrect log_warnings value: '-1024'
SELECT @@global.log_warnings;
@@global.log_warnings
0
......@@ -96,6 +98,8 @@ SELECT @@session.log_warnings;
@@session.log_warnings
4294967295
SET @@session.log_warnings = -2;
Warnings:
Warning 1292 Truncated incorrect log_warnings value: '-2'
SELECT @@session.log_warnings;
@@session.log_warnings
0
......
......@@ -39,7 +39,7 @@ SELECT @@global.max_binlog_cache_size;
'#--------------------FN_DYNVARS_072_04-------------------------#'
SET @@global.max_binlog_cache_size = -1;
Warnings:
Warning 1292 Truncated incorrect max_binlog_cache_size value: '0'
Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
4096
......@@ -56,7 +56,7 @@ SELECT @@global.max_binlog_cache_size;
4294963200
SET @@global.max_binlog_cache_size = -1024;
Warnings:
Warning 1292 Truncated incorrect max_binlog_cache_size value: '0'
Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1024'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
4096
......
......@@ -39,7 +39,7 @@ SELECT @@global.max_connect_errors;
'#--------------------FN_DYNVARS_073_04-------------------------#'
SET @@global.max_connect_errors = -1;
Warnings:
Warning 1292 Truncated incorrect max_connect_errors value: '0'
Warning 1292 Truncated incorrect max_connect_errors value: '-1'
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
1
......@@ -56,7 +56,7 @@ SELECT @@global.max_connect_errors;
4294967295
SET @@global.max_connect_errors = -1024;
Warnings:
Warning 1292 Truncated incorrect max_connect_errors value: '0'
Warning 1292 Truncated incorrect max_connect_errors value: '-1024'
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
1
......
......@@ -40,10 +40,14 @@ SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
64512
SET @@global.max_heap_table_size = 4294967294;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '4294967294'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
4294966272
SET @@global.max_heap_table_size = 4294967295;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '4294967295'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
4294966272
......@@ -62,10 +66,14 @@ SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
64512
SET @@session.max_heap_table_size = 4294967294;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '4294967294'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
4294966272
SET @@session.max_heap_table_size = 4294967295;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '4294967295'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
4294966272
......@@ -73,13 +81,13 @@ SELECT @@session.max_heap_table_size;
'#------------------FN_DYNVARS_077_05-----------------------#'
SET @@global.max_heap_table_size = -1;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '0'
Warning 1292 Truncated incorrect max_heap_table_size value: '-1'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
16384
SET @@global.max_heap_table_size = -1024;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '0'
Warning 1292 Truncated incorrect max_heap_table_size value: '-1024'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
16384
......@@ -96,6 +104,8 @@ SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
16384
SET @@global.max_heap_table_size = 4294967296;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '4294967296'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
4294966272
......@@ -111,7 +121,7 @@ SELECT @@global.max_heap_table_size;
4294966272
SET @@session.max_heap_table_size = -1;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '0'
Warning 1292 Truncated incorrect max_heap_table_size value: '-1'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
16384
......@@ -122,12 +132,16 @@ SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
16384
SET @@session.max_heap_table_size = 4294967296;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '4294967296'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
4294966272
SET @@session.max_heap_table_size = 65530.34.;
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
SET @@session.max_heap_table_size = 10737418241;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '10737418241'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
4294966272
......
......@@ -77,7 +77,7 @@ SELECT @@global.max_seeks_for_key;
1
SET @@global.max_seeks_for_key = -1024;
Warnings:
Warning 1292 Truncated incorrect max_seeks_for_key value: '0'
Warning 1292 Truncated incorrect max_seeks_for_key value: '-1024'
SELECT @@global.max_seeks_for_key;
@@global.max_seeks_for_key
1
......@@ -105,7 +105,7 @@ SELECT @@session.max_seeks_for_key;
1
SET @@session.max_seeks_for_key = -2;
Warnings:
Warning 1292 Truncated incorrect max_seeks_for_key value: '0'
Warning 1292 Truncated incorrect max_seeks_for_key value: '-2'
SELECT @@session.max_seeks_for_key;
@@session.max_seeks_for_key
1
......
......@@ -71,7 +71,7 @@ SELECT @@session.max_tmp_tables;
'#------------------FN_DYNVARS_086_05-----------------------#'
SET @@global.max_tmp_tables = -1024;
Warnings:
Warning 1292 Truncated incorrect max_tmp_tables value: '0'
Warning 1292 Truncated incorrect max_tmp_tables value: '-1024'
SELECT @@global.max_tmp_tables;
@@global.max_tmp_tables
1
......@@ -83,7 +83,7 @@ SELECT @@global.max_tmp_tables;
4294967295
SET @@global.max_tmp_tables = -1;
Warnings:
Warning 1292 Truncated incorrect max_tmp_tables value: '0'
Warning 1292 Truncated incorrect max_tmp_tables value: '-1'
SELECT @@global.max_tmp_tables;
@@global.max_tmp_tables
1
......@@ -111,7 +111,7 @@ SELECT @@session.max_tmp_tables;
4294967295
SET @@session.max_tmp_tables = -1;
Warnings:
Warning 1292 Truncated incorrect max_tmp_tables value: '0'
Warning 1292 Truncated incorrect max_tmp_tables value: '-1'
SELECT @@session.max_tmp_tables;
@@session.max_tmp_tables
1
......@@ -123,7 +123,7 @@ SELECT @@session.max_tmp_tables;
4294967295
SET @@session.max_tmp_tables = -001;
Warnings:
Warning 1292 Truncated incorrect max_tmp_tables value: '0'
Warning 1292 Truncated incorrect max_tmp_tables value: '-1'
SELECT @@session.max_tmp_tables;
@@session.max_tmp_tables
1
......
......@@ -37,7 +37,7 @@ SELECT @@global.max_write_lock_count;
'#------------------FN_DYNVARS_088_04-----------------------#'
SET @@global.max_write_lock_count = -1024;
Warnings:
Warning 1292 Truncated incorrect max_write_lock_count value: '0'
Warning 1292 Truncated incorrect max_write_lock_count value: '-1024'
SELECT @@global.max_write_lock_count;
@@global.max_write_lock_count
1
......@@ -49,7 +49,7 @@ SELECT @@global.max_write_lock_count;
4294967295
SET @@global.max_write_lock_count = -1;
Warnings:
Warning 1292 Truncated incorrect max_write_lock_count value: '0'
Warning 1292 Truncated incorrect max_write_lock_count value: '-1'
SELECT @@global.max_write_lock_count;
@@global.max_write_lock_count
1
......
......@@ -82,6 +82,8 @@ SELECT @@global.min_examined_row_limit;
@@global.min_examined_row_limit
429496726
SET @@global.min_examined_row_limit = -1024;
Warnings:
Warning 1292 Truncated incorrect min_examined_row_limit value: '-1024'
SELECT @@global.min_examined_row_limit;
@@global.min_examined_row_limit
0
......@@ -108,6 +110,8 @@ SELECT @@session.min_examined_row_limit;
@@session.min_examined_row_limit
4294967295
SET @@session.min_examined_row_limit = -1;
Warnings:
Warning 1292 Truncated incorrect min_examined_row_limit value: '-1'
SELECT @@session.min_examined_row_limit;
@@session.min_examined_row_limit
0
......
......@@ -83,7 +83,7 @@ SELECT @@global.multi_range_count;
4294967295
SET @@global.multi_range_count = -1024;
Warnings:
Warning 1292 Truncated incorrect multi_range_count value: '0'
Warning 1292 Truncated incorrect multi_range_count value: '-1024'
SELECT @@global.multi_range_count;
@@global.multi_range_count
1
......@@ -117,7 +117,7 @@ SELECT @@session.multi_range_count;
4294967295
SET @@session.multi_range_count = -1;
Warnings:
Warning 1292 Truncated incorrect multi_range_count value: '0'
Warning 1292 Truncated incorrect multi_range_count value: '-1'
SELECT @@session.multi_range_count;
@@session.multi_range_count
1
......
......@@ -48,14 +48,20 @@ SET @@local.myisam_max_sort_file_size = 4;
ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
'#------------------FN_DYNVARS_094_05-----------------------#'
SET @@global.myisam_max_sort_file_size = -1;
Warnings:
Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '-1'
SELECT @@global.myisam_max_sort_file_size;
@@global.myisam_max_sort_file_size
0
SET @@global.myisam_max_sort_file_size = -2147483648;
Warnings:
Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '-2147483648'
SELECT @@global.myisam_max_sort_file_size;
@@global.myisam_max_sort_file_size
0
SET @@global.myisam_max_sort_file_size = -2147483649;
Warnings:
Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '-2147483649'
SELECT @@global.myisam_max_sort_file_size;
@@global.myisam_max_sort_file_size
0
......
......@@ -61,7 +61,7 @@ SELECT @@global.myisam_repair_threads ;
1
SET @@global.myisam_repair_threads = -1024;
Warnings:
Warning 1292 Truncated incorrect myisam_repair_threads value: '0'
Warning 1292 Truncated incorrect myisam_repair_threads value: '-1024'
SELECT @@global.myisam_repair_threads ;
@@global.myisam_repair_threads
1
......@@ -104,7 +104,7 @@ SELECT @@session.myisam_repair_threads ;
1
SET @@session.myisam_repair_threads = -2;
Warnings:
Warning 1292 Truncated incorrect myisam_repair_threads value: '0'
Warning 1292 Truncated incorrect myisam_repair_threads value: '-2'
SELECT @@session.myisam_repair_threads ;
@@session.myisam_repair_threads
1
......
......@@ -61,7 +61,7 @@ SELECT @@global.myisam_sort_buffer_size ;
4
SET @@global.myisam_sort_buffer_size = -1024;
Warnings:
Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '0'
Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '-1024'
SELECT @@global.myisam_sort_buffer_size ;
@@global.myisam_sort_buffer_size
4
......@@ -104,7 +104,7 @@ SELECT @@session.myisam_sort_buffer_size ;
4
SET @@session.myisam_sort_buffer_size = -2;
Warnings:
Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '0'
Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '-2'
SELECT @@session.myisam_sort_buffer_size ;
@@session.myisam_sort_buffer_size
4
......
......@@ -77,7 +77,7 @@ SELECT @@global.net_retry_count;
1
SET @@global.net_retry_count = -1024;
Warnings:
Warning 1292 Truncated incorrect net_retry_count value: '0'
Warning 1292 Truncated incorrect net_retry_count value: '-1024'
SELECT @@global.net_retry_count;
@@global.net_retry_count
1
......@@ -111,7 +111,7 @@ SELECT @@session.net_retry_count;
1
SET @@session.net_retry_count = -2;
Warnings:
Warning 1292 Truncated incorrect net_retry_count value: '0'
Warning 1292 Truncated incorrect net_retry_count value: '-2'
SELECT @@session.net_retry_count;
@@session.net_retry_count
1
......
......@@ -86,7 +86,7 @@ SELECT @@global.query_alloc_block_size;
1024
SET @@global.query_alloc_block_size = -1;
Warnings:
Warning 1292 Truncated incorrect query_alloc_block_size value: '0'
Warning 1292 Truncated incorrect query_alloc_block_size value: '-1'
SELECT @@global.query_alloc_block_size;
@@global.query_alloc_block_size
1024
......@@ -120,7 +120,7 @@ SELECT @@session.query_alloc_block_size;
1024
SET @@session.query_alloc_block_size = -2;
Warnings:
Warning 1292 Truncated incorrect query_alloc_block_size value: '0'
Warning 1292 Truncated incorrect query_alloc_block_size value: '-2'
SELECT @@session.query_alloc_block_size;
@@session.query_alloc_block_size
1024
......
......@@ -32,6 +32,8 @@ SELECT @@global.query_cache_limit;
1048575
'#--------------------FN_DYNVARS_131_04-------------------------#'
SET @@global.query_cache_limit = -1;
Warnings:
Warning 1292 Truncated incorrect query_cache_limit value: '-1'
SELECT @@global.query_cache_limit;
@@global.query_cache_limit
0
......@@ -53,6 +55,8 @@ SELECT @@global.query_cache_limit;
@@global.query_cache_limit
4294967295
SET @@global.query_cache_limit = -1024;
Warnings:
Warning 1292 Truncated incorrect query_cache_limit value: '-1024'
SELECT @@global.query_cache_limit;
@@global.query_cache_limit
0
......
......@@ -42,6 +42,8 @@ SELECT @@global.query_cache_min_res_unit;
1048576
'#--------------------FN_DYNVARS_132_04-------------------------#'
SET @@global.query_cache_min_res_unit = -1;
Warnings:
Warning 1292 Truncated incorrect query_cache_min_res_unit value: '-1'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
......@@ -61,6 +63,8 @@ SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
SET @@global.query_cache_min_res_unit = -1024;
Warnings:
Warning 1292 Truncated incorrect query_cache_min_res_unit value: '-1024'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
......
......@@ -41,6 +41,8 @@ SELECT @@global.query_cache_size;
1047552
'#--------------------FN_DYNVARS_133_04-------------------------#'
SET @@global.query_cache_size = -1;
Warnings:
Warning 1292 Truncated incorrect query_cache_size value: '-1'
SELECT @@global.query_cache_size;
@@global.query_cache_size
0
......@@ -61,6 +63,8 @@ SELECT @@global.query_cache_size;
@@global.query_cache_size
0
SET @@global.query_cache_size = -1024;
Warnings:
Warning 1292 Truncated incorrect query_cache_size value: '-1024'
SELECT @@global.query_cache_size;
@@global.query_cache_size
0
......
......@@ -53,7 +53,7 @@ LOCK TABLE t1 WRITE;
** Asynchronous Execution **
SELECT * FROM t1;
** Connection con0 **
Sleeping 2 Seconds before unlock
wait until table is locked
UNLOCK TABLES;
** Connection con1 **
** Asynchronous Result **
......@@ -108,8 +108,17 @@ id value
1 val1
2 val2
3 val3
SELECT * FROM t1;
id value
1 val1
2 val2
3 val3
SELECT * FROM t1;
id value
1 val1
2 val2
3 val3
** Connection con0 **
Sleeping 2 Seconds before unlock
UNLOCK TABLES;
** Connection con1 **
'#----------------------------FN_DYNVARS_136_05------------------------#'
......
......@@ -79,7 +79,7 @@ SELECT @@global.range_alloc_block_size;
4096
SET @@global.range_alloc_block_size = -1024;
Warnings:
Warning 1292 Truncated incorrect range_alloc_block_size value: '0'
Warning 1292 Truncated incorrect range_alloc_block_size value: '-1024'
SELECT @@global.range_alloc_block_size;
@@global.range_alloc_block_size
4096
......@@ -107,7 +107,7 @@ SELECT @@session.range_alloc_block_size;
4096
SET @@session.range_alloc_block_size = -2;
Warnings:
Warning 1292 Truncated incorrect range_alloc_block_size value: '0'
Warning 1292 Truncated incorrect range_alloc_block_size value: '-2'
SELECT @@session.range_alloc_block_size;
@@session.range_alloc_block_size
4096
......
......@@ -155,15 +155,11 @@ SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
'Bug: FN_DYNVARS_138_08- Errors are not coming on assigning TRUE/FALSE to variable'
'#---------------------FN_DYNVARS_138_09----------------------#'
SET @@global.read_buffer_size = 9000;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '9000'
SELECT @@read_buffer_size = @@global.read_buffer_size;
@@read_buffer_size = @@global.read_buffer_size
0
'#---------------------FN_DYNVARS_138_10----------------------#'
SET @@read_buffer_size = 9000;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '9000'
SELECT @@read_buffer_size = @@local.read_buffer_size;
@@read_buffer_size = @@local.read_buffer_size
1
......@@ -172,8 +168,6 @@ SELECT @@local.read_buffer_size = @@session.read_buffer_size;
1
'#---------------------FN_DYNVARS_138_11----------------------#'
SET read_buffer_size = 9100;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '9100'
SELECT @@read_buffer_size= 8200 OR @@read_buffer_size= 8228 ;
@@read_buffer_size= 8200 OR @@read_buffer_size= 8228
1
......
......@@ -154,15 +154,11 @@ SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 822
1
'#---------------------FN_DYNVARS_140_09----------------------#'
SET @@global.read_rnd_buffer_size = 9000;
Warnings:
Warning 1292 Truncated incorrect read_rnd_buffer_size value: '9000'
SELECT @@read_rnd_buffer_size = @@global.read_rnd_buffer_size;
@@read_rnd_buffer_size = @@global.read_rnd_buffer_size
0
'#---------------------FN_DYNVARS_140_10----------------------#'
SET @@read_rnd_buffer_size = 9000;
Warnings:
Warning 1292 Truncated incorrect read_rnd_buffer_size value: '9000'
SELECT @@read_rnd_buffer_size = @@local.read_rnd_buffer_size;
@@read_rnd_buffer_size = @@local.read_rnd_buffer_size
1
......@@ -171,8 +167,6 @@ SELECT @@local.read_rnd_buffer_size = @@session.read_rnd_buffer_size;
1
'#---------------------FN_DYNVARS_140_11----------------------#'
SET read_rnd_buffer_size = 9100;
Warnings:
Warning 1292 Truncated incorrect read_rnd_buffer_size value: '9100'
SELECT @@read_rnd_buffer_size= 8200 OR @@read_rnd_buffer_size= 8228;
@@read_rnd_buffer_size= 8200 OR @@read_rnd_buffer_size= 8228
1
......
......@@ -12,7 +12,7 @@ DROP TABLE IF EXISTS t1;
CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_slave AS my_column;
DESCRIBE t1;
Field Type Null Key Default Extra
my_column longtext NO NULL
my_column varchar(59) NO
DROP TABLE t1;
SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1';
@@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1'
......
DROP TABLE IF EXISTS t1;
'--- check if log file is rotated after 4096 bytes ----'
'--- check if log file is rotated after 4096 bytes ----'
SET @saved_max_binlog_size= @@global.max_binlog_size;
SET @@global.max_binlog_size = 4096;
CREATE TABLE t1(a CHAR(5));
SELECT COUNT(*) FROM t1;
COUNT(*)
50
'mylog.000002 exists'
SET @@global.max_binlog_size= @saved_max_binlog_size;
DROP TABLE t1;
......@@ -51,14 +51,20 @@ SET @@local.rpl_recovery_rank = 4;
ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
'#------------------FN_DYNVARS_142_04-----------------------#'
SET @@global.rpl_recovery_rank = -1;
Warnings:
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
SET @@global.rpl_recovery_rank = -2147483648;
Warnings:
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
SET @@global.rpl_recovery_rank = -2147483649;
Warnings:
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
......
......@@ -52,10 +52,14 @@ SET @@local.server_id = 4;
ERROR HY000: Variable 'server_id' is a GLOBAL variable and should be set with SET GLOBAL
'#------------------FN_DYNVARS_144_05-----------------------#'
SET @@global.server_id = -1;
Warnings:
Warning 1292 Truncated incorrect server_id value: '-1'
SELECT @@global.server_id;
@@global.server_id
0
SET @@global.server_id = -2147483648;
Warnings:
Warning 1292 Truncated incorrect server_id value: '-2147483648'
SELECT @@global.server_id;
@@global.server_id
0
......
......@@ -57,6 +57,8 @@ SET @@local.slave_transaction_retries = 4;
ERROR HY000: Variable 'slave_transaction_retries' is a GLOBAL variable and should be set with SET GLOBAL
'#------------------FN_DYNVARS_149_05-----------------------#'
SET @@global.slave_transaction_retries = -1;
Warnings:
Warning 1292 Truncated incorrect slave_transaction_retries value: '-1'
SELECT @@global.slave_transaction_retries;
@@global.slave_transaction_retries
0
......
......@@ -17,8 +17,8 @@ TRUNCATE mysql.slow_log;
SELECT sleep(2);
sleep(2)
0
SELECT count(*) FROM mysql.slow_log;
count(*)
SELECT count(*) > 0 FROM mysql.slow_log;
count(*) > 0
1
SET @@global.log_output = @global_log_output;
SET @global.slow_query_log = @global_slow_query_log;
......@@ -29,7 +29,6 @@ LOCK TABLE t1 READ;
SELECT * FROM t1;
UNLOCK TABLES;|
** Connection default **
Sleeping for 1 secs
UNLOCK TABLES;
** Connection con0 **
** Asynchronous Result **
......@@ -66,7 +65,6 @@ LOCK TABLE t1 READ;
SELECT * FROM t1;
UNLOCK TABLES;|
** Connection default **
Sleeping for 1 secs
UNLOCK TABLES;
** Connection con0 **
** Asynchronous Result **
......
......@@ -36,47 +36,57 @@ SELECT @@global.sync_binlog;
65536
'#--------------------FN_DYNVARS_168_04-------------------------#'
SET @@global.sync_binlog = -1;
Warnings:
Warning 1292 Truncated incorrect sync_binlog value: '-1'
SELECT @@global.sync_binlog;
@@global.sync_binlog
0
SET @@global.sync_binlog = 4294967296;
Warnings:
Warning 1292 Truncated incorrect sync_binlog value: '4294967296'
SELECT @@global.sync_binlog;
@@global.sync_binlog
0
4294967295
SET @@global.sync_binlog = 10240022115;
Warnings:
Warning 1292 Truncated incorrect sync_binlog value: '10240022115'
SELECT @@global.sync_binlog;
@@global.sync_binlog
1650087523
4294967295
SET @@global.sync_binlog = 10000.01;
ERROR 42000: Incorrect argument type to variable 'sync_binlog'
SELECT @@global.sync_binlog;
@@global.sync_binlog
1650087523
4294967295
SET @@global.sync_binlog = -1024;
Warnings:
Warning 1292 Truncated incorrect sync_binlog value: '-1024'
SELECT @@global.sync_binlog;
@@global.sync_binlog
0
SET @@global.sync_binlog = 42949672950;
Warnings:
Warning 1292 Truncated incorrect sync_binlog value: '42949672950'
SELECT @@global.sync_binlog;
@@global.sync_binlog
4294967286
4294967295
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.sync_binlog = ON;
ERROR 42000: Incorrect argument type to variable 'sync_binlog'
SELECT @@global.sync_binlog;
@@global.sync_binlog
4294967286
4294967295
SET @@global.sync_binlog = 'test';
ERROR 42000: Incorrect argument type to variable 'sync_binlog'
SELECT @@global.sync_binlog;
@@global.sync_binlog
4294967286
4294967295
'#-------------------FN_DYNVARS_168_05----------------------------#'
SET @@session.sync_binlog = 0;
ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@sync_binlog;
@@sync_binlog
4294967286
4294967295
'#----------------------FN_DYNVARS_168_06------------------------#'
SELECT @@global.sync_binlog = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
......@@ -88,7 +98,7 @@ SET sync_binlog = 1;
ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@sync_binlog;
@@sync_binlog
4294967286
4294967295
SET local.sync_binlog = 1;
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 'sync_binlog = 1' at line 1
SELECT local.sync_binlog;
......
......@@ -51,7 +51,7 @@ SELECT @@global.tmp_table_size;
1024
SET @@global.tmp_table_size = -1024;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '0'
Warning 1292 Truncated incorrect tmp_table_size value: '-1024'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
......@@ -100,6 +100,8 @@ SELECT @@session.tmp_table_size;
SET @@session.tmp_table_size = "Test";
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = 12345678901;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '12345678901'
SELECT @@session.tmp_table_size IN (12345678901,4294967295);
@@session.tmp_table_size IN (12345678901,4294967295)
1
......
......@@ -71,7 +71,7 @@ SELECT @@global.transaction_alloc_block_size;
1024
SET @@global.transaction_alloc_block_size = -1024;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0'
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '-1024'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
......
......@@ -66,7 +66,7 @@ SELECT @@global.transaction_prealloc_size;
1024
SET @@global.transaction_prealloc_size = -1024;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '0'
Warning 1292 Truncated incorrect transaction_prealloc_size value: '-1024'
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
1024
......
......@@ -44,7 +44,7 @@ Warnings:
Warning 1292 Truncated incorrect wait_timeout value: '0'
SET @@global.wait_timeout = -1024;
Warnings:
Warning 1292 Truncated incorrect wait_timeout value: '0'
Warning 1292 Truncated incorrect wait_timeout value: '-1024'
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.wait_timeout = ON;
ERROR 42000: Incorrect argument type to variable 'wait_timeout'
......
############## mysql-test\t\event_scheduler_func.test ##########################
# #
# Variable Name: event_scheduler #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Boolean #
# Default Value: OFF #
# Valid Values: ON, OFF & DISABLED #
# #
# #
# Creation Date: 2008-03-17 #
# Author: Salman Rawala #
# #
# Description: Test Cases of Dynamic System Variable "event_scheduler" #
# that checks functionality of this variable #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html#option_mysqld_event_scheduler #
# #
################################################################################
-- source include/not_embedded.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
#########################
# Creating new table #
#########################
--echo ## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30)
);
--echo '#--------------------FN_DYNVARS_018_01-------------------------#'
####################################################################
# Setting initial value of event_scheduler to ON and verifying
# its behavior
####################################################################
--echo ## Setting initial value of variable to ON ##
SET @@global.event_scheduler = ON;
SELECT @@event_scheduler;
--echo ## Creating new event ##
CREATE EVENT test_event_1
ON SCHEDULE EVERY 3 SECOND
DO
INSERT into t1(name) values('Record_1');
--sleep 4
SELECT * from t1;
DROP EVENT test_event_1;
--sleep 1
DELETE from t1;
select * from t1;
--echo '#--------------------FN_DYNVARS_018_02-------------------------#'
####################################################################
# Setting initial value of event_scheduler to OFF and verifying
# its behavior
####################################################################
--echo ## Setting value of variable to OFF ##
SET @@global.event_scheduler = OFF;
SELECT @@event_scheduler;
--echo ## Creating new event ##
CREATE EVENT test_event_1
ON SCHEDULE EVERY 3 SECOND
DO
INSERT into t1(name) values('Record_2');
--sleep 4
--echo ## Table should be empty ##
SELECT * from t1;
DROP EVENT test_event_1;
--echo ## Dropping table ##
DROP table t1;
################# mysql-test\t\innodb_max_dirty_pages_pct_func.test ##########
###############################################################################
# #
# Variable Name: innodb_max_dirty_pages_pct #
# Scope: GLOBAL #
......
############## mysql-test\t\interactive_timeout_func.test #####################
# #
# Variable Name: interactive_timeout #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value:28800 #
# Minvalue: 1 #
# #
# #
# Creation Date: 2008-03-07 #
# Author: Salman Rawala #
# #
# Description: Test Cases of Dynamic System Variable interactive_timeout #
# that checks the functionality of this variable #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
################################################################################
# #
# Variable Name: interactive_timeout #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value:28800 #
# Minvalue: 1 #
# #
# #
# Creation Date: 2008-03-07 #
# Author: Salman Rawala #
# #
# Description: Test Cases of Dynamic System Variable interactive_timeout #
# that checks the functionality of this variable #
# Modified: HHunger 2009-02-26 Inserted clean up, beautifications. #
# It is not yet possible to set CLIENT_INTERACIVE #
# When connecting, so the test has not the #
# desired effect. See 'wait_timeout_func'. #
# Reference: #
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
# #
################################################################################
--disable_warnings
......@@ -42,29 +45,44 @@ name VARCHAR(30)
# Setting initial value of interactive_timeout to 1 and verifying its
# behavior
#######################################################################
let $start_value= `SELECT @@global.interactive_timeout`;
--echo ## Setting initial value of variable to 1 ##
SET @@global.interactive_timeout = 1;
--echo ## Creating new interactive connection test_con1 ##
connect (test_con1, localhost, root,);
--echo ## Creating new connection test_con1 ##
# Not yet possible to set CLEAN_INTERACTIVE flag
connect (test_con1, localhost, root,,,,,);
connection test_con1;
--echo ## Inserting record in table ##
INSERT into t1(name) values('Record_1');
--echo ## Setting session value of interactive_timeout ##
--echo ## Setting session value of interactive_timeout ##
SET @@session.interactive_timeout = 1;
--echo ## Verifying values of variable ##
--echo ## Verifying values of variable ##
SELECT @@session.interactive_timeout;
SELECT @@global.interactive_timeout;
--echo ## Using sleep to check timeout ##
sleep 5;
SELECT * from t1;
--echo connection default;
connection default;
--echo ## Using sleep to check timeout ##
--echo sleep 2;
sleep 2;
--echo 'Bug#35377: Error should appear here because interactive_timeout value';
--echo 'is 1 and connection remains idle for 5 secs';
--echo connection test_con1;
connection test_con1;
SELECT * from t1;
INSERT into t1(name) values('Record_2');
--echo connection default;
connection default;
--echo disconnect test_con1;
disconnect test_con1;
DROP TABLE t1;
eval SET @@global.interactive_timeout= $start_value;
############# mysql-test\t\query_cache_wlock_invalidate_func.test ####################
######################################################################################
# #
# Variable Name: query_cache_wlock_invalidate #
# Scope: GLOBAL & SESSION #
......@@ -10,6 +10,7 @@
# #
# Creation Date: 2008-02-21 #
# Author: Sharique Abdullah #
# Modified: HHunger 2009-02-27 Replaced sleeps, beautifications #
# #
# Description: Test Cases of Dynamic System Variable "query_cache_wlock_invalidate" #
# that checks behavior of this variable in the following ways #
......@@ -18,8 +19,8 @@
# * Scope & Access method #
# * Cache behaviors #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html#option_mysqld_query_cache_wlock_invalidate #
# Reference: #
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
# #
######################################################################################
......@@ -29,6 +30,8 @@
# Setup
#
--source include/not_embedded.inc
# disabled due to differences in the result
--disable_ps_protocol
#
......@@ -135,8 +138,9 @@ send SELECT * FROM t1;
--echo ** Connection con0 **
connection con0;
--echo Sleeping 2 Seconds before unlock
--sleep 2
--echo wait until table is locked
let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHERE state= 'Locked';
--source include/wait_condition.inc
UNLOCK TABLES;
--echo ** Connection con1 **
......@@ -195,20 +199,17 @@ SELECT * FROM t1;
--echo ** Connection con0 **
connection con0;
LOCK TABLE t1 WRITE;
--echo ** Connection con1 **
connection con1;
--echo ** Should not be blocked **
SELECT * FROM t1;
SELECT * FROM t1;
SELECT * FROM t1;
--echo ** Connection con0 **
connection con0;
--echo Sleeping 2 Seconds before unlock
--sleep 2
UNLOCK TABLES;
--echo ** Connection con1 **
......
###################### mysql-test\t\init_slave_func.test #####################
###############################################################################
# #
# Variable Name: init_slave #
# Scope: GLOBAL #
......
......@@ -7,9 +7,8 @@ source include/have_log_bin.inc;
DROP TABLE IF EXISTS t1;
--enable_warnings
#==============================================================
--echo '--- check if log file is rotated after 4096 bytes ----'
--echo '--- check if log file is rotated after 4096 bytes ----'
#==============================================================
SET @saved_max_binlog_size= @@global.max_binlog_size;
......@@ -24,8 +23,7 @@ INSERT INTO t1 VALUES ('mysql');
dec $a;
}
--enable_query_log
--sleep 2
SELECT COUNT(*) FROM t1;
# if log file is not created then this will fail
let $MYSQLD_DATADIR=`select @@datadir`;
......
# save
SET @global_slow_query_log = @@global.slow_query_log;
SET @global_log_output = @@global.log_output;
......@@ -16,6 +15,7 @@ SET @@global.log_output = 'TABLE';
SET @@global.slow_query_log = OFF;
TRUNCATE mysql.slow_log;
# The sleep is the slow query
SELECT sleep(2);
SELECT count(*) FROM mysql.slow_log;
......@@ -26,9 +26,10 @@ SELECT count(*) FROM mysql.slow_log;
SET @@global.slow_query_log = ON;
TRUNCATE mysql.slow_log;
# The sleep is the slow query
SELECT sleep(2);
SELECT count(*) FROM mysql.slow_log;
SELECT count(*) > 0 FROM mysql.slow_log;
#restore
SET @@global.log_output = @global_log_output;
......@@ -37,3 +38,4 @@ SET @global.slow_query_log = @global_slow_query_log;
###############################################################################
# End of the functionality test for slow_query_log #
###############################################################################
############# mysql-test\t\sql_low_priority_updates_func.test #################
# #
# Variable Name: sql_low_priority_updates #
# Scope: GLOBAL & SESSION #
# Access Type: Dynamic #
# Data Type: BOOLEAN #
# Default Value: 1 TRUE #
# Values: 1 TRUE, 0 FALSE #
# #
# #
# Creation Date: 2008-02-25 #
# Author: Sharique Abdullah #
# #
# Description: Test Cases of Dynamic System Variable sql_low_priority_updates#
# that checks behavior of this variable in the following ways #
# * Functionality based on different values #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/set-option.html #
# #
###############################################################################
################################################################################
# #
# Variable Name: sql_low_priority_updates #
# Scope: GLOBAL & SESSION #
# Access Type: Dynamic #
# Data Type: BOOLEAN #
# Default Value: 1 TRUE #
# Values: 1 TRUE, 0 FALSE #
# #
# #
# Creation Date: 2008-02-25 #
# Author: Sharique Abdullah #
# #
# Description: Test Cases of Dynamic System Variable sql_low_priority_updates #
# that checks behavior of this variable in the following ways #
# * Functionality based on different values #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/set-option.html #
# #
################################################################################
--source include/not_embedded.inc
......@@ -85,6 +85,9 @@ delimiter ;|
--echo ** Connection con0 **
connection con0;
let $wait_condition = SELECT COUNT(*) > 0 FROM information_schema.processlist WHERE state='Locked' AND info LIKE 'UPDATE t1 SET a = CONCAT(a,"-updated")';
--source include/wait_condition.inc
--echo ** Asynchronous Execution **
delimiter |;
......@@ -98,9 +101,8 @@ delimiter ;|
--echo ** Connection default **
connection default;
--echo Sleeping for 1 secs
--sleep 1
let $wait_condition= SELECT count(*) = 2 FROM information_schema.processlist WHERE state LIKE 'Locked';
--source include/wait_condition.inc
UNLOCK TABLES;
--echo ** Connection con0 **
......@@ -153,6 +155,9 @@ delimiter ;|
--echo ** Connection con0 **
connection con0;
let $wait_condition = SELECT COUNT(*) > 0 FROM information_schema.processlist WHERE state='Locked' AND info LIKE 'UPDATE t1 SET a = CONCAT(a,"-updated")';
--source include/wait_condition.inc
--echo ** Asynchronous Execution **
delimiter |;
......@@ -166,9 +171,8 @@ delimiter ;|
--echo ** Connection default **
connection default;
--echo Sleeping for 1 secs
--sleep 1
let $wait_condition= SELECT count(*) = 2 FROM information_schema.processlist WHERE state LIKE 'Locked';
--source include/wait_condition.inc
UNLOCK TABLES;
--echo ** Connection con0 **
......
############# mysql-test\t\timestamp_func.test #############################
############################################################################
# #
# Variable Name: timestamp #
# Scope: GLOBAL #
......
############## mysql-test\t\wait_timeout_func.test ############################
###############################################################################
# #
# Variable Name: wait_timeout #
# Scope: GLOBAL | SESSION #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment