Skip to content

Commit

Permalink
Merge 10.3 into 10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Oct 22, 2020
2 parents 1619ae8 + e3d692a commit 46957a6
Show file tree
Hide file tree
Showing 144 changed files with 2,473 additions and 605 deletions.
6 changes: 3 additions & 3 deletions cmake/check_linker_flag.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ FUNCTION(MY_CHECK_AND_SET_LINKER_FLAG flag_to_set)
RETURN()
ENDIF()
STRING(REGEX REPLACE "[-,= +]" "_" result "HAVE_LINK_FLAG_${flag_to_set}")
SET(SAVE_CMAKE_REQUIRED_LINK_OPTIONS "${CMAKE_REQUIRED_LINK_OPTIONS}")
SET(SAVE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
STRING(REGEX REPLACE "^-Wno-" "-W" flag_to_check ${flag_to_set})
SET(CMAKE_REQUIRED_LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS} ${flag_to_check})
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${flag_to_check})
CHECK_CXX_SOURCE_COMPILES("int main(void) { return 0; }" ${result})
SET(CMAKE_REQUIRED_LINK_OPTIONS "${SAVE_CMAKE_REQUIRED_LINK_OPTIONS}")
SET(CMAKE_REQUIRED_LIBRARIES "${SAVE_CMAKE_REQUIRED_LIBRARIES}")
IF (${result})
FOREACH(linktype SHARED MODULE EXE)
IF(ARGN)
Expand Down
4 changes: 2 additions & 2 deletions extra/mariabackup/xtrabackup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2358,7 +2358,7 @@ check_if_skip_database(
if (databases_exclude_hash &&
find_filter_in_hashtable(name, databases_exclude_hash,
&database) &&
!database->has_tables) {
(!database->has_tables || !databases_include_hash)) {
/* Database is found and there are no tables specified,
skip entire db. */
return DATABASE_SKIP;
Expand Down Expand Up @@ -2718,7 +2718,7 @@ static lsn_t xtrabackup_copy_log(lsn_t start_lsn, lsn_t end_lsn, bool last)
/* We got a full log block. */
scanned_lsn += data_len;
} else if (data_len >= log_sys.trailer_offset()
|| data_len <= LOG_BLOCK_HDR_SIZE) {
|| data_len < LOG_BLOCK_HDR_SIZE) {
/* We got a garbage block (abrupt end of the log). */
msg(0,"garbage block: " LSN_PF ",%zu",scanned_lsn, data_len);
break;
Expand Down
26 changes: 13 additions & 13 deletions man/mysqlimport.1
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ all would be imported into a table named
patient\&.
.PP
.PP
\fBmysqldump\fR
\fBmysqlimport\fR
supports the following options, which can be specified on the command line or in the
[mysqldump]
[mysqlimport]
and
[client]
option file groups\&.
\fBmysqldump\fR
\fBmysqlimport\fR
also supports the options for processing option files\&.
.sp
.RS 4
Expand Down Expand Up @@ -267,17 +267,17 @@ Empty the table before importing the text file\&.
.sp -1
.IP \(bu 2.3
.\}
.\" mysqldump: fields-terminated-by option
.\" fields-terminated-by option: mysqldump
.\" mysqlimport: fields-terminated-by option
.\" fields-terminated-by option: mysqlimport
\fB\-\-fields\-terminated\-by=\&.\&.\&.\fR,
.\" mysqldump: fields-enclosed-by option
.\" fields-enclosed-by option: mysqldump
.\" mysqlimport: fields-enclosed-by option
.\" fields-enclosed-by option: mysqlimport
\fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR,
.\" mysqldump: fields-optionally-enclosed-by option
.\" fields-optionally-enclosed-by option: mysqldump
.\" mysqlimport: fields-optionally-enclosed-by option
.\" fields-optionally-enclosed-by option: mysqlimport
\fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR,
.\" mysqldump: fields-escaped-by option
.\" fields-escaped-by option: mysqldump
.\" mysqlimport: fields-escaped-by option
.\" fields-escaped-by option: mysqlimport
\fB\-\-fields\-escaped\-by=\&.\&.\&.\fR
.sp
These options have the same meaning as the corresponding clauses for
Expand Down Expand Up @@ -379,8 +379,8 @@ lines of the data file\&.
.sp -1
.IP \(bu 2.3
.\}
.\" mysqldump: lines-terminated-by option
.\" lines-terminated-by option: mysqldump
.\" mysqlimport: lines-terminated-by option
.\" lines-terminated-by option: mysqlimport
\fB\-\-lines\-terminated\-by=\&.\&.\&.\fR
.sp
This option has the same meaning as the corresponding clause for
Expand Down
1 change: 1 addition & 0 deletions mysql-test/include/mtr_check.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ BEGIN
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
AND variable_name not like 'GTID%POS'
AND variable_name != 'GTID_BINLOG_STATE'
AND variable_name != 'THREAD_POOL_SIZE'
ORDER BY variable_name;

-- Dump all databases, there should be none
Expand Down
11 changes: 11 additions & 0 deletions mysql-test/main/alter_table.result
Original file line number Diff line number Diff line change
Expand Up @@ -2518,6 +2518,17 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2, t1;
#
# MDEV-18163: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
# m_lock_type != 2' failed in handler::ha_rnd_next(); / Assertion
# `table_list->table' failed in find_field_in_table_ref / ERROR 1901
# (on optimized builds)
#
CREATE TABLE t1 (k1 varchar(10) DEFAULT 5);
CREATE TABLE t2 (i1 int);
ALTER TABLE t1 ALTER COLUMN k1 SET DEFAULT (SELECT 1 FROM t2 limit 1);
ERROR HY000: Function or expression 'select ...' cannot be used in the DEFAULT clause of `k1`
DROP TABLE t1,t2;
#
# End of 10.2 tests
#
#
Expand Down
14 changes: 14 additions & 0 deletions mysql-test/main/alter_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,20 @@ ALTER TABLE t2 DROP CONSTRAINT PRIMARY KEY;
SHOW CREATE TABLE t2;
DROP TABLE t2, t1;

--echo #
--echo # MDEV-18163: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
--echo # m_lock_type != 2' failed in handler::ha_rnd_next(); / Assertion
--echo # `table_list->table' failed in find_field_in_table_ref / ERROR 1901
--echo # (on optimized builds)
--echo #


CREATE TABLE t1 (k1 varchar(10) DEFAULT 5);
CREATE TABLE t2 (i1 int);
--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
ALTER TABLE t1 ALTER COLUMN k1 SET DEFAULT (SELECT 1 FROM t2 limit 1);
DROP TABLE t1,t2;

--echo #
--echo # End of 10.2 tests
--echo #
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/index_merge_myisam.result
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,7 @@ EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY , i , c1 , c2)
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 ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL PRIMARY,c1,i,c2 NULL NULL NULL 69 Using where
1 SIMPLE t1 index_merge PRIMARY,c1,i,c2 PRIMARY,i 0,5 NULL 69 Using sort_union(PRIMARY,i); Using where
DROP TABLE t1;
set optimizer_switch= @optimizer_switch_save;
#
Expand Down
16 changes: 16 additions & 0 deletions mysql-test/main/limit_rows_examined.result
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,21 @@ Warning 1931 Query execution was interrupted. The query examined at least 22 row
drop view v;
drop table t1, t2;
#
# 10.1 Test
#
# MDEV-17729: Assertion `! is_set() || m_can_overwrite_status'
# failed in Diagnostics_area::set_error_status
#
set @old_mode= @@sql_mode;
CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,k INT, c CHAR(20));
INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0');
SET @@sql_mode='STRICT_TRANS_TABLES';
INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2;
Warnings:
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
SET @@sql_mode=@old_mode;
DROP TABLE t1;
#
# MDEV-18117: Crash with Explain extended when using limit rows examined
#
create table t1 (c1 char(2));
Expand All @@ -879,3 +894,4 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
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`
drop table t1,t2;
# End of 10.4 tests
19 changes: 19 additions & 0 deletions mysql-test/main/limit_rows_examined.test
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,23 @@ EXECUTE ps;
drop view v;
drop table t1, t2;

--echo #
--echo # 10.1 Test
--echo #
--echo # MDEV-17729: Assertion `! is_set() || m_can_overwrite_status'
--echo # failed in Diagnostics_area::set_error_status
--echo #
set @old_mode= @@sql_mode;

CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,k INT, c CHAR(20));
INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0');

SET @@sql_mode='STRICT_TRANS_TABLES';
INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2;

SET @@sql_mode=@old_mode;
DROP TABLE t1;

--echo #
--echo # MDEV-18117: Crash with Explain extended when using limit rows examined
--echo #
Expand All @@ -589,3 +606,5 @@ insert into t2 values ('bb'), ('cc'), ('dd'), ('ff');
explain extended
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2;
drop table t1,t2;

--echo # End of 10.4 tests
8 changes: 8 additions & 0 deletions mysql-test/main/log_tables.result
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,14 @@ slow_log
slow_log_new
drop table slow_log_new, general_log_new;
use test;
SET GLOBAL LOG_OUTPUT = 'FILE';
SET GLOBAL slow_query_log = 1;
SET GLOBAL general_log = 1;
ALTER TABLE mysql.slow_log ADD COLUMN comment_text TEXT NOT NULL;
ALTER TABLE mysql.general_log ADD COLUMN comment_text TEXT NOT NULL;
SET GLOBAL LOG_OUTPUT = 'NONE';
ALTER TABLE mysql.slow_log DROP COLUMN comment_text;
ALTER TABLE mysql.general_log DROP COLUMN comment_text;
SET GLOBAL LOG_OUTPUT = 'TABLE';
SET GLOBAL general_log = 0;
FLUSH LOGS;
Expand Down
20 changes: 19 additions & 1 deletion mysql-test/main/log_tables.test
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ select * from general_log where argument like '%general_log%';

#
# Check some basic queries interfering with the log tables.
# In our test we'll use a tbale with verbose comments to the short
# In our test we'll use a table with verbose comments to the short
# command type names, used in the tables
#

Expand Down Expand Up @@ -474,6 +474,24 @@ show tables like "%log%";
drop table slow_log_new, general_log_new;
use test;

#
# Bug#69953 / MDEV-4851
# Log tables should be modifable on LOG_OUTPUT != TABLE
#
#

SET GLOBAL LOG_OUTPUT = 'FILE';
SET GLOBAL slow_query_log = 1;
SET GLOBAL general_log = 1;

ALTER TABLE mysql.slow_log ADD COLUMN comment_text TEXT NOT NULL;
ALTER TABLE mysql.general_log ADD COLUMN comment_text TEXT NOT NULL;

SET GLOBAL LOG_OUTPUT = 'NONE';
ALTER TABLE mysql.slow_log DROP COLUMN comment_text;
ALTER TABLE mysql.general_log DROP COLUMN comment_text;


#
# Bug#27857 (Log tables supplies the wrong value for generating
# AUTO_INCREMENT numbers)
Expand Down
3 changes: 1 addition & 2 deletions mysql-test/main/multi_update_big.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL) ;
# The protocolling of many inserts into t1 is suppressed.
INSERT INTO t1 SELECT seq,seq FROM seq_1_to_2097152;
ALTER TABLE t1 ADD INDEX i1(a);
DELETE FROM t1 WHERE a > 2000000;
CREATE TABLE t2 LIKE t1;
Expand Down
21 changes: 3 additions & 18 deletions mysql-test/main/multi_update_big.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--source include/long_test.inc
--source include/have_sequence.inc

#
# Test of update statement that uses many tables.
Expand Down Expand Up @@ -40,25 +41,9 @@ if (`SELECT '$BIG_TEST' = '' AND $need_big = 1`)
# Bug#1820 Rows not deleted from second table on multi-table delete
#

--disable_warnings
DROP TABLE IF EXISTS t1,t2;
--enable_warnings

CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL) ;
--echo # The protocolling of many inserts into t1 is suppressed.
--disable_query_log
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4);
let $1=19;
set @d=4;
begin;
while ($1)
{
eval INSERT INTO t1 SELECT a+@d,b+@d FROM t1;
eval SET @d=@d*2;
dec $1;
}
commit;
--enable_query_log
INSERT INTO t1 SELECT seq,seq FROM seq_1_to_2097152;

ALTER TABLE t1 ADD INDEX i1(a);
DELETE FROM t1 WHERE a > 2000000;
CREATE TABLE t2 LIKE t1;
Expand Down
Loading

0 comments on commit 46957a6

Please sign in to comment.