Skip to content

Commit a5e248d

Browse files
author
Horst Hunger
committed
Final fix for bug#38349: Did the changes due to the 2 reviews.
- Updated slow_query_log_file_basic and general_log_file basis instead of the func version as the func version run good but the basic versions fail. - Sent innodb.test to dev@innodb.com. - variables.test has differences probably due to a bug in mtr or in the SET statement (see bug#39369). - general_log_file_basic.test and slow_query_log_file_bsaic.test have differences, which might be produced by the new mtr (see bug#38124).
1 parent 54eff66 commit a5e248d

File tree

65 files changed

+1032
-747
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1032
-747
lines changed

mysql-test/r/binlog_format_basic.result

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'#---------------------BS_STVARS_002_01----------------------#'
2+
SET @start_value= @@global.binlog_format;
23
SELECT COUNT(@@GLOBAL.binlog_format);
34
COUNT(@@GLOBAL.binlog_format)
45
1
@@ -9,19 +10,13 @@ COUNT(@@SESSION.binlog_format)
910
1 Expected
1011
'#---------------------BS_STVARS_002_02----------------------#'
1112
SET @@GLOBAL.binlog_format=1;
12-
Expected error 'Read only variable'
13-
Bug: Writeable static variable
14-
SELECT COUNT(@@GLOBAL.binlog_format);
15-
COUNT(@@GLOBAL.binlog_format)
16-
1
17-
1 Expected
13+
SELECT @@GLOBAL.binlog_format;
14+
@@GLOBAL.binlog_format
15+
STATEMENT
1816
SET @@SESSION.binlog_format=1;
19-
Expected error 'Read only variable'
20-
Bug: Writeable static variable
21-
SELECT COUNT(@@SESSION.binlog_format);
22-
COUNT(@@SESSION.binlog_format)
23-
1
24-
1 Expected
17+
SELECT @@SESSION.binlog_format;
18+
@@SESSION.binlog_format
19+
STATEMENT
2520
'#---------------------BS_STVARS_002_03----------------------#'
2621
SELECT @@GLOBAL.binlog_format = VARIABLE_VALUE
2722
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -34,14 +29,14 @@ COUNT(@@GLOBAL.binlog_format)
3429
1
3530
1 Expected
3631
SELECT COUNT(VARIABLE_VALUE)
37-
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
32+
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
3833
WHERE VARIABLE_NAME='binlog_format';
3934
COUNT(VARIABLE_VALUE)
4035
1
4136
1 Expected
4237
'#---------------------BS_STVARS_002_04----------------------#'
43-
SELECT @@SESSION.binlog_format = VARIABLE_VALUE
44-
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
38+
SELECT @@SESSION.binlog_format = VARIABLE_VALUE
39+
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
4540
WHERE VARIABLE_NAME='binlog_format';
4641
@@SESSION.binlog_format = VARIABLE_VALUE
4742
1
@@ -51,7 +46,7 @@ COUNT(@@SESSION.binlog_format)
5146
1
5247
1 Expected
5348
SELECT COUNT(VARIABLE_VALUE)
54-
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
49+
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
5550
WHERE VARIABLE_NAME='binlog_format';
5651
COUNT(VARIABLE_VALUE)
5752
1
@@ -73,3 +68,4 @@ SELECT COUNT(@@GLOBAL.binlog_format);
7368
COUNT(@@GLOBAL.binlog_format)
7469
1
7570
1 Expected
71+
SET @@global.binlog_format= @start_value;

mysql-test/r/character_set_connection_func.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ utf8
1515
'#--------------------FN_DYNVARS_011_02-------------------------#'
1616
'connection default'
1717
DROP TABLE IF EXISTS t1;
18-
CREATE TABLE t1(b CHAR(40) character set utf8);
18+
CREATE TABLE t1(b CHAR(40) CHARACTER SET utf8);
1919
'--verify that character_set_connection converts character_set_client--'
2020
SET @@session.character_set_client = utf8;
2121
SET @@session.character_set_results = utf8;
@@ -53,3 +53,4 @@ SET @@global.character_set_connection = @global_character_set_connection;
5353
SET @@session.character_set_connection = @session_character_set_connection;
5454
SET @@session.character_set_client = @session_character_set_client;
5555
SET @@session.character_set_results = @session_character_set_results;
56+
DROP TABLE t1;
Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,77 @@
1-
drop table if exists t1;
1+
DROP TABLE IF EXISTS t1;
22
## Creating new table ##
33
CREATE TABLE t1
44
(
5-
id INT NOT NULL auto_increment,
5+
id INT NOT NULL AUTO_INCREMENT,
66
PRIMARY KEY (id),
7-
name varchar(30)
7+
name VARCHAR(30)
88
) ENGINE = INNODB;
99
'#--------------------FN_DYNVARS_017_01-------------------------#'
1010
## Creating new connection ##
11-
INSERT into t1(name) values('Record_1');
11+
INSERT INTO t1(name) VALUES('Record_1');
1212
SET @@autocommit = 0;
13-
SELECT * from t1;
13+
SELECT * FROM t1;
1414
id name
1515
1 Record_1
1616
## Setting value of variable to 0 ##
1717
SET @@session.completion_type = 0;
1818
## Here commit & rollback should work normally ##
1919
START TRANSACTION;
20-
SELECT * from t1;
20+
SELECT * FROM t1;
2121
id name
2222
1 Record_1
23-
INSERT into t1(name) values('Record_2');
24-
INSERT into t1(name) values('Record_3');
25-
SELECT * from t1;
23+
INSERT INTO t1(name) VALUES('Record_2');
24+
INSERT INTO t1(name) VALUES('Record_3');
25+
SELECT * FROM t1;
2626
id name
2727
1 Record_1
2828
2 Record_2
2929
3 Record_3
30-
DELETE FROM t1 where id = 2;
31-
SELECT * from t1;
30+
DELETE FROM t1 WHERE id = 2;
31+
SELECT * FROM t1;
3232
id name
3333
1 Record_1
3434
3 Record_3
3535
START TRANSACTION;
36-
SELECT * from t1;
36+
SELECT * FROM t1;
3737
id name
3838
1 Record_1
3939
3 Record_3
40-
INSERT into t1(name) values('Record_4');
41-
INSERT into t1(name) values('Record_5');
40+
INSERT INTO t1(name) VALUES('Record_4');
41+
INSERT INTO t1(name) VALUES('Record_5');
4242
COMMIT;
4343
'#--------------------FN_DYNVARS_017_02-------------------------#'
4444
SET @@session.completion_type = 2;
4545
## Here commit should work as COMMIT RELEASE ##
4646
START TRANSACTION;
47-
SELECT * from t1;
47+
SELECT * FROM t1;
4848
id name
4949
1 Record_1
5050
3 Record_3
5151
4 Record_4
5252
5 Record_5
53-
INSERT into t1(name) values('Record_6');
54-
INSERT into t1(name) values('Record_7');
53+
INSERT INTO t1(name) VALUES('Record_6');
54+
INSERT INTO t1(name) VALUES('Record_7');
5555
COMMIT;
5656
## Inserting rows should give error here because connection should ##
5757
## disconnect after using COMMIT ##
58-
INSERT into t1(name) values('Record_4');
58+
INSERT INTO t1(name) VALUES('Record_4');
5959
Got one of the listed errors
6060
## Creating new connection test_con2 ##
6161
SET @@session.completion_type = 2;
6262
## Inserting rows and using Rollback which should Rollback & release ##
6363
START TRANSACTION;
64-
SELECT * from t1;
64+
SELECT * FROM t1;
6565
id name
6666
1 Record_1
6767
3 Record_3
6868
4 Record_4
6969
5 Record_5
7070
6 Record_6
7171
7 Record_7
72-
INSERT into t1(name) values('Record_8');
73-
INSERT into t1(name) values('Record_9');
72+
INSERT INTO t1(name) VALUES('Record_8');
73+
INSERT INTO t1(name) VALUES('Record_9');
7474
ROLLBACK;
75-
INSERT into t1(name) values('Record_4');
75+
INSERT INTO t1(name) VALUES('Record_4');
7676
Got one of the listed errors
77+
DROP TABLE t1;
Lines changed: 73 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,121 @@
1-
drop table if exists t1;
1+
DROP TABLE IF EXISTS t1;
22
## Creating new table ##
33
CREATE TABLE t1
44
(
5-
name varchar(30)
5+
name VARCHAR(30)
66
);
77
'#--------------------FN_DYNVARS_018_01-------------------------#'
8+
SET @start_value= @@global.concurrent_insert;
89
## Setting initial value of variable to 1 ##
910
SET @@global.concurrent_insert = 1;
10-
INSERT into t1(name) values('Record_1');
11-
INSERT into t1(name) values('Record_2');
12-
INSERT into t1(name) values('Record_3');
11+
INSERT INTO t1(name) VALUES('Record_1');
12+
INSERT INTO t1(name) VALUES('Record_2');
13+
INSERT INTO t1(name) VALUES('Record_3');
1314
## locking table ##
14-
lock table t1 read local;
15-
## Creating new connection to insert some rows in table ##
15+
LOCK TABLE t1 READ LOCAL;
16+
## Creating new connection to insert some rows in table ##
17+
connection test_con1;
1618
## New records should come at the end of all rows ##
17-
INSERT into t1(name) values('Record_4');
18-
SELECT * from t1;
19+
INSERT INTO t1(name) VALUES('Record_4');
20+
SELECT * FROM t1;
1921
name
2022
Record_1
2123
Record_2
2224
Record_3
2325
Record_4
2426
## unlocking tables ##
25-
unlock tables;
26-
## deleting record to create hole in table ##
27-
DELETE from t1 where name ='Record_2';
27+
connection default;
28+
UNLOCK TABLES;
29+
## deleting record to create hole in table ##
30+
DELETE FROM t1 WHERE name ='Record_2';
2831
'#--------------------FN_DYNVARS_018_02-------------------------#'
32+
LOCK TABLE t1 READ LOCAL;
33+
connection test_con1;
34+
SET @@global.concurrent_insert=1;
35+
## send INSERT which should be blocked until unlock of the table ##
36+
INSERT INTO t1(name) VALUES('Record_7');
37+
connection default;
38+
## show processlist info and state ##
39+
SELECT state,info FROM INFORMATION_SCHEMA.PROCESSLIST
40+
WHERE state= "Locked" AND info LIKE "INSERT INTO t1%";
41+
state info
42+
Locked INSERT INTO t1(name) VALUES('Record_7')
43+
## table contents befor UNLOCK ##
44+
SELECT * FROM t1;
45+
name
46+
Record_1
47+
Record_3
48+
Record_4
49+
UNLOCK TABLES;
50+
## table contens after UNLOCK ##
51+
SELECT * FROM t1;
52+
name
53+
Record_1
54+
Record_7
55+
Record_3
56+
Record_4
57+
INSERT INTO t1(name) VALUES('Record_6');
58+
connection test_con1;
59+
SELECT * FROM t1;
60+
name
61+
Record_1
62+
Record_7
63+
Record_3
64+
Record_4
65+
Record_6
66+
connection default;
2967
'#--------------------FN_DYNVARS_018_03-------------------------#'
3068
## lock table and connect with connection1 ##
31-
lock table t1 read local;
69+
LOCK TABLE t1 READ LOCAL;
70+
connection test_con1;
3271
## setting value of concurrent_insert to 2 ##
3372
SET @@global.concurrent_insert=2;
3473
## Inserting record in table, record should go at the end of the table ##
35-
INSERT into t1(name) values('Record_5');
36-
SELECT * from t1;
74+
INSERT INTO t1(name) VALUES('Record_5');
75+
SELECT * FROM t1;
3776
name
3877
Record_1
78+
Record_7
3979
Record_3
4080
Record_4
81+
Record_6
4182
Record_5
4283
SELECT @@concurrent_insert;
4384
@@concurrent_insert
4485
2
45-
## Switching to default connection ##
86+
connection default;
4687
## Unlocking table ##
47-
unlock tables;
48-
SELECT * from t1;
88+
UNLOCK TABLES;
89+
SELECT * FROM t1;
4990
name
5091
Record_1
92+
Record_7
5193
Record_3
5294
Record_4
95+
Record_6
5396
Record_5
5497
## Inserting new row, this should go in the hole ##
55-
INSERT into t1(name) values('Record_6');
56-
SELECT * from t1;
98+
INSERT INTO t1(name) VALUES('Record_6');
99+
SELECT * FROM t1;
57100
name
58101
Record_1
59-
Record_6
102+
Record_7
60103
Record_3
61104
Record_4
105+
Record_6
62106
Record_5
107+
Record_6
63108
## connection test_con1 ##
64-
DELETE from t1 where name ='Record_3';
65-
SELECT * from t1;
109+
DELETE FROM t1 WHERE name ='Record_3';
110+
SELECT * FROM t1;
66111
name
67112
Record_1
68-
Record_6
113+
Record_7
69114
Record_4
115+
Record_6
70116
Record_5
117+
Record_6
71118
## Dropping table ##
72-
DROP table t1;
119+
DROP TABLE t1;
73120
## Disconnecting connection ##
121+
SET @@global.concurrent_insert= @start_value;

mysql-test/r/delay_key_write_func.result

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'#--------------------FN_DYNVARS_023_01-------------------------#'
2+
SET @start_value= @@global.delay_key_write;
23
SET @@global.delay_key_write = ON;
34
SELECT @@global.delay_key_write;
45
@@global.delay_key_write
@@ -28,8 +29,8 @@ Key_writes 9
2829
SHOW STATUS LIKE 'Key_write_requests';
2930
Variable_name Value
3031
Key_write_requests 9
31-
select count(*) from t1;
32-
count(*)
32+
SELECT COUNT(*) FROM t1;
33+
COUNT(*)
3334
9
3435
'----check when delay_key_write is ON---'
3536
SET @@global.delay_key_write = ON;
@@ -44,8 +45,8 @@ Key_writes 0
4445
SHOW STATUS LIKE 'Key_write_requests';
4546
Variable_name Value
4647
Key_write_requests 9
47-
select count(*) from t1;
48-
count(*)
48+
SELECT COUNT(*) FROM t1;
49+
COUNT(*)
4950
9
5051
'----check when delay_key_write is ALL---'
5152
SET @@global.delay_key_write = ALL;
@@ -60,8 +61,9 @@ Key_writes 0
6061
SHOW STATUS LIKE 'Key_write_requests';
6162
Variable_name Value
6263
Key_write_requests 9
63-
select count(*) from t1;
64-
count(*)
64+
SELECT COUNT(*) FROM t1;
65+
COUNT(*)
6566
9
6667
DROP PROCEDURE sp_addRecords;
6768
DROP TABLE t1;
69+
SET @@global.delay_key_write= @start_value;

mysql-test/r/general_log_file_basic.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
1717
WHERE VARIABLE_NAME='general_log_file';
1818
@@global.general_log_file = VARIABLE_VALUE
1919
1
20+
SET @@global.general_log_file= @start_value;
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
drop table if exists t1;
1+
DROP TABLE IF EXISTS t1;
22
## Creating new table ##
33
CREATE TABLE t1
44
(
5-
id INT NOT NULL auto_increment,
5+
id INT NOT NULL AUTO_INCREMENT,
66
PRIMARY KEY (id),
77
name VARCHAR(30)
88
);
99
'#--------------------FN_DYNVARS_018_01-------------------------#'
1010
SELECT @@general_log_file;
1111
@@general_log_file
1212
mysql-test.log
13-
INSERT into t1(name) values('Record_1');
14-
INSERT into t1(name) values('Record_2');
15-
INSERT into t1(name) values('Record_3');
16-
INSERT into t1(name) values('Record_4');
13+
INSERT INTO t1(name) VALUES('Record_1');
14+
INSERT INTO t1(name) VALUES('Record_2');
15+
INSERT INTO t1(name) VALUES('Record_3');
16+
INSERT INTO t1(name) VALUES('Record_4');
1717
## Verifying general log file ##
1818
## Dropping table ##
1919
DROP TABLE t1;

0 commit comments

Comments
 (0)