Skip to content

Commit 620ea81

Browse files
committed
Merge 10.1 into 10.2
2 parents a1b6691 + b4c225a commit 620ea81

Some content is hidden

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

47 files changed

+723
-188
lines changed

cmake/check_linker_flag.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ FUNCTION(MY_CHECK_AND_SET_LINKER_FLAG flag_to_set)
66
RETURN()
77
ENDIF()
88
STRING(REGEX REPLACE "[-,= +]" "_" result "HAVE_LINK_FLAG_${flag_to_set}")
9-
SET(SAVE_CMAKE_REQUIRED_LINK_OPTIONS "${CMAKE_REQUIRED_LINK_OPTIONS}")
9+
SET(SAVE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
1010
STRING(REGEX REPLACE "^-Wno-" "-W" flag_to_check ${flag_to_set})
11-
SET(CMAKE_REQUIRED_LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS} ${flag_to_check})
11+
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${flag_to_check})
1212
CHECK_CXX_SOURCE_COMPILES("int main(void) { return 0; }" ${result})
13-
SET(CMAKE_REQUIRED_LINK_OPTIONS "${SAVE_CMAKE_REQUIRED_LINK_OPTIONS}")
13+
SET(CMAKE_REQUIRED_LIBRARIES "${SAVE_CMAKE_REQUIRED_LIBRARIES}")
1414
IF (${result})
1515
FOREACH(linktype SHARED MODULE EXE)
1616
IF(ARGN)

man/mysqlimport.1

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ all would be imported into a table named
5757
patient\&.
5858
.PP
5959
.PP
60-
\fBmysqldump\fR
60+
\fBmysqlimport\fR
6161
supports the following options, which can be specified on the command line or in the
62-
[mysqldump]
62+
[mysqlimport]
6363
and
6464
[client]
6565
option file groups\&.
66-
\fBmysqldump\fR
66+
\fBmysqlimport\fR
6767
also supports the options for processing option files\&.
6868
.sp
6969
.RS 4
@@ -267,17 +267,17 @@ Empty the table before importing the text file\&.
267267
.sp -1
268268
.IP \(bu 2.3
269269
.\}
270-
.\" mysqldump: fields-terminated-by option
271-
.\" fields-terminated-by option: mysqldump
270+
.\" mysqlimport: fields-terminated-by option
271+
.\" fields-terminated-by option: mysqlimport
272272
\fB\-\-fields\-terminated\-by=\&.\&.\&.\fR,
273-
.\" mysqldump: fields-enclosed-by option
274-
.\" fields-enclosed-by option: mysqldump
273+
.\" mysqlimport: fields-enclosed-by option
274+
.\" fields-enclosed-by option: mysqlimport
275275
\fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR,
276-
.\" mysqldump: fields-optionally-enclosed-by option
277-
.\" fields-optionally-enclosed-by option: mysqldump
276+
.\" mysqlimport: fields-optionally-enclosed-by option
277+
.\" fields-optionally-enclosed-by option: mysqlimport
278278
\fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR,
279-
.\" mysqldump: fields-escaped-by option
280-
.\" fields-escaped-by option: mysqldump
279+
.\" mysqlimport: fields-escaped-by option
280+
.\" fields-escaped-by option: mysqlimport
281281
\fB\-\-fields\-escaped\-by=\&.\&.\&.\fR
282282
.sp
283283
These options have the same meaning as the corresponding clauses for
@@ -379,8 +379,8 @@ lines of the data file\&.
379379
.sp -1
380380
.IP \(bu 2.3
381381
.\}
382-
.\" mysqldump: lines-terminated-by option
383-
.\" lines-terminated-by option: mysqldump
382+
.\" mysqlimport: lines-terminated-by option
383+
.\" lines-terminated-by option: mysqlimport
384384
\fB\-\-lines\-terminated\-by=\&.\&.\&.\fR
385385
.sp
386386
This option has the same meaning as the corresponding clause for
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
--source include/have_debug.inc
2+
--source include/have_debug_sync.inc
3+
--source include/count_sessions.inc
4+
5+
--disable_warnings
6+
drop table if exists t0,t1,t2;
7+
--enable_warnings
8+
9+
create table t0(a int primary key);
10+
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
11+
12+
create table t1(a int primary key);
13+
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
14+
15+
create table t2 (
16+
kp1 int,
17+
kp2 int,
18+
col char(100),
19+
key(kp1, kp2)
20+
);
21+
insert into t2 select a, a, a from t1;
22+
23+
select engine from information_schema.tables
24+
where table_schema=database() and table_name='t2';
25+
26+
explain
27+
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
28+
29+
let $target_id= `select connection_id()`;
30+
31+
set debug_sync='handler_index_cond_check SIGNAL at_icp_check WAIT_FOR go';
32+
send
33+
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
34+
35+
connect (con1, localhost, root,,);
36+
connection con1;
37+
set debug_sync='now WAIT_FOR at_icp_check';
38+
evalp kill query $target_id;
39+
set debug_sync='now SIGNAL go';
40+
41+
connection default;
42+
43+
--error ER_QUERY_INTERRUPTED
44+
reap;
45+
set debug_sync='RESET';
46+
47+
disconnect con1;
48+
drop table t0,t1,t2;
49+
--source include/wait_until_count_sessions.inc
50+

mysql-test/mysql-test-run.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6546,7 +6546,7 @@ ($)
65466546
debug-server Use debug version of server, but without turning on
65476547
tracing
65486548
debugger=NAME Start mysqld in the selected debugger
6549-
gdb Start the mysqld(s) in gdb
6549+
gdb[=gdb_arguments] Start the mysqld(s) in gdb
65506550
manual-debug Let user manually start mysqld in debugger, before
65516551
running test(s)
65526552
manual-gdb Let user manually start mysqld in gdb, before running

mysql-test/r/limit_rows_examined.result

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,3 +861,18 @@ Warnings:
861861
Warning 1931 Query execution was interrupted. The query examined at least 22 rows, which exceeds LIMIT ROWS EXAMINED (21). The query result may be incomplete
862862
drop view v;
863863
drop table t1, t2;
864+
#
865+
# 10.1 Test
866+
#
867+
# MDEV-17729: Assertion `! is_set() || m_can_overwrite_status'
868+
# failed in Diagnostics_area::set_error_status
869+
#
870+
set @old_mode= @@sql_mode;
871+
CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,k INT, c CHAR(20));
872+
INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0');
873+
SET @@sql_mode='STRICT_TRANS_TABLES';
874+
INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2;
875+
Warnings:
876+
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
877+
SET @@sql_mode=@old_mode;
878+
DROP TABLE t1;

mysql-test/r/log_tables.result

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,14 @@ slow_log
380380
slow_log_new
381381
drop table slow_log_new, general_log_new;
382382
use test;
383+
SET GLOBAL LOG_OUTPUT = 'FILE';
384+
SET GLOBAL slow_query_log = 1;
385+
SET GLOBAL general_log = 1;
386+
ALTER TABLE mysql.slow_log ADD COLUMN comment_text TEXT NOT NULL;
387+
ALTER TABLE mysql.general_log ADD COLUMN comment_text TEXT NOT NULL;
388+
SET GLOBAL LOG_OUTPUT = 'NONE';
389+
ALTER TABLE mysql.slow_log DROP COLUMN comment_text;
390+
ALTER TABLE mysql.general_log DROP COLUMN comment_text;
383391
SET GLOBAL LOG_OUTPUT = 'TABLE';
384392
SET GLOBAL general_log = 0;
385393
FLUSH LOGS;

mysql-test/r/partition.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2796,5 +2796,16 @@ id
27962796
16
27972797
drop table t1;
27982798
#
2799+
# MDEV-5628: Assertion `! is_set()' or `!is_set() ||
2800+
# (m_status == DA_OK_BULK && is_bulk_op())' fails on UPDATE on a
2801+
# partitioned table with subquery (MySQL:71630)
2802+
#
2803+
CREATE TABLE t1 (a INT) PARTITION BY HASH(a) PARTITIONS 2;
2804+
CREATE TABLE t2 (b INT);
2805+
INSERT INTO t2 VALUES (1),(2);
2806+
UPDATE t1 SET a = 7 WHERE a = ( SELECT b FROM t2 ) ORDER BY a LIMIT 6;
2807+
ERROR 21000: Subquery returns more than 1 row
2808+
DROP TABLE t1,t2;
2809+
#
27992810
# End of 10.1 tests
28002811
#
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set @@global.binlog_checksum = CRC32;
2+
call mtr.add_suppression("Replication event checksum verification failed");
3+
call mtr.add_suppression("Error in Log_event::read_log_event");
4+
set @@global.debug_dbug = VALUE;
5+
set @@global.master_verify_checksum = DO_CHECKSUM;
6+
set @@global.binlog_checksum = BINLOG_CHECKSUM;
7+
# EOF the test
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# The test verifies server binlog-based recovery.
2+
#
3+
# MDEV-23832 checksum error at server binlog recovery should not crash
4+
5+
# The test logic really requires --log-bin.
6+
--source include/have_binlog_format_mixed.inc
7+
--source include/have_debug.inc
8+
9+
--let $do_checksum = `SELECT @@global.master_verify_checksum`
10+
--let $debug_dbug_saved = `SELECT @@global.debug_dbug`
11+
--let $binlog_checksum = `SELECT @@global.binlog_checksum`
12+
set @@global.binlog_checksum = CRC32;
13+
14+
call mtr.add_suppression("Replication event checksum verification failed");
15+
call mtr.add_suppression("Error in Log_event::read_log_event");
16+
17+
# Proof of no crash follows.
18+
# There's no need for actual bin-loggable queries to the server
19+
--let $restart_parameters= --master_verify_checksum=ON --debug_dbug="+d,corrupt_read_log_event_char"
20+
--let $shutdown_timeout=0
21+
--source include/restart_mysqld.inc
22+
--let $restart_parameters=
23+
--let $shutdown_timeout=
24+
25+
#
26+
# Cleanup
27+
28+
--replace_regex /= .*/= VALUE/
29+
--eval set @@global.debug_dbug = "$debug_dbug_saved"
30+
31+
--replace_result $do_checksum DO_CHECKSUM
32+
--eval set @@global.master_verify_checksum = $do_checksum
33+
--replace_result $binlog_checksum BINLOG_CHECKSUM
34+
--eval set @@global.binlog_checksum = $binlog_checksum
35+
#
36+
--echo # EOF the test
37+
#

mysql-test/suite/innodb/r/foreign_key.result

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,41 @@ connection default;
420420
XA END 'xid';
421421
XA ROLLBACK 'xid';
422422
DROP TABLE t1;
423+
CREATE TABLE t1 (pk INT PRIMARY KEY,
424+
f1 VARCHAR(10), f2 VARCHAR(10),
425+
f3 VARCHAR(10), f4 VARCHAR(10),
426+
f5 VARCHAR(10), f6 VARCHAR(10),
427+
f7 VARCHAR(10), f8 VARCHAR(10),
428+
INDEX(f1), INDEX(f2), INDEX(f3), INDEX(f4),
429+
INDEX(f5), INDEX(f6), INDEX(f7), INDEX(f8)) ENGINE=InnoDB;
430+
INSERT INTO t1 VALUES (1, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
431+
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
432+
(2, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
433+
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
434+
(3, 'innodb', 'innodb', 'innodb', 'innodb',
435+
'innodb', 'innodb', 'innodb', 'innodb');
436+
ALTER TABLE t1 ADD FOREIGN KEY (f1) REFERENCES t1 (f2) ON DELETE SET NULL;
437+
START TRANSACTION;
438+
DELETE FROM t1 where f1='mariadb';
439+
SELECT * FROM t1;
440+
pk f1 f2 f3 f4 f5 f6 f7 f8
441+
2 NULL mariadb mariadb mariadb mariadb mariadb mariadb mariadb
442+
3 innodb innodb innodb innodb innodb innodb innodb innodb
443+
ROLLBACK;
444+
ALTER TABLE t1 ADD FOREIGN KEY (f3) REFERENCES t1 (f4) ON DELETE CASCADE;
445+
START TRANSACTION;
446+
DELETE FROM t1 where f3='mariadb';
447+
SELECT * FROM t1;
448+
pk f1 f2 f3 f4 f5 f6 f7 f8
449+
3 innodb innodb innodb innodb innodb innodb innodb innodb
450+
ROLLBACK;
451+
ALTER TABLE t1 ADD FOREIGN KEY (f5) REFERENCES t1 (f6) ON UPDATE SET NULL;
452+
UPDATE t1 SET f6='update';
453+
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_3` FOREIGN KEY (`f5`) REFERENCES `t1` (`f6`) ON UPDATE SET NULL)
454+
ALTER TABLE t1 ADD FOREIGN KEY (f7) REFERENCES t1 (f8) ON UPDATE CASCADE;
455+
UPDATE t1 SET f6='cascade';
456+
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_3` FOREIGN KEY (`f5`) REFERENCES `t1` (`f6`) ON UPDATE SET NULL)
457+
DROP TABLE t1;
423458
# Start of 10.2 tests
424459
#
425460
# MDEV-13246 Stale rows despite ON DELETE CASCADE constraint

0 commit comments

Comments
 (0)