Skip to content

Commit 99a862c

Browse files
committed
Merge branch '10.6' into bb-10.11-release
2 parents d3443c8 + e599402 commit 99a862c

16 files changed

+183
-174
lines changed

mysql-test/main/alter_table_lock.result

Lines changed: 0 additions & 17 deletions
This file was deleted.

mysql-test/main/alter_table_lock.test

Lines changed: 0 additions & 27 deletions
This file was deleted.

mysql-test/main/error_simulation.result

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,4 @@ SELECT f1(1);
125125
Got one of the listed errors
126126
DROP FUNCTION f1;
127127
SET debug_dbug= @saved_dbug;
128-
#
129-
# MDEV-27978 wrong option name in error when exceeding max_session_mem_used
130-
#
131-
SET SESSION max_session_mem_used = 8192;
132-
SELECT * FROM information_schema.processlist;
133-
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
134-
SET SESSION max_session_mem_used = DEFAULT;
135-
#
136128
# End of 10.2 tests
137-
#

mysql-test/main/error_simulation.test

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ SELECT a FROM t1 ORDER BY rand(1);
144144
--echo #cleanup
145145
DROP TABLE t1, pid_table;
146146

147-
148-
149147
--echo #
150148
--echo # MDEV-12416 OOM in create_virtual_tmp_table() makes the server crash
151149
--echo #
@@ -158,15 +156,4 @@ SELECT f1(1);
158156
DROP FUNCTION f1;
159157
SET debug_dbug= @saved_dbug;
160158

161-
--echo #
162-
--echo # MDEV-27978 wrong option name in error when exceeding max_session_mem_used
163-
--echo #
164-
SET SESSION max_session_mem_used = 8192;
165-
--error ER_OPTION_PREVENTS_STATEMENT
166-
SELECT * FROM information_schema.processlist;
167-
SET SESSION max_session_mem_used = DEFAULT;
168-
169-
170-
--echo #
171159
--echo # End of 10.2 tests
172-
--echo #

mysql-test/main/errors.result

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
drop table if exists t1;
21
insert into t1 values(1);
32
ERROR 42S02: Table 'test.t1' doesn't exist
43
delete from t1;
@@ -170,12 +169,6 @@ UPDATE t1 SET a = 'new'
170169
WHERE COLUMN_CREATE( 1, 'v', 1, 'w' ) IS NULL;
171170
ERROR 22007: Illegal value used as argument of dynamic column function
172171
drop table t1;
173-
set @max_session_mem_used_save= @@max_session_mem_used;
174-
set max_session_mem_used = 50000;
175-
select * from seq_1_to_1000;
176-
set max_session_mem_used = 8192;
177-
select * from seq_1_to_1000;
178-
set max_session_mem_used = @max_session_mem_used_save;
179172
#
180173
# MDEV-20604: Duplicate key value is silently truncated to 64
181174
# characters in print_keydup_error
@@ -231,16 +224,3 @@ Error 1327 Undeclared variable: foo
231224
Error 1305 PROCEDURE P1 does not exist
232225
drop procedure P1;
233226
# End of 10.4 tests
234-
#
235-
# MDEV-35828: Assertion fails in alloc_root() when memory causes it to call itself
236-
#
237-
CREATE TEMPORARY TABLE t1 (a INT,b INT);
238-
INSERT INTO t1 VALUES (1,1),(2,2);
239-
SET
240-
@tmp=@@max_session_mem_used,
241-
max_session_mem_used=8192;
242-
SELECT * FROM (t1 AS t2 LEFT JOIN t1 AS t3 USING (a)),t1;
243-
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
244-
DROP TABLE t1;
245-
SET max_session_mem_used=@tmp;
246-
# End of 10.6 tests

mysql-test/main/errors.test

Lines changed: 15 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,28 @@
33
#
44
--source include/have_sequence.inc
55

6-
--disable_warnings
7-
drop table if exists t1;
8-
--enable_warnings
9-
--error 1146
6+
--error ER_NO_SUCH_TABLE
107
insert into t1 values(1);
11-
--error 1146
8+
--error ER_NO_SUCH_TABLE
129
delete from t1;
13-
--error 1146
10+
--error ER_NO_SUCH_TABLE
1411
update t1 set a=1;
1512
create table t1 (a int);
16-
--error 1054
13+
--error ER_BAD_FIELD_ERROR
1714
select count(test.t1.b) from t1;
18-
--error 1054
15+
--error ER_BAD_FIELD_ERROR
1916
select count(not_existing_database.t1) from t1;
20-
--error 1054
17+
--error ER_BAD_FIELD_ERROR
2118
select count(not_existing_database.t1.a) from t1;
22-
--error 1044,1146
19+
--error ER_DBACCESS_DENIED_ERROR,ER_NO_SUCH_TABLE
2320
select count(not_existing_database.t1.a) from not_existing_database.t1;
24-
--error 1054
21+
--error ER_BAD_FIELD_ERROR
2522
select 1 from t1 order by 2;
26-
--error 1054
23+
--error ER_BAD_FIELD_ERROR
2724
select 1 from t1 group by 2;
28-
--error 1054
25+
--error ER_BAD_FIELD_ERROR
2926
select 1 from t1 order by t1.b;
30-
--error 1054
27+
--error ER_BAD_FIELD_ERROR
3128
select count(*),b from t1;
3229
drop table t1;
3330

@@ -36,10 +33,10 @@ drop table t1;
3633
#
3734
# Bug #6080: Error message for a field with a display width that is too long
3835
#
39-
--error 1439
36+
--error ER_TOO_BIG_DISPLAYWIDTH
4037
create table t1 (a int(256));
4138
set sql_mode='traditional';
42-
--error 1074
39+
--error ER_TOO_BIG_FIELDLENGTH
4340
create table t1 (a varchar(66000));
4441
set sql_mode=default;
4542

@@ -95,7 +92,7 @@ delimiter ;|
9592

9693
flush status;
9794
--disable_ps2_protocol
98-
--error 1062
95+
--error ER_DUP_ENTRY
9996
select f1(), f2();
10097
--enable_ps2_protocol
10198
show status like 'Com_insert';
@@ -202,24 +199,6 @@ UPDATE t1 SET a = 'new'
202199
WHERE COLUMN_CREATE( 1, 'v', 1, 'w' ) IS NULL;
203200
drop table t1;
204201

205-
#
206-
# errors caused by max_session_mem_used
207-
#
208-
set @max_session_mem_used_save= @@max_session_mem_used;
209-
210-
--disable_result_log
211-
set max_session_mem_used = 50000;
212-
--error 0,ER_OPTION_PREVENTS_STATEMENT
213-
select * from seq_1_to_1000;
214-
set max_session_mem_used = 8192;
215-
--error 0,ER_OPTION_PREVENTS_STATEMENT
216-
select * from seq_1_to_1000;
217-
--enable_result_log
218-
# We may not be able to execute any more queries with this connection
219-
# because of too little memory#
220-
221-
set max_session_mem_used = @max_session_mem_used_save;
222-
223202
--echo #
224203
--echo # MDEV-20604: Duplicate key value is silently truncated to 64
225204
--echo # characters in print_keydup_error
@@ -283,24 +262,4 @@ show warnings;
283262

284263
drop procedure P1;
285264

286-
-- echo # End of 10.4 tests
287-
288-
289-
--echo #
290-
--echo # MDEV-35828: Assertion fails in alloc_root() when memory causes it to call itself
291-
--echo #
292-
CREATE TEMPORARY TABLE t1 (a INT,b INT);
293-
INSERT INTO t1 VALUES (1,1),(2,2);
294-
295-
SET
296-
@tmp=@@max_session_mem_used,
297-
max_session_mem_used=8192;
298-
299-
--error ER_OPTION_PREVENTS_STATEMENT
300-
SELECT * FROM (t1 AS t2 LEFT JOIN t1 AS t3 USING (a)),t1;
301-
302-
DROP TABLE t1;
303-
SET max_session_mem_used=@tmp;
304-
305-
306-
--echo # End of 10.6 tests
265+
--echo # End of 10.4 tests

mysql-test/main/func_str.result

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5414,8 +5414,14 @@ t1 CREATE TABLE `t1` (
54145414
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
54155415
DROP TABLE t1;
54165416
#
5417-
# End of 10.6 tests
5417+
# MDEV-37947 Item_func_hex doesn't check for max_allowed_packet
54185418
#
5419+
select hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex('\\'))))))))))))))))))))))))))))))))))))))))))))) as x;
5420+
x
5421+
NULL
5422+
Warnings:
5423+
Warning 1301 Result of hex() was larger than max_allowed_packet (16777216) - truncated
5424+
# End of 10.6 tests
54195425
#
54205426
# MDEV-25704 Function random_bytes
54215427
#

mysql-test/main/func_str.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2448,8 +2448,11 @@ SHOW CREATE TABLE t1;
24482448
DROP TABLE t1;
24492449

24502450
--echo #
2451-
--echo # End of 10.6 tests
2451+
--echo # MDEV-37947 Item_func_hex doesn't check for max_allowed_packet
24522452
--echo #
2453+
select hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex(hex('\\'))))))))))))))))))))))))))))))))))))))))))))) as x;
2454+
2455+
--echo # End of 10.6 tests
24532456

24542457
--echo #
24552458
--echo # MDEV-25704 Function random_bytes
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#
2+
# MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' in
3+
# Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK)
4+
#
5+
CREATE TABLE t1 (a INT);
6+
SELECT * FROM t1;
7+
a
8+
ALTER TABLE x MODIFY xx INT;
9+
ERROR 42S02: Table 'test.x' doesn't exist
10+
SET SESSION max_session_mem_used= 8192;
11+
LOCK TABLE t1 WRITE;
12+
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
13+
SET SESSION max_session_mem_used = DEFAULT;
14+
UNLOCK TABLES;
15+
DROP TABLE t1;
16+
#
17+
# MDEV-27978 wrong option name in error when exceeding max_session_mem_used
18+
#
19+
SET SESSION max_session_mem_used = 8192;
20+
SELECT * FROM information_schema.processlist;
21+
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
22+
SET SESSION max_session_mem_used = DEFAULT;
23+
set max_session_mem_used = 50000;
24+
select * from seq_1_to_1000;
25+
set max_session_mem_used = 8192;
26+
select * from seq_1_to_1000;
27+
set max_session_mem_used = DEFAULT;
28+
#
29+
# MDEV-35828: Assertion fails in alloc_root() when memory causes it to call itself
30+
#
31+
CREATE TEMPORARY TABLE t1 (a INT,b INT);
32+
INSERT INTO t1 VALUES (1,1),(2,2);
33+
SET max_session_mem_used=8192;
34+
SELECT * FROM (t1 AS t2 LEFT JOIN t1 AS t3 USING (a)),t1;
35+
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
36+
SET max_session_mem_used=DEFAULT;
37+
DROP TABLE t1;
38+
#
39+
# MDEV-23824 SIGSEGV in end_io_cache on REPAIR LOCAL TABLE for Aria table
40+
#
41+
CREATE TABLE t1 (i INT) ENGINE=Aria;
42+
INSERT INTO t1 VALUES (1);
43+
SET max_session_mem_used=50000;
44+
REPAIR LOCAL TABLE t1 USE_FRM;
45+
REPAIR LOCAL TABLE t1;
46+
DROP TABLE t1;
47+
SET max_session_mem_used=default;
48+
# End of 10.6 tests
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# memory usage is sensitive to valgrind/ps-protocol/embedded
2+
source include/not_msan.inc;
3+
source include/not_valgrind.inc;
4+
source include/no_protocol.inc;
5+
source include/not_embedded.inc;
6+
source include/have_64bit.inc;
7+
source include/have_sequence.inc;
8+
9+
--echo #
10+
--echo # MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' in
11+
--echo # Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK)
12+
--echo #
13+
14+
CREATE TABLE t1 (a INT);
15+
SELECT * FROM t1;
16+
17+
--error ER_NO_SUCH_TABLE
18+
ALTER TABLE x MODIFY xx INT;
19+
20+
SET SESSION max_session_mem_used= 8192;
21+
--error 0,ER_OPTION_PREVENTS_STATEMENT
22+
LOCK TABLE t1 WRITE;
23+
24+
--disable_warnings
25+
--error 0,ER_OPTION_PREVENTS_STATEMENT
26+
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
27+
--enable_warnings
28+
29+
SET SESSION max_session_mem_used = DEFAULT;
30+
UNLOCK TABLES;
31+
DROP TABLE t1;
32+
33+
--echo #
34+
--echo # MDEV-27978 wrong option name in error when exceeding max_session_mem_used
35+
--echo #
36+
SET SESSION max_session_mem_used = 8192;
37+
--error ER_OPTION_PREVENTS_STATEMENT
38+
SELECT * FROM information_schema.processlist;
39+
SET SESSION max_session_mem_used = DEFAULT;
40+
41+
#
42+
# errors caused by max_session_mem_used
43+
#
44+
--disable_result_log
45+
set max_session_mem_used = 50000;
46+
--error 0,ER_OPTION_PREVENTS_STATEMENT
47+
select * from seq_1_to_1000;
48+
set max_session_mem_used = 8192;
49+
--error 0,ER_OPTION_PREVENTS_STATEMENT
50+
select * from seq_1_to_1000;
51+
--enable_result_log
52+
# We may not be able to execute any more queries with this connection
53+
# because of too little memory
54+
55+
set max_session_mem_used = DEFAULT;
56+
57+
--echo #
58+
--echo # MDEV-35828: Assertion fails in alloc_root() when memory causes it to call itself
59+
--echo #
60+
CREATE TEMPORARY TABLE t1 (a INT,b INT);
61+
INSERT INTO t1 VALUES (1,1),(2,2);
62+
63+
SET max_session_mem_used=8192;
64+
65+
--error ER_OPTION_PREVENTS_STATEMENT
66+
SELECT * FROM (t1 AS t2 LEFT JOIN t1 AS t3 USING (a)),t1;
67+
68+
SET max_session_mem_used=DEFAULT;
69+
DROP TABLE t1;
70+
71+
--echo #
72+
--echo # MDEV-23824 SIGSEGV in end_io_cache on REPAIR LOCAL TABLE for Aria table
73+
--echo #
74+
75+
CREATE TABLE t1 (i INT) ENGINE=Aria;
76+
INSERT INTO t1 VALUES (1);
77+
SET max_session_mem_used=50000;
78+
--disable_result_log
79+
REPAIR LOCAL TABLE t1 USE_FRM;
80+
REPAIR LOCAL TABLE t1;
81+
--enable_result_log
82+
DROP TABLE t1;
83+
SET max_session_mem_used=default;
84+
85+
--echo # End of 10.6 tests

0 commit comments

Comments
 (0)