Skip to content

Commit 46957a6

Browse files
committed
Merge 10.3 into 10.4
2 parents 1619ae8 + e3d692a commit 46957a6

File tree

144 files changed

+2473
-605
lines changed

Some content is hidden

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

144 files changed

+2473
-605
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)

extra/mariabackup/xtrabackup.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,7 +2358,7 @@ check_if_skip_database(
23582358
if (databases_exclude_hash &&
23592359
find_filter_in_hashtable(name, databases_exclude_hash,
23602360
&database) &&
2361-
!database->has_tables) {
2361+
(!database->has_tables || !databases_include_hash)) {
23622362
/* Database is found and there are no tables specified,
23632363
skip entire db. */
23642364
return DATABASE_SKIP;
@@ -2718,7 +2718,7 @@ static lsn_t xtrabackup_copy_log(lsn_t start_lsn, lsn_t end_lsn, bool last)
27182718
/* We got a full log block. */
27192719
scanned_lsn += data_len;
27202720
} else if (data_len >= log_sys.trailer_offset()
2721-
|| data_len <= LOG_BLOCK_HDR_SIZE) {
2721+
|| data_len < LOG_BLOCK_HDR_SIZE) {
27222722
/* We got a garbage block (abrupt end of the log). */
27232723
msg(0,"garbage block: " LSN_PF ",%zu",scanned_lsn, data_len);
27242724
break;

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

mysql-test/include/mtr_check.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ BEGIN
3535
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
3636
AND variable_name not like 'GTID%POS'
3737
AND variable_name != 'GTID_BINLOG_STATE'
38+
AND variable_name != 'THREAD_POOL_SIZE'
3839
ORDER BY variable_name;
3940

4041
-- Dump all databases, there should be none

mysql-test/main/alter_table.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,6 +2518,17 @@ t2 CREATE TABLE `t2` (
25182518
) ENGINE=InnoDB DEFAULT CHARSET=latin1
25192519
DROP TABLE t2, t1;
25202520
#
2521+
# MDEV-18163: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
2522+
# m_lock_type != 2' failed in handler::ha_rnd_next(); / Assertion
2523+
# `table_list->table' failed in find_field_in_table_ref / ERROR 1901
2524+
# (on optimized builds)
2525+
#
2526+
CREATE TABLE t1 (k1 varchar(10) DEFAULT 5);
2527+
CREATE TABLE t2 (i1 int);
2528+
ALTER TABLE t1 ALTER COLUMN k1 SET DEFAULT (SELECT 1 FROM t2 limit 1);
2529+
ERROR HY000: Function or expression 'select ...' cannot be used in the DEFAULT clause of `k1`
2530+
DROP TABLE t1,t2;
2531+
#
25212532
# End of 10.2 tests
25222533
#
25232534
#

mysql-test/main/alter_table.test

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,6 +2036,20 @@ ALTER TABLE t2 DROP CONSTRAINT PRIMARY KEY;
20362036
SHOW CREATE TABLE t2;
20372037
DROP TABLE t2, t1;
20382038

2039+
--echo #
2040+
--echo # MDEV-18163: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
2041+
--echo # m_lock_type != 2' failed in handler::ha_rnd_next(); / Assertion
2042+
--echo # `table_list->table' failed in find_field_in_table_ref / ERROR 1901
2043+
--echo # (on optimized builds)
2044+
--echo #
2045+
2046+
2047+
CREATE TABLE t1 (k1 varchar(10) DEFAULT 5);
2048+
CREATE TABLE t2 (i1 int);
2049+
--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
2050+
ALTER TABLE t1 ALTER COLUMN k1 SET DEFAULT (SELECT 1 FROM t2 limit 1);
2051+
DROP TABLE t1,t2;
2052+
20392053
--echo #
20402054
--echo # End of 10.2 tests
20412055
--echo #

mysql-test/main/index_merge_myisam.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ EXPLAIN
16891689
SELECT * FROM t1 FORCE KEY (PRIMARY , i , c1 , c2)
16901690
WHERE pk = 255 OR i = 22 OR (pk IN (1 , 136) AND c2 IN ('c' , 'w') AND (c1 NOT BETWEEN 'e' AND 'i' OR c2 > 'g')) OR pk != 1 ;
16911691
id select_type table type possible_keys key key_len ref rows Extra
1692-
1 SIMPLE t1 ALL PRIMARY,c1,i,c2 NULL NULL NULL 69 Using where
1692+
1 SIMPLE t1 index_merge PRIMARY,c1,i,c2 PRIMARY,i 0,5 NULL 69 Using sort_union(PRIMARY,i); Using where
16931693
DROP TABLE t1;
16941694
set optimizer_switch= @optimizer_switch_save;
16951695
#

mysql-test/main/limit_rows_examined.result

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,21 @@ Warning 1931 Query execution was interrupted. The query examined at least 22 row
865865
drop view v;
866866
drop table t1, t2;
867867
#
868+
# 10.1 Test
869+
#
870+
# MDEV-17729: Assertion `! is_set() || m_can_overwrite_status'
871+
# failed in Diagnostics_area::set_error_status
872+
#
873+
set @old_mode= @@sql_mode;
874+
CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,k INT, c CHAR(20));
875+
INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0');
876+
SET @@sql_mode='STRICT_TRANS_TABLES';
877+
INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2;
878+
Warnings:
879+
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
880+
SET @@sql_mode=@old_mode;
881+
DROP TABLE t1;
882+
#
868883
# MDEV-18117: Crash with Explain extended when using limit rows examined
869884
#
870885
create table t1 (c1 char(2));
@@ -879,3 +894,4 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
879894
Warnings:
880895
Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t2`.`c2` AS `c2` from `test`.`t1` join `test`.`t2` where `test`.`t2`.`c2` = `test`.`t1`.`c1`
881896
drop table t1,t2;
897+
# End of 10.4 tests

mysql-test/main/limit_rows_examined.test

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,23 @@ EXECUTE ps;
578578
drop view v;
579579
drop table t1, t2;
580580

581+
--echo #
582+
--echo # 10.1 Test
583+
--echo #
584+
--echo # MDEV-17729: Assertion `! is_set() || m_can_overwrite_status'
585+
--echo # failed in Diagnostics_area::set_error_status
586+
--echo #
587+
set @old_mode= @@sql_mode;
588+
589+
CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,k INT, c CHAR(20));
590+
INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0');
591+
592+
SET @@sql_mode='STRICT_TRANS_TABLES';
593+
INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2;
594+
595+
SET @@sql_mode=@old_mode;
596+
DROP TABLE t1;
597+
581598
--echo #
582599
--echo # MDEV-18117: Crash with Explain extended when using limit rows examined
583600
--echo #
@@ -589,3 +606,5 @@ insert into t2 values ('bb'), ('cc'), ('dd'), ('ff');
589606
explain extended
590607
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2;
591608
drop table t1,t2;
609+
610+
--echo # End of 10.4 tests

mysql-test/main/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;

0 commit comments

Comments
 (0)