Merge 10.3 into 10.4
This commit is contained in:
commit
46957a6a77
@ -6,11 +6,11 @@ FUNCTION(MY_CHECK_AND_SET_LINKER_FLAG flag_to_set)
|
|||||||
RETURN()
|
RETURN()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
STRING(REGEX REPLACE "[-,= +]" "_" result "HAVE_LINK_FLAG_${flag_to_set}")
|
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})
|
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})
|
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})
|
IF (${result})
|
||||||
FOREACH(linktype SHARED MODULE EXE)
|
FOREACH(linktype SHARED MODULE EXE)
|
||||||
IF(ARGN)
|
IF(ARGN)
|
||||||
|
@ -2358,7 +2358,7 @@ check_if_skip_database(
|
|||||||
if (databases_exclude_hash &&
|
if (databases_exclude_hash &&
|
||||||
find_filter_in_hashtable(name, databases_exclude_hash,
|
find_filter_in_hashtable(name, databases_exclude_hash,
|
||||||
&database) &&
|
&database) &&
|
||||||
!database->has_tables) {
|
(!database->has_tables || !databases_include_hash)) {
|
||||||
/* Database is found and there are no tables specified,
|
/* Database is found and there are no tables specified,
|
||||||
skip entire db. */
|
skip entire db. */
|
||||||
return DATABASE_SKIP;
|
return DATABASE_SKIP;
|
||||||
@ -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. */
|
/* We got a full log block. */
|
||||||
scanned_lsn += data_len;
|
scanned_lsn += data_len;
|
||||||
} else if (data_len >= log_sys.trailer_offset()
|
} 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). */
|
/* We got a garbage block (abrupt end of the log). */
|
||||||
msg(0,"garbage block: " LSN_PF ",%zu",scanned_lsn, data_len);
|
msg(0,"garbage block: " LSN_PF ",%zu",scanned_lsn, data_len);
|
||||||
break;
|
break;
|
||||||
|
@ -57,13 +57,13 @@ all would be imported into a table named
|
|||||||
patient\&.
|
patient\&.
|
||||||
.PP
|
.PP
|
||||||
.PP
|
.PP
|
||||||
\fBmysqldump\fR
|
\fBmysqlimport\fR
|
||||||
supports the following options, which can be specified on the command line or in the
|
supports the following options, which can be specified on the command line or in the
|
||||||
[mysqldump]
|
[mysqlimport]
|
||||||
and
|
and
|
||||||
[client]
|
[client]
|
||||||
option file groups\&.
|
option file groups\&.
|
||||||
\fBmysqldump\fR
|
\fBmysqlimport\fR
|
||||||
also supports the options for processing option files\&.
|
also supports the options for processing option files\&.
|
||||||
.sp
|
.sp
|
||||||
.RS 4
|
.RS 4
|
||||||
@ -267,17 +267,17 @@ Empty the table before importing the text file\&.
|
|||||||
.sp -1
|
.sp -1
|
||||||
.IP \(bu 2.3
|
.IP \(bu 2.3
|
||||||
.\}
|
.\}
|
||||||
.\" mysqldump: fields-terminated-by option
|
.\" mysqlimport: fields-terminated-by option
|
||||||
.\" fields-terminated-by option: mysqldump
|
.\" fields-terminated-by option: mysqlimport
|
||||||
\fB\-\-fields\-terminated\-by=\&.\&.\&.\fR,
|
\fB\-\-fields\-terminated\-by=\&.\&.\&.\fR,
|
||||||
.\" mysqldump: fields-enclosed-by option
|
.\" mysqlimport: fields-enclosed-by option
|
||||||
.\" fields-enclosed-by option: mysqldump
|
.\" fields-enclosed-by option: mysqlimport
|
||||||
\fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR,
|
\fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR,
|
||||||
.\" mysqldump: fields-optionally-enclosed-by option
|
.\" mysqlimport: fields-optionally-enclosed-by option
|
||||||
.\" fields-optionally-enclosed-by option: mysqldump
|
.\" fields-optionally-enclosed-by option: mysqlimport
|
||||||
\fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR,
|
\fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR,
|
||||||
.\" mysqldump: fields-escaped-by option
|
.\" mysqlimport: fields-escaped-by option
|
||||||
.\" fields-escaped-by option: mysqldump
|
.\" fields-escaped-by option: mysqlimport
|
||||||
\fB\-\-fields\-escaped\-by=\&.\&.\&.\fR
|
\fB\-\-fields\-escaped\-by=\&.\&.\&.\fR
|
||||||
.sp
|
.sp
|
||||||
These options have the same meaning as the corresponding clauses for
|
These options have the same meaning as the corresponding clauses for
|
||||||
@ -379,8 +379,8 @@ lines of the data file\&.
|
|||||||
.sp -1
|
.sp -1
|
||||||
.IP \(bu 2.3
|
.IP \(bu 2.3
|
||||||
.\}
|
.\}
|
||||||
.\" mysqldump: lines-terminated-by option
|
.\" mysqlimport: lines-terminated-by option
|
||||||
.\" lines-terminated-by option: mysqldump
|
.\" lines-terminated-by option: mysqlimport
|
||||||
\fB\-\-lines\-terminated\-by=\&.\&.\&.\fR
|
\fB\-\-lines\-terminated\-by=\&.\&.\&.\fR
|
||||||
.sp
|
.sp
|
||||||
This option has the same meaning as the corresponding clause for
|
This option has the same meaning as the corresponding clause for
|
||||||
|
@ -35,6 +35,7 @@ BEGIN
|
|||||||
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
|
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
|
||||||
AND variable_name not like 'GTID%POS'
|
AND variable_name not like 'GTID%POS'
|
||||||
AND variable_name != 'GTID_BINLOG_STATE'
|
AND variable_name != 'GTID_BINLOG_STATE'
|
||||||
|
AND variable_name != 'THREAD_POOL_SIZE'
|
||||||
ORDER BY variable_name;
|
ORDER BY variable_name;
|
||||||
|
|
||||||
-- Dump all databases, there should be none
|
-- Dump all databases, there should be none
|
||||||
|
@ -2518,6 +2518,17 @@ t2 CREATE TABLE `t2` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2, t1;
|
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
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -2036,6 +2036,20 @@ ALTER TABLE t2 DROP CONSTRAINT PRIMARY KEY;
|
|||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
DROP TABLE t2, t1;
|
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 #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -1689,7 +1689,7 @@ EXPLAIN
|
|||||||
SELECT * FROM t1 FORCE KEY (PRIMARY , i , c1 , c2)
|
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 ;
|
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
|
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;
|
DROP TABLE t1;
|
||||||
set optimizer_switch= @optimizer_switch_save;
|
set optimizer_switch= @optimizer_switch_save;
|
||||||
#
|
#
|
||||||
|
@ -865,6 +865,21 @@ Warning 1931 Query execution was interrupted. The query examined at least 22 row
|
|||||||
drop view v;
|
drop view v;
|
||||||
drop table t1, t2;
|
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
|
# MDEV-18117: Crash with Explain extended when using limit rows examined
|
||||||
#
|
#
|
||||||
create table t1 (c1 char(2));
|
create table t1 (c1 char(2));
|
||||||
@ -879,3 +894,4 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
Warnings:
|
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`
|
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;
|
drop table t1,t2;
|
||||||
|
# End of 10.4 tests
|
||||||
|
@ -578,6 +578,23 @@ EXECUTE ps;
|
|||||||
drop view v;
|
drop view v;
|
||||||
drop table t1, t2;
|
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 #
|
||||||
--echo # MDEV-18117: Crash with Explain extended when using limit rows examined
|
--echo # MDEV-18117: Crash with Explain extended when using limit rows examined
|
||||||
--echo #
|
--echo #
|
||||||
@ -589,3 +606,5 @@ insert into t2 values ('bb'), ('cc'), ('dd'), ('ff');
|
|||||||
explain extended
|
explain extended
|
||||||
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2;
|
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
|
--echo # End of 10.4 tests
|
||||||
|
@ -380,6 +380,14 @@ slow_log
|
|||||||
slow_log_new
|
slow_log_new
|
||||||
drop table slow_log_new, general_log_new;
|
drop table slow_log_new, general_log_new;
|
||||||
use test;
|
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 LOG_OUTPUT = 'TABLE';
|
||||||
SET GLOBAL general_log = 0;
|
SET GLOBAL general_log = 0;
|
||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
|
@ -54,7 +54,7 @@ select * from general_log where argument like '%general_log%';
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Check some basic queries interfering with the log tables.
|
# 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
|
# command type names, used in the tables
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -474,6 +474,24 @@ show tables like "%log%";
|
|||||||
drop table slow_log_new, general_log_new;
|
drop table slow_log_new, general_log_new;
|
||||||
use test;
|
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
|
# Bug#27857 (Log tables supplies the wrong value for generating
|
||||||
# AUTO_INCREMENT numbers)
|
# AUTO_INCREMENT numbers)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
DROP TABLE IF EXISTS t1,t2;
|
|
||||||
CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL) ;
|
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);
|
ALTER TABLE t1 ADD INDEX i1(a);
|
||||||
DELETE FROM t1 WHERE a > 2000000;
|
DELETE FROM t1 WHERE a > 2000000;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
--source include/long_test.inc
|
--source include/long_test.inc
|
||||||
|
--source include/have_sequence.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test of update statement that uses many tables.
|
# Test of update statement that uses many tables.
|
||||||
@ -40,25 +41,9 @@ if (`SELECT '$BIG_TEST' = '' AND $need_big = 1`)
|
|||||||
# Bug#1820 Rows not deleted from second table on multi-table delete
|
# 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) ;
|
CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL) ;
|
||||||
--echo # The protocolling of many inserts into t1 is suppressed.
|
INSERT INTO t1 SELECT seq,seq FROM seq_1_to_2097152;
|
||||||
--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
|
|
||||||
ALTER TABLE t1 ADD INDEX i1(a);
|
ALTER TABLE t1 ADD INDEX i1(a);
|
||||||
DELETE FROM t1 WHERE a > 2000000;
|
DELETE FROM t1 WHERE a > 2000000;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
|
@ -570,6 +570,128 @@ t1 CREATE TABLE `t1` (
|
|||||||
DROP TABLE test.t1;
|
DROP TABLE test.t1;
|
||||||
SET GLOBAL enforce_storage_engine=NULL;
|
SET GLOBAL enforce_storage_engine=NULL;
|
||||||
# End of 10.1 tests
|
# End of 10.1 tests
|
||||||
|
#
|
||||||
|
# MDEV-23201 'Roles' are created incorrectly on an install that was previously MySQL 5.7
|
||||||
|
#
|
||||||
|
#
|
||||||
|
DROP VIEW mysql.user;
|
||||||
|
FLUSH TABLES mysql.user;
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
SHOW CREATE TABLE mysql.user;
|
||||||
|
Table Create Table
|
||||||
|
user CREATE TABLE `user` (
|
||||||
|
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||||
|
`User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||||
|
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
|
||||||
|
`ssl_cipher` blob NOT NULL,
|
||||||
|
`x509_issuer` blob NOT NULL,
|
||||||
|
`x509_subject` blob NOT NULL,
|
||||||
|
`max_questions` int(11) unsigned NOT NULL DEFAULT 0,
|
||||||
|
`max_updates` int(11) unsigned NOT NULL DEFAULT 0,
|
||||||
|
`max_connections` int(11) unsigned NOT NULL DEFAULT 0,
|
||||||
|
`max_user_connections` int(11) unsigned NOT NULL DEFAULT 0,
|
||||||
|
`plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT 'mysql_native_password',
|
||||||
|
`authentication_string` text COLLATE utf8_bin DEFAULT NULL,
|
||||||
|
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
`password_last_changed` timestamp NULL DEFAULT NULL,
|
||||||
|
`password_lifetime` smallint(5) unsigned DEFAULT NULL,
|
||||||
|
`account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||||
|
PRIMARY KEY (`Host`,`User`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
|
||||||
|
Phase 1/7: Checking and upgrading mysql database
|
||||||
|
Processing databases
|
||||||
|
mysql
|
||||||
|
mysql.column_stats OK
|
||||||
|
mysql.columns_priv OK
|
||||||
|
mysql.db OK
|
||||||
|
mysql.event OK
|
||||||
|
mysql.func OK
|
||||||
|
mysql.global_priv OK
|
||||||
|
mysql.gtid_slave_pos OK
|
||||||
|
mysql.help_category OK
|
||||||
|
mysql.help_keyword OK
|
||||||
|
mysql.help_relation OK
|
||||||
|
mysql.help_topic OK
|
||||||
|
mysql.index_stats OK
|
||||||
|
mysql.innodb_index_stats OK
|
||||||
|
mysql.innodb_table_stats OK
|
||||||
|
mysql.plugin OK
|
||||||
|
mysql.proc OK
|
||||||
|
mysql.procs_priv OK
|
||||||
|
mysql.proxies_priv OK
|
||||||
|
mysql.roles_mapping OK
|
||||||
|
mysql.servers OK
|
||||||
|
mysql.table_stats OK
|
||||||
|
mysql.tables_priv OK
|
||||||
|
mysql.time_zone OK
|
||||||
|
mysql.time_zone_leap_second OK
|
||||||
|
mysql.time_zone_name OK
|
||||||
|
mysql.time_zone_transition OK
|
||||||
|
mysql.time_zone_transition_type OK
|
||||||
|
mysql.transaction_registry OK
|
||||||
|
mysql.user OK
|
||||||
|
Upgrading from a version before MariaDB-10.1
|
||||||
|
Phase 2/7: Installing used storage engines
|
||||||
|
Checking for tables with unknown storage engine
|
||||||
|
Phase 3/7: Fixing views
|
||||||
|
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||||
|
Phase 5/7: Fixing table and database names
|
||||||
|
Phase 6/7: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
|
performance_schema
|
||||||
|
test
|
||||||
|
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||||
|
OK
|
||||||
|
SHOW CREATE TABLE mysql.user;
|
||||||
|
View Create View character_set_client collation_connection
|
||||||
|
user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `mysql`.`user` AS select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` latin1 latin1_swedish_ci
|
||||||
|
CREATE ROLE `aRole`;
|
||||||
|
SET ROLE `aRole`;
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
SET ROLE `aRole`;
|
||||||
|
SELECT `User`, `is_role` FROM `mysql`.`user`;
|
||||||
|
User is_role
|
||||||
|
mariadb.sys N
|
||||||
|
root N
|
||||||
|
root N
|
||||||
|
root N
|
||||||
|
root N
|
||||||
|
aRole Y
|
||||||
|
DROP ROLE `aRole`;
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
# Ensure that mysql_upgrade correctly sets truncate_versioning_priv
|
# Ensure that mysql_upgrade correctly sets truncate_versioning_priv
|
||||||
|
@ -219,6 +219,37 @@ SET GLOBAL enforce_storage_engine=NULL;
|
|||||||
|
|
||||||
--echo # End of 10.1 tests
|
--echo # End of 10.1 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-23201 'Roles' are created incorrectly on an install that was previously MySQL 5.7
|
||||||
|
--echo #
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--exec $MYSQL_DUMP --result-file $MYSQLTEST_VARDIR/tmp/user.sql mysql user
|
||||||
|
DROP VIEW mysql.user;
|
||||||
|
|
||||||
|
--copy_file std_data/mysql57user.frm $MYSQLD_DATADIR/mysql/user.frm
|
||||||
|
--copy_file std_data/mysql57user.MYI $MYSQLD_DATADIR/mysql/user.MYI
|
||||||
|
--copy_file std_data/mysql57user.MYD $MYSQLD_DATADIR/mysql/user.MYD
|
||||||
|
FLUSH TABLES mysql.user;
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
SHOW CREATE TABLE mysql.user;
|
||||||
|
|
||||||
|
--exec $MYSQL_UPGRADE --force 2>&1
|
||||||
|
SHOW CREATE TABLE mysql.user;
|
||||||
|
|
||||||
|
CREATE ROLE `aRole`;
|
||||||
|
SET ROLE `aRole`;
|
||||||
|
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
|
||||||
|
SET ROLE `aRole`;
|
||||||
|
SELECT `User`, `is_role` FROM `mysql`.`user`;
|
||||||
|
|
||||||
|
DROP ROLE `aRole`;
|
||||||
|
--exec $MYSQL mysql < $MYSQLTEST_VARDIR/tmp/user.sql
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
|
||||||
|
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -2803,5 +2803,16 @@ id
|
|||||||
16
|
16
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-5628: Assertion `! is_set()' or `!is_set() ||
|
||||||
|
# (m_status == DA_OK_BULK && is_bulk_op())' fails on UPDATE on a
|
||||||
|
# partitioned table with subquery (MySQL:71630)
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT) PARTITION BY HASH(a) PARTITIONS 2;
|
||||||
|
CREATE TABLE t2 (b INT);
|
||||||
|
INSERT INTO t2 VALUES (1),(2);
|
||||||
|
UPDATE t1 SET a = 7 WHERE a = ( SELECT b FROM t2 ) ORDER BY a LIMIT 6;
|
||||||
|
ERROR 21000: Subquery returns more than 1 row
|
||||||
|
DROP TABLE t1,t2;
|
||||||
|
#
|
||||||
# End of 10.1 tests
|
# End of 10.1 tests
|
||||||
#
|
#
|
||||||
|
@ -3001,6 +3001,22 @@ insert t1 values (6, 'ab'), (4, 'ab'), (5, 'ab'), (16, 'ab'), (14, 'ab'), (15, '
|
|||||||
select id from t1 where data = 'ab' order by id;
|
select id from t1 where data = 'ab' order by id;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-5628: Assertion `! is_set()' or `!is_set() ||
|
||||||
|
--echo # (m_status == DA_OK_BULK && is_bulk_op())' fails on UPDATE on a
|
||||||
|
--echo # partitioned table with subquery (MySQL:71630)
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT) PARTITION BY HASH(a) PARTITIONS 2;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (b INT);
|
||||||
|
INSERT INTO t2 VALUES (1),(2);
|
||||||
|
|
||||||
|
--error ER_SUBQUERY_NO_1_ROW
|
||||||
|
UPDATE t1 SET a = 7 WHERE a = ( SELECT b FROM t2 ) ORDER BY a LIMIT 6;
|
||||||
|
|
||||||
|
DROP TABLE t1,t2;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.1 tests
|
--echo # End of 10.1 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -2188,3 +2188,8 @@ sleep(50)
|
|||||||
connection extracon;
|
connection extracon;
|
||||||
sleep(5.5)
|
sleep(5.5)
|
||||||
0
|
0
|
||||||
|
connect comp_con,localhost,root,,,,,COMPRESS;
|
||||||
|
SELECT 1;
|
||||||
|
1
|
||||||
|
1
|
||||||
|
disconnect comp_con;
|
||||||
|
@ -92,3 +92,9 @@ connection con2;
|
|||||||
|
|
||||||
connection extracon;
|
connection extracon;
|
||||||
--reap
|
--reap
|
||||||
|
|
||||||
|
# Check if compression works OK
|
||||||
|
connect (comp_con,localhost,root,,,,,COMPRESS);
|
||||||
|
SELECT 1;
|
||||||
|
disconnect comp_con;
|
||||||
|
|
||||||
|
@ -1297,7 +1297,7 @@ SELECT * FROM t1 WHERE
|
|||||||
25 <= a AND b = 23 OR
|
25 <= a AND b = 23 OR
|
||||||
23 <= a;
|
23 <= a;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
|
1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
|
||||||
SELECT * FROM t1 WHERE
|
SELECT * FROM t1 WHERE
|
||||||
23 <= a AND a <= 25 OR
|
23 <= a AND a <= 25 OR
|
||||||
25 <= a AND b = 23 OR
|
25 <= a AND b = 23 OR
|
||||||
@ -1427,7 +1427,7 @@ SELECT * FROM t3 WHERE
|
|||||||
a < 5 OR
|
a < 5 OR
|
||||||
a < 10;
|
a < 10;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t3 index a a 10 NULL 23 Using where; Using index
|
1 SIMPLE t3 range a a 5 NULL 9 Using where; Using index
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
#
|
#
|
||||||
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
|
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
|
||||||
@ -3113,6 +3113,82 @@ a b
|
|||||||
set eq_range_index_dive_limit=default;
|
set eq_range_index_dive_limit=default;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-23811: Both disjunct of WHERE condition contain range conditions
|
||||||
|
# for the same index such that the second range condition
|
||||||
|
# fully covers the first one. Additionally one of the disjuncts
|
||||||
|
# contains a range condition for the other index.
|
||||||
|
#
|
||||||
|
create table t1 (
|
||||||
|
pk int primary key auto_increment, a int, b int,
|
||||||
|
index idx1(a), index idx2(b)
|
||||||
|
);
|
||||||
|
insert into t1(a,b) values
|
||||||
|
(5,50), (1,10), (3,30), (7,70), (8,80), (4,40), (2,20), (6,60);
|
||||||
|
insert into t1(a,b) select a+10, b+100 from t1;
|
||||||
|
insert into t1(a,b) select a+20, b+200 from t1;
|
||||||
|
insert into t1(a,b) select a+30, b+300 from t1;
|
||||||
|
insert into t1(a,b) select a,b from t1;
|
||||||
|
analyze table t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status OK
|
||||||
|
explain select * from t1 where ((a between 3 and 4) and b < 100) or (a between 2 and 5);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range idx1,idx2 idx1 5 NULL 11 Using index condition; Using where
|
||||||
|
select * from t1 where ((a between 3 and 4) and b < 100) or (a between 2 and 5);
|
||||||
|
pk a b
|
||||||
|
7 2 20
|
||||||
|
71 2 20
|
||||||
|
3 3 30
|
||||||
|
67 3 30
|
||||||
|
6 4 40
|
||||||
|
70 4 40
|
||||||
|
1 5 50
|
||||||
|
65 5 50
|
||||||
|
explain select * from t1 where (a between 2 and 5) or ((a between 3 and 4) and b < 100);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range idx1,idx2 idx1 5 NULL 11 Using index condition; Using where
|
||||||
|
select * from t1 where (a between 2 and 5) or ((a between 3 and 4) and b < 100);
|
||||||
|
pk a b
|
||||||
|
7 2 20
|
||||||
|
71 2 20
|
||||||
|
3 3 30
|
||||||
|
67 3 30
|
||||||
|
6 4 40
|
||||||
|
70 4 40
|
||||||
|
1 5 50
|
||||||
|
65 5 50
|
||||||
|
explain select * from t1 where (a between 3 and 4) or ((a between 2 and 5) and b < 100);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range idx1,idx2 idx1 5 NULL 11 Using index condition; Using where
|
||||||
|
select * from t1 where (a between 3 and 4) or ((a between 2 and 5) and b < 100);
|
||||||
|
pk a b
|
||||||
|
7 2 20
|
||||||
|
71 2 20
|
||||||
|
3 3 30
|
||||||
|
67 3 30
|
||||||
|
6 4 40
|
||||||
|
70 4 40
|
||||||
|
1 5 50
|
||||||
|
65 5 50
|
||||||
|
explain select * from t1 where ((a between 2 and 5) and b < 100) or (a between 3 and 4);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range idx1,idx2 idx1 5 NULL 11 Using index condition; Using where
|
||||||
|
select * from t1 where ((a between 2 and 5) and b < 100) or (a between 3 and 4);
|
||||||
|
pk a b
|
||||||
|
7 2 20
|
||||||
|
71 2 20
|
||||||
|
3 3 30
|
||||||
|
67 3 30
|
||||||
|
6 4 40
|
||||||
|
70 4 40
|
||||||
|
1 5 50
|
||||||
|
65 5 50
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-18551: New defaults for eq_range_index_dive_limit
|
# MDEV-18551: New defaults for eq_range_index_dive_limit
|
||||||
#
|
#
|
||||||
create table ten(a int);
|
create table ten(a int);
|
||||||
@ -3132,9 +3208,7 @@ analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
|
|||||||
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
|
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
|
||||||
1 SIMPLE t1 index a a 5 NULL 2000 2000.00 10.05 60.05 Using where; Using index
|
1 SIMPLE t1 index a a 5 NULL 2000 2000.00 10.05 60.05 Using where; Using index
|
||||||
drop table t1,ten,t2;
|
drop table t1,ten,t2;
|
||||||
#
|
# End of 10.4 tests
|
||||||
# End of 10.2 tests
|
|
||||||
#
|
|
||||||
set global innodb_stats_persistent= @innodb_stats_persistent_save;
|
set global innodb_stats_persistent= @innodb_stats_persistent_save;
|
||||||
set global innodb_stats_persistent_sample_pages=
|
set global innodb_stats_persistent_sample_pages=
|
||||||
@innodb_stats_persistent_sample_pages_save;
|
@innodb_stats_persistent_sample_pages_save;
|
||||||
|
@ -2092,6 +2092,52 @@ set eq_range_index_dive_limit=default;
|
|||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-23811: Both disjunct of WHERE condition contain range conditions
|
||||||
|
--echo # for the same index such that the second range condition
|
||||||
|
--echo # fully covers the first one. Additionally one of the disjuncts
|
||||||
|
--echo # contains a range condition for the other index.
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t1 (
|
||||||
|
pk int primary key auto_increment, a int, b int,
|
||||||
|
index idx1(a), index idx2(b)
|
||||||
|
);
|
||||||
|
insert into t1(a,b) values
|
||||||
|
(5,50), (1,10), (3,30), (7,70), (8,80), (4,40), (2,20), (6,60);
|
||||||
|
insert into t1(a,b) select a+10, b+100 from t1;
|
||||||
|
insert into t1(a,b) select a+20, b+200 from t1;
|
||||||
|
insert into t1(a,b) select a+30, b+300 from t1;
|
||||||
|
insert into t1(a,b) select a,b from t1;
|
||||||
|
|
||||||
|
analyze table t1;
|
||||||
|
|
||||||
|
let $q1=
|
||||||
|
select * from t1 where ((a between 3 and 4) and b < 100) or (a between 2 and 5);
|
||||||
|
eval explain $q1;
|
||||||
|
eval $q1;
|
||||||
|
|
||||||
|
let $q2=
|
||||||
|
select * from t1 where (a between 2 and 5) or ((a between 3 and 4) and b < 100);
|
||||||
|
eval explain $q2;
|
||||||
|
eval $q2;
|
||||||
|
|
||||||
|
let $q3=
|
||||||
|
select * from t1 where (a between 3 and 4) or ((a between 2 and 5) and b < 100);
|
||||||
|
eval explain $q3;
|
||||||
|
eval $q3;
|
||||||
|
|
||||||
|
let $q4=
|
||||||
|
select * from t1 where ((a between 2 and 5) and b < 100) or (a between 3 and 4);
|
||||||
|
eval explain $q4;
|
||||||
|
eval $q4;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-18551: New defaults for eq_range_index_dive_limit
|
--echo # MDEV-18551: New defaults for eq_range_index_dive_limit
|
||||||
--echo #
|
--echo #
|
||||||
@ -2115,9 +2161,7 @@ let $a= `select group_concat(a) from t2`;
|
|||||||
eval analyze SELECT * FROM t1 where a in ($a);
|
eval analyze SELECT * FROM t1 where a in ($a);
|
||||||
drop table t1,ten,t2;
|
drop table t1,ten,t2;
|
||||||
|
|
||||||
--echo #
|
--echo # End of 10.4 tests
|
||||||
--echo # End of 10.2 tests
|
|
||||||
--echo #
|
|
||||||
|
|
||||||
set global innodb_stats_persistent= @innodb_stats_persistent_save;
|
set global innodb_stats_persistent= @innodb_stats_persistent_save;
|
||||||
set global innodb_stats_persistent_sample_pages=
|
set global innodb_stats_persistent_sample_pages=
|
||||||
|
@ -1300,7 +1300,7 @@ SELECT * FROM t1 WHERE
|
|||||||
25 <= a AND b = 23 OR
|
25 <= a AND b = 23 OR
|
||||||
23 <= a;
|
23 <= a;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
|
1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
|
||||||
SELECT * FROM t1 WHERE
|
SELECT * FROM t1 WHERE
|
||||||
23 <= a AND a <= 25 OR
|
23 <= a AND a <= 25 OR
|
||||||
25 <= a AND b = 23 OR
|
25 <= a AND b = 23 OR
|
||||||
@ -1430,7 +1430,7 @@ SELECT * FROM t3 WHERE
|
|||||||
a < 5 OR
|
a < 5 OR
|
||||||
a < 10;
|
a < 10;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t3 index a a 10 NULL 23 Using where; Using index
|
1 SIMPLE t3 range a a 5 NULL 9 Using where; Using index
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
#
|
#
|
||||||
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
|
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
|
||||||
@ -3110,6 +3110,82 @@ a b
|
|||||||
set eq_range_index_dive_limit=default;
|
set eq_range_index_dive_limit=default;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-23811: Both disjunct of WHERE condition contain range conditions
|
||||||
|
# for the same index such that the second range condition
|
||||||
|
# fully covers the first one. Additionally one of the disjuncts
|
||||||
|
# contains a range condition for the other index.
|
||||||
|
#
|
||||||
|
create table t1 (
|
||||||
|
pk int primary key auto_increment, a int, b int,
|
||||||
|
index idx1(a), index idx2(b)
|
||||||
|
);
|
||||||
|
insert into t1(a,b) values
|
||||||
|
(5,50), (1,10), (3,30), (7,70), (8,80), (4,40), (2,20), (6,60);
|
||||||
|
insert into t1(a,b) select a+10, b+100 from t1;
|
||||||
|
insert into t1(a,b) select a+20, b+200 from t1;
|
||||||
|
insert into t1(a,b) select a+30, b+300 from t1;
|
||||||
|
insert into t1(a,b) select a,b from t1;
|
||||||
|
analyze table t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status OK
|
||||||
|
explain select * from t1 where ((a between 3 and 4) and b < 100) or (a between 2 and 5);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range idx1,idx2 idx1 5 NULL 11 Using index condition; Using where; Rowid-ordered scan
|
||||||
|
select * from t1 where ((a between 3 and 4) and b < 100) or (a between 2 and 5);
|
||||||
|
pk a b
|
||||||
|
1 5 50
|
||||||
|
3 3 30
|
||||||
|
6 4 40
|
||||||
|
7 2 20
|
||||||
|
65 5 50
|
||||||
|
67 3 30
|
||||||
|
70 4 40
|
||||||
|
71 2 20
|
||||||
|
explain select * from t1 where (a between 2 and 5) or ((a between 3 and 4) and b < 100);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range idx1,idx2 idx1 5 NULL 11 Using index condition; Using where; Rowid-ordered scan
|
||||||
|
select * from t1 where (a between 2 and 5) or ((a between 3 and 4) and b < 100);
|
||||||
|
pk a b
|
||||||
|
1 5 50
|
||||||
|
3 3 30
|
||||||
|
6 4 40
|
||||||
|
7 2 20
|
||||||
|
65 5 50
|
||||||
|
67 3 30
|
||||||
|
70 4 40
|
||||||
|
71 2 20
|
||||||
|
explain select * from t1 where (a between 3 and 4) or ((a between 2 and 5) and b < 100);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range idx1,idx2 idx1 5 NULL 11 Using index condition; Using where; Rowid-ordered scan
|
||||||
|
select * from t1 where (a between 3 and 4) or ((a between 2 and 5) and b < 100);
|
||||||
|
pk a b
|
||||||
|
1 5 50
|
||||||
|
3 3 30
|
||||||
|
6 4 40
|
||||||
|
7 2 20
|
||||||
|
65 5 50
|
||||||
|
67 3 30
|
||||||
|
70 4 40
|
||||||
|
71 2 20
|
||||||
|
explain select * from t1 where ((a between 2 and 5) and b < 100) or (a between 3 and 4);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range idx1,idx2 idx1 5 NULL 11 Using index condition; Using where; Rowid-ordered scan
|
||||||
|
select * from t1 where ((a between 2 and 5) and b < 100) or (a between 3 and 4);
|
||||||
|
pk a b
|
||||||
|
1 5 50
|
||||||
|
3 3 30
|
||||||
|
6 4 40
|
||||||
|
7 2 20
|
||||||
|
65 5 50
|
||||||
|
67 3 30
|
||||||
|
70 4 40
|
||||||
|
71 2 20
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-18551: New defaults for eq_range_index_dive_limit
|
# MDEV-18551: New defaults for eq_range_index_dive_limit
|
||||||
#
|
#
|
||||||
create table ten(a int);
|
create table ten(a int);
|
||||||
@ -3129,9 +3205,7 @@ analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
|
|||||||
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
|
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
|
||||||
1 SIMPLE t1 index a a 5 NULL 2000 2000.00 10.05 60.05 Using where; Using index
|
1 SIMPLE t1 index a a 5 NULL 2000 2000.00 10.05 60.05 Using where; Using index
|
||||||
drop table t1,ten,t2;
|
drop table t1,ten,t2;
|
||||||
#
|
# End of 10.4 tests
|
||||||
# End of 10.2 tests
|
|
||||||
#
|
|
||||||
set global innodb_stats_persistent= @innodb_stats_persistent_save;
|
set global innodb_stats_persistent= @innodb_stats_persistent_save;
|
||||||
set global innodb_stats_persistent_sample_pages=
|
set global innodb_stats_persistent_sample_pages=
|
||||||
@innodb_stats_persistent_sample_pages_save;
|
@innodb_stats_persistent_sample_pages_save;
|
||||||
|
@ -374,7 +374,7 @@ WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
|
|||||||
OR ((ID BETWEEN 100 AND 200) AND
|
OR ((ID BETWEEN 100 AND 200) AND
|
||||||
(Name LIKE 'Pa%' OR (Population > 103200 AND Population < 104000)));
|
(Name LIKE 'Pa%' OR (Population > 103200 AND Population < 104000)));
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Population,PRIMARY 39,4,4 NULL 302 Using sort_union(Name,Population,PRIMARY); Using where
|
1 SIMPLE City range PRIMARY,Population,Country,Name PRIMARY 4 NULL 200 Using where
|
||||||
SELECT * FROM City USE INDEX ()
|
SELECT * FROM City USE INDEX ()
|
||||||
WHERE ((ID < 10) AND (Name LIKE 'H%' OR (Country > 'A' AND Country < 'ARG')))
|
WHERE ((ID < 10) AND (Name LIKE 'H%' OR (Country > 'A' AND Country < 'ARG')))
|
||||||
OR ((ID BETWEEN 100 AND 110) AND
|
OR ((ID BETWEEN 100 AND 110) AND
|
||||||
|
@ -3,27 +3,7 @@ set @save_max_heap_table_size=@@max_heap_table_size;
|
|||||||
set storage_engine=MYISAM;
|
set storage_engine=MYISAM;
|
||||||
CREATE TABLE t1 (id INTEGER);
|
CREATE TABLE t1 (id INTEGER);
|
||||||
CREATE TABLE t2 (id INTEGER);
|
CREATE TABLE t2 (id INTEGER);
|
||||||
INSERT INTO t1 (id) VALUES (1), (1), (1),(1);
|
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_1_to_1024 b;
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1;
|
|
||||||
/* 8 */
|
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1;
|
|
||||||
/* 12 */
|
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1;
|
|
||||||
/* 16 */
|
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1;
|
|
||||||
/* 20 */
|
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1;
|
|
||||||
/* 24 */
|
|
||||||
INSERT INTO t1 SELECT id+1 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+2 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+4 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+8 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+16 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+32 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+64 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+128 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+256 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+512 FROM t1;
|
|
||||||
SELECT AVG(DISTINCT id) FROM t1 GROUP BY id % 13;
|
SELECT AVG(DISTINCT id) FROM t1 GROUP BY id % 13;
|
||||||
AVG(DISTINCT id)
|
AVG(DISTINCT id)
|
||||||
513.5000
|
513.5000
|
||||||
@ -54,11 +34,9 @@ SUM(DISTINCT id)/COUNT(DISTINCT id)
|
|||||||
517.0000
|
517.0000
|
||||||
511.5000
|
511.5000
|
||||||
512.5000
|
512.5000
|
||||||
INSERT INTO t1 SELECT id+1024 FROM t1;
|
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_1025_to_16384 b;
|
||||||
INSERT INTO t1 SELECT id+2048 FROM t1;
|
INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a,seq_1_to_16384 b
|
||||||
INSERT INTO t1 SELECT id+4096 FROM t1;
|
ORDER by (a.seq*0+b.seq)*rand();
|
||||||
INSERT INTO t1 SELECT id+8192 FROM t1;
|
|
||||||
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
|
|
||||||
SELECT SUM(DISTINCT id) sm FROM t1;
|
SELECT SUM(DISTINCT id) sm FROM t1;
|
||||||
sm
|
sm
|
||||||
134225920
|
134225920
|
||||||
@ -110,9 +88,10 @@ sm
|
|||||||
# (bug #56927)
|
# (bug #56927)
|
||||||
#
|
#
|
||||||
SET max_heap_table_size=default;
|
SET max_heap_table_size=default;
|
||||||
INSERT INTO t1 SELECT id+16384 FROM t1;
|
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_16385_to_32768 b;
|
||||||
DELETE FROM t2;
|
TRUNCATE t2;
|
||||||
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
|
INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a,seq_1_to_32768 b
|
||||||
|
ORDER BY (a.seq*0+b.seq)*rand();
|
||||||
SELECT SUM(DISTINCT id) sm FROM t2;
|
SELECT SUM(DISTINCT id) sm FROM t2;
|
||||||
sm
|
sm
|
||||||
536887296
|
536887296
|
||||||
|
@ -19,32 +19,15 @@ set storage_engine=MYISAM;
|
|||||||
CREATE TABLE t1 (id INTEGER);
|
CREATE TABLE t1 (id INTEGER);
|
||||||
CREATE TABLE t2 (id INTEGER);
|
CREATE TABLE t2 (id INTEGER);
|
||||||
|
|
||||||
INSERT INTO t1 (id) VALUES (1), (1), (1),(1);
|
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_1_to_1024 b;
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1; /* 8 */
|
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1; /* 12 */
|
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1; /* 16 */
|
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1; /* 20 */
|
|
||||||
INSERT INTO t1 (id) SELECT id FROM t1; /* 24 */
|
|
||||||
INSERT INTO t1 SELECT id+1 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+2 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+4 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+8 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+16 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+32 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+64 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+128 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+256 FROM t1;
|
|
||||||
INSERT INTO t1 SELECT id+512 FROM t1;
|
|
||||||
|
|
||||||
# Just test that AVG(DISTINCT) is there
|
# Just test that AVG(DISTINCT) is there
|
||||||
SELECT AVG(DISTINCT id) FROM t1 GROUP BY id % 13;
|
SELECT AVG(DISTINCT id) FROM t1 GROUP BY id % 13;
|
||||||
SELECT SUM(DISTINCT id)/COUNT(DISTINCT id) FROM t1 GROUP BY id % 13;
|
SELECT SUM(DISTINCT id)/COUNT(DISTINCT id) FROM t1 GROUP BY id % 13;
|
||||||
|
|
||||||
INSERT INTO t1 SELECT id+1024 FROM t1;
|
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_1025_to_16384 b;
|
||||||
INSERT INTO t1 SELECT id+2048 FROM t1;
|
INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a,seq_1_to_16384 b
|
||||||
INSERT INTO t1 SELECT id+4096 FROM t1;
|
ORDER by (a.seq*0+b.seq)*rand();
|
||||||
INSERT INTO t1 SELECT id+8192 FROM t1;
|
|
||||||
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
|
|
||||||
|
|
||||||
# SELECT '++++++++++++++++++++++++++++++++++++++++++++++++++';
|
# SELECT '++++++++++++++++++++++++++++++++++++++++++++++++++';
|
||||||
|
|
||||||
@ -74,9 +57,10 @@ SELECT SUM(DISTINCT id) sm FROM t1 GROUP BY id % 13;
|
|||||||
|
|
||||||
SET max_heap_table_size=default;
|
SET max_heap_table_size=default;
|
||||||
|
|
||||||
INSERT INTO t1 SELECT id+16384 FROM t1;
|
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_16385_to_32768 b;
|
||||||
DELETE FROM t2;
|
TRUNCATE t2;
|
||||||
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
|
INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a,seq_1_to_32768 b
|
||||||
|
ORDER BY (a.seq*0+b.seq)*rand();
|
||||||
|
|
||||||
SELECT SUM(DISTINCT id) sm FROM t2;
|
SELECT SUM(DISTINCT id) sm FROM t2;
|
||||||
|
|
||||||
|
@ -479,9 +479,23 @@ myfunc_int(max(a) over (order by b) , b)
|
|||||||
drop view v1;
|
drop view v1;
|
||||||
drop function myfunc_int;
|
drop function myfunc_int;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
MDEV-15073: Generic UDAF parser code in server for windows functions
|
# MDEV-23327: Can't uninstall UDF if the implementation library
|
||||||
|
# file doesn't exist
|
||||||
|
#
|
||||||
|
insert into mysql.func values ("unexisting_udf", 0, "soname", "function");
|
||||||
|
select * from mysql.func WHERE name='unexisting_udf';
|
||||||
|
name ret dl type
|
||||||
|
unexisting_udf 0 soname function
|
||||||
|
DROP FUNCTION unexisting_udf;
|
||||||
|
select * from mysql.plugin WHERE name='unexisting_udf';
|
||||||
|
name dl
|
||||||
|
DROP FUNCTION unexisting_udf;
|
||||||
|
ERROR 42000: FUNCTION test.unexisting_udf does not exist
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
|
# MDEV-15073: Generic UDAF parser code in server for window functions
|
||||||
|
#
|
||||||
CREATE AGGREGATE FUNCTION avgcost
|
CREATE AGGREGATE FUNCTION avgcost
|
||||||
RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
|
RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
|
||||||
CREATE AGGREGATE FUNCTION avg2
|
CREATE AGGREGATE FUNCTION avg2
|
||||||
@ -584,3 +598,4 @@ drop table t1;
|
|||||||
DROP FUNCTION avgcost;
|
DROP FUNCTION avgcost;
|
||||||
DROP FUNCTION avg2;
|
DROP FUNCTION avg2;
|
||||||
DROP FUNCTION myfunc_double;
|
DROP FUNCTION myfunc_double;
|
||||||
|
# End of 10.4 tests
|
||||||
|
@ -542,9 +542,31 @@ drop view v1;
|
|||||||
drop function myfunc_int;
|
drop function myfunc_int;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
--echo
|
--echo #
|
||||||
--echo MDEV-15073: Generic UDAF parser code in server for windows functions
|
--echo # MDEV-23327: Can't uninstall UDF if the implementation library
|
||||||
--echo
|
--echo # file doesn't exist
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
# emulate brocken so/ddl udf
|
||||||
|
insert into mysql.func values ("unexisting_udf", 0, "soname", "function");
|
||||||
|
|
||||||
|
# check that we have the function "installed"
|
||||||
|
select * from mysql.func WHERE name='unexisting_udf';
|
||||||
|
|
||||||
|
# make attempt to drop the function
|
||||||
|
DROP FUNCTION unexisting_udf;
|
||||||
|
|
||||||
|
# check that we have the plugin uninstalled
|
||||||
|
select * from mysql.plugin WHERE name='unexisting_udf';
|
||||||
|
|
||||||
|
--error ER_SP_DOES_NOT_EXIST
|
||||||
|
DROP FUNCTION unexisting_udf;
|
||||||
|
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-15073: Generic UDAF parser code in server for window functions
|
||||||
|
--echo #
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE AGGREGATE FUNCTION avgcost
|
eval CREATE AGGREGATE FUNCTION avgcost
|
||||||
@ -607,3 +629,5 @@ drop table t1;
|
|||||||
DROP FUNCTION avgcost;
|
DROP FUNCTION avgcost;
|
||||||
DROP FUNCTION avg2;
|
DROP FUNCTION avg2;
|
||||||
DROP FUNCTION myfunc_double;
|
DROP FUNCTION myfunc_double;
|
||||||
|
|
||||||
|
--echo # End of 10.4 tests
|
||||||
|
@ -1661,6 +1661,16 @@ sub command_line_setup {
|
|||||||
$opt_shutdown_timeout= 24 * 60;
|
$opt_shutdown_timeout= 24 * 60;
|
||||||
# One day for PID file creation (this is given in seconds not minutes)
|
# One day for PID file creation (this is given in seconds not minutes)
|
||||||
$opt_start_timeout= 24 * 60 * 60;
|
$opt_start_timeout= 24 * 60 * 60;
|
||||||
|
if ($opt_rr && open(my $fh, '<', '/proc/sys/kernel/perf_event_paranoid'))
|
||||||
|
{
|
||||||
|
my $perf_event_paranoid= <$fh>;
|
||||||
|
close $fh;
|
||||||
|
chomp $perf_event_paranoid;
|
||||||
|
if ($perf_event_paranoid == 0)
|
||||||
|
{
|
||||||
|
mtr_error("rr requires kernel.perf_event_paranoid set to 1");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
@ -6419,7 +6429,7 @@ Options for debugging the product
|
|||||||
debug-server Use debug version of server, but without turning on
|
debug-server Use debug version of server, but without turning on
|
||||||
tracing
|
tracing
|
||||||
debugger=NAME Start mysqld in the selected debugger
|
debugger=NAME Start mysqld in the selected debugger
|
||||||
gdb Start the mysqld(s) in gdb
|
gdb[=gdb_arguments] Start the mysqld(s) in gdb
|
||||||
manual-debug Let user manually start mysqld in debugger, before
|
manual-debug Let user manually start mysqld in debugger, before
|
||||||
running test(s)
|
running test(s)
|
||||||
manual-gdb Let user manually start mysqld in gdb, before running
|
manual-gdb Let user manually start mysqld in gdb, before running
|
||||||
|
BIN
mysql-test/std_data/mysql57user.MYD
Normal file
BIN
mysql-test/std_data/mysql57user.MYD
Normal file
Binary file not shown.
BIN
mysql-test/std_data/mysql57user.MYI
Normal file
BIN
mysql-test/std_data/mysql57user.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/mysql57user.frm
Normal file
BIN
mysql-test/std_data/mysql57user.frm
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
|||||||
|
set @@global.binlog_checksum = CRC32;
|
||||||
|
call mtr.add_suppression("Replication event checksum verification failed");
|
||||||
|
call mtr.add_suppression("Error in Log_event::read_log_event");
|
||||||
|
# restart: --master_verify_checksum=ON --debug_dbug=+d,corrupt_read_log_event_char
|
||||||
|
set @@global.debug_dbug = VALUE;
|
||||||
|
set @@global.master_verify_checksum = DO_CHECKSUM;
|
||||||
|
set @@global.binlog_checksum = BINLOG_CHECKSUM;
|
||||||
|
# EOF the test
|
37
mysql-test/suite/binlog/t/binlog_recover_checksum_error.test
Normal file
37
mysql-test/suite/binlog/t/binlog_recover_checksum_error.test
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# The test verifies server binlog-based recovery.
|
||||||
|
#
|
||||||
|
# MDEV-23832 checksum error at server binlog recovery should not crash
|
||||||
|
|
||||||
|
# The test logic really requires --log-bin.
|
||||||
|
--source include/have_binlog_format_mixed.inc
|
||||||
|
--source include/have_debug.inc
|
||||||
|
|
||||||
|
--let $do_checksum = `SELECT @@global.master_verify_checksum`
|
||||||
|
--let $debug_dbug_saved = `SELECT @@global.debug_dbug`
|
||||||
|
--let $binlog_checksum = `SELECT @@global.binlog_checksum`
|
||||||
|
set @@global.binlog_checksum = CRC32;
|
||||||
|
|
||||||
|
call mtr.add_suppression("Replication event checksum verification failed");
|
||||||
|
call mtr.add_suppression("Error in Log_event::read_log_event");
|
||||||
|
|
||||||
|
# Proof of no crash follows.
|
||||||
|
# There's no need for actual bin-loggable queries to the server
|
||||||
|
--let $restart_parameters= --master_verify_checksum=ON --debug_dbug="+d,corrupt_read_log_event_char"
|
||||||
|
--let $shutdown_timeout=0
|
||||||
|
--source include/restart_mysqld.inc
|
||||||
|
--let $restart_parameters=
|
||||||
|
--let $shutdown_timeout=
|
||||||
|
|
||||||
|
#
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
--replace_regex /= .*/= VALUE/
|
||||||
|
--eval set @@global.debug_dbug = "$debug_dbug_saved"
|
||||||
|
|
||||||
|
--replace_result $do_checksum DO_CHECKSUM
|
||||||
|
--eval set @@global.master_verify_checksum = $do_checksum
|
||||||
|
--replace_result $binlog_checksum BINLOG_CHECKSUM
|
||||||
|
--eval set @@global.binlog_checksum = $binlog_checksum
|
||||||
|
#
|
||||||
|
--echo # EOF the test
|
||||||
|
#
|
@ -41,6 +41,14 @@ call innodb_insert_proc(2000);
|
|||||||
insert into innodb_compact select * from innodb_normal;
|
insert into innodb_compact select * from innodb_normal;
|
||||||
insert into innodb_dynamic select * from innodb_normal;
|
insert into innodb_dynamic select * from innodb_normal;
|
||||||
commit;
|
commit;
|
||||||
|
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
select variable_value > 0 from information_schema.global_status
|
||||||
|
where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
||||||
|
variable_value > 0
|
||||||
|
1
|
||||||
# restart: --innodb-encrypt-tables=OFF
|
# restart: --innodb-encrypt-tables=OFF
|
||||||
set global innodb_compression_algorithm = 1;
|
set global innodb_compression_algorithm = 1;
|
||||||
alter table innodb_normal engine=innodb page_compressed=DEFAULT;
|
alter table innodb_normal engine=innodb page_compressed=DEFAULT;
|
||||||
@ -64,6 +72,16 @@ innodb_dynamic CREATE TABLE `innodb_dynamic` (
|
|||||||
`c1` bigint(20) NOT NULL,
|
`c1` bigint(20) NOT NULL,
|
||||||
`b` char(200) DEFAULT NULL
|
`b` char(200) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||||
|
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
select variable_value > 0 from information_schema.global_status
|
||||||
|
where variable_name = 'INNODB_NUM_PAGES_PAGE_DECOMPRESSED';
|
||||||
|
variable_value > 0
|
||||||
|
1
|
||||||
drop procedure innodb_insert_proc;
|
drop procedure innodb_insert_proc;
|
||||||
drop table innodb_normal;
|
drop table innodb_normal;
|
||||||
drop table innodb_compact;
|
drop table innodb_compact;
|
||||||
|
@ -37,41 +37,44 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
|
|||||||
`c1` bigint(20) NOT NULL,
|
`c1` bigint(20) NOT NULL,
|
||||||
`b` char(200) DEFAULT NULL
|
`b` char(200) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT `encrypted`=yes `encryption_key_id`=4
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT `encrypted`=yes `encryption_key_id`=4
|
||||||
create procedure innodb_insert_proc (repeat_count int)
|
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||||
begin
|
UNLOCK TABLES;
|
||||||
declare current_num int;
|
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||||
set current_num = 0;
|
UNLOCK TABLES;
|
||||||
while current_num < repeat_count do
|
FLUSH TABLES innodb_compressed FOR EXPORT;
|
||||||
insert into innodb_normal values(current_num, substring(MD5(RAND()), -64));
|
UNLOCK TABLES;
|
||||||
set current_num = current_num + 1;
|
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||||
end while;
|
UNLOCK TABLES;
|
||||||
end//
|
FLUSH TABLES innodb_redundant FOR EXPORT;
|
||||||
commit;
|
UNLOCK TABLES;
|
||||||
begin;
|
select variable_value > 0 from information_schema.global_status
|
||||||
call innodb_insert_proc(2000);
|
where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
||||||
insert into innodb_compact select * from innodb_normal;
|
|
||||||
insert into innodb_compressed select * from innodb_normal;
|
|
||||||
insert into innodb_dynamic select * from innodb_normal;
|
|
||||||
insert into innodb_redundant select * from innodb_normal;
|
|
||||||
commit;
|
|
||||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
|
||||||
variable_value > 0
|
variable_value > 0
|
||||||
1
|
1
|
||||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
|
||||||
variable_value >= 0
|
|
||||||
1
|
|
||||||
# restart
|
# restart
|
||||||
update innodb_normal set c1 = c1 +1;
|
BEGIN;
|
||||||
update innodb_compact set c1 = c1 + 1;
|
INSERT INTO innodb_normal SET c1 = 1;
|
||||||
update innodb_compressed set c1 = c1 + 1;
|
INSERT INTO innodb_compact SET c1 = 1;
|
||||||
update innodb_dynamic set c1 = c1 + 1;
|
INSERT INTO innodb_compressed SET c1 = 1;
|
||||||
update innodb_redundant set c1 = c1 + 1;
|
INSERT INTO innodb_dynamic SET c1 = 1;
|
||||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
INSERT INTO innodb_redundant SET c1 = 1;
|
||||||
variable_value > 0
|
COMMIT;
|
||||||
1
|
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
UNLOCK TABLES;
|
||||||
variable_value > 0
|
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||||
1
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_compressed FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_redundant FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
select variable_name from information_schema.global_status
|
||||||
|
where variable_value > 0 and variable_name
|
||||||
|
IN ('INNODB_NUM_PAGES_ENCRYPTED','INNODB_NUM_PAGES_DECRYPTED');
|
||||||
|
variable_name
|
||||||
|
INNODB_NUM_PAGES_ENCRYPTED
|
||||||
|
INNODB_NUM_PAGES_DECRYPTED
|
||||||
SET GLOBAL innodb_encrypt_tables=OFF;
|
SET GLOBAL innodb_encrypt_tables=OFF;
|
||||||
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
||||||
show create table innodb_compact;
|
show create table innodb_compact;
|
||||||
@ -101,13 +104,16 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
|
|||||||
`c1` bigint(20) NOT NULL,
|
`c1` bigint(20) NOT NULL,
|
||||||
`b` char(200) DEFAULT NULL
|
`b` char(200) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
||||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||||
variable_value >= 0
|
UNLOCK TABLES;
|
||||||
1
|
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
UNLOCK TABLES;
|
||||||
variable_value >= 0
|
FLUSH TABLES innodb_compressed FOR EXPORT;
|
||||||
1
|
UNLOCK TABLES;
|
||||||
drop procedure innodb_insert_proc;
|
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_redundant FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
drop table innodb_normal;
|
drop table innodb_normal;
|
||||||
drop table innodb_compact;
|
drop table innodb_compact;
|
||||||
drop table innodb_compressed;
|
drop table innodb_compressed;
|
||||||
|
@ -37,8 +37,10 @@ insert into innodb_compact select * from innodb_normal;
|
|||||||
insert into innodb_dynamic select * from innodb_normal;
|
insert into innodb_dynamic select * from innodb_normal;
|
||||||
commit;
|
commit;
|
||||||
|
|
||||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||||
--source include/wait_condition.inc
|
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||||
|
select variable_value > 0 from information_schema.global_status
|
||||||
|
where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
||||||
|
|
||||||
--let $restart_parameters=--innodb-encrypt-tables=OFF
|
--let $restart_parameters=--innodb-encrypt-tables=OFF
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
@ -52,8 +54,13 @@ alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEF
|
|||||||
show create table innodb_compact;
|
show create table innodb_compact;
|
||||||
alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT page_compressed=DEFAULT;
|
alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT page_compressed=DEFAULT;
|
||||||
show create table innodb_dynamic;
|
show create table innodb_dynamic;
|
||||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_DECOMPRESSED';
|
|
||||||
--source include/wait_condition.inc
|
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||||
|
|
||||||
|
select variable_value > 0 from information_schema.global_status
|
||||||
|
where variable_name = 'INNODB_NUM_PAGES_PAGE_DECOMPRESSED';
|
||||||
|
|
||||||
drop procedure innodb_insert_proc;
|
drop procedure innodb_insert_proc;
|
||||||
drop table innodb_normal;
|
drop table innodb_normal;
|
||||||
|
@ -18,47 +18,34 @@ show create table innodb_compressed;
|
|||||||
show create table innodb_dynamic;
|
show create table innodb_dynamic;
|
||||||
show create table innodb_redundant;
|
show create table innodb_redundant;
|
||||||
|
|
||||||
delimiter //;
|
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||||
create procedure innodb_insert_proc (repeat_count int)
|
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||||
begin
|
FLUSH TABLES innodb_compressed FOR EXPORT; UNLOCK TABLES;
|
||||||
declare current_num int;
|
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||||
set current_num = 0;
|
FLUSH TABLES innodb_redundant FOR EXPORT; UNLOCK TABLES;
|
||||||
while current_num < repeat_count do
|
|
||||||
insert into innodb_normal values(current_num, substring(MD5(RAND()), -64));
|
|
||||||
set current_num = current_num + 1;
|
|
||||||
end while;
|
|
||||||
end//
|
|
||||||
delimiter ;//
|
|
||||||
commit;
|
|
||||||
|
|
||||||
begin;
|
select variable_value > 0 from information_schema.global_status
|
||||||
call innodb_insert_proc(2000);
|
where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
||||||
insert into innodb_compact select * from innodb_normal;
|
|
||||||
insert into innodb_compressed select * from innodb_normal;
|
|
||||||
insert into innodb_dynamic select * from innodb_normal;
|
|
||||||
insert into innodb_redundant select * from innodb_normal;
|
|
||||||
commit;
|
|
||||||
|
|
||||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
|
||||||
--source include/wait_condition.inc
|
|
||||||
|
|
||||||
# Note there that these variables are updated only when real I/O is done, thus they are not reliable
|
|
||||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
|
||||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
|
||||||
|
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
|
|
||||||
update innodb_normal set c1 = c1 +1;
|
BEGIN;
|
||||||
update innodb_compact set c1 = c1 + 1;
|
INSERT INTO innodb_normal SET c1 = 1;
|
||||||
update innodb_compressed set c1 = c1 + 1;
|
INSERT INTO innodb_compact SET c1 = 1;
|
||||||
update innodb_dynamic set c1 = c1 + 1;
|
INSERT INTO innodb_compressed SET c1 = 1;
|
||||||
update innodb_redundant set c1 = c1 + 1;
|
INSERT INTO innodb_dynamic SET c1 = 1;
|
||||||
|
INSERT INTO innodb_redundant SET c1 = 1;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||||
--source include/wait_condition.inc
|
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_compressed FOR EXPORT; UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_redundant FOR EXPORT; UNLOCK TABLES;
|
||||||
|
|
||||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
select variable_name from information_schema.global_status
|
||||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
where variable_value > 0 and variable_name
|
||||||
|
IN ('INNODB_NUM_PAGES_ENCRYPTED','INNODB_NUM_PAGES_DECRYPTED');
|
||||||
|
|
||||||
SET GLOBAL innodb_encrypt_tables=OFF;
|
SET GLOBAL innodb_encrypt_tables=OFF;
|
||||||
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
||||||
@ -70,13 +57,12 @@ show create table innodb_dynamic;
|
|||||||
alter table innodb_redundant engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
alter table innodb_redundant engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
||||||
show create table innodb_redundant;
|
show create table innodb_redundant;
|
||||||
|
|
||||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_DECRYPTED';
|
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||||
--source include/wait_condition.inc
|
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_compressed FOR EXPORT; UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||||
|
FLUSH TABLES innodb_redundant FOR EXPORT; UNLOCK TABLES;
|
||||||
|
|
||||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
|
||||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
|
||||||
|
|
||||||
drop procedure innodb_insert_proc;
|
|
||||||
drop table innodb_normal;
|
drop table innodb_normal;
|
||||||
drop table innodb_compact;
|
drop table innodb_compact;
|
||||||
drop table innodb_compressed;
|
drop table innodb_compressed;
|
||||||
|
@ -197,7 +197,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
|
|||||||
SELECT * FROM db_datadict_2.res_6_408002_2;
|
SELECT * FROM db_datadict_2.res_6_408002_2;
|
||||||
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' 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; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
|
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
|
||||||
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
@ -213,7 +213,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
|
|||||||
SELECT * FROM db_datadict_2.res_6_408002_2;
|
SELECT * FROM db_datadict_2.res_6_408002_2;
|
||||||
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' 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; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
|
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
|
||||||
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
@ -229,7 +229,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
|
|||||||
SELECT * FROM db_datadict_2.res_6_408002_2;
|
SELECT * FROM db_datadict_2.res_6_408002_2;
|
||||||
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' 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; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
|
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
|
||||||
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
|
@ -27,7 +27,6 @@ galera_ftwrl : MDEV-21525 galera.galera_ftwrl
|
|||||||
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
|
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
|
||||||
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
|
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
|
||||||
galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
|
galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
|
||||||
galera_load_data : MDEV-19968 galera.galera_load_data
|
|
||||||
galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
|
galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
|
||||||
galera_mdl_race : MDEV-21524 galera.galera_mdl_race
|
galera_mdl_race : MDEV-21524 galera.galera_mdl_race
|
||||||
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
|
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
|
||||||
|
@ -19,10 +19,18 @@ connection node_2;
|
|||||||
Performing --wsrep-recover ...
|
Performing --wsrep-recover ...
|
||||||
Using --wsrep-start-position when starting mysqld ...
|
Using --wsrep-start-position when starting mysqld ...
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
5
|
||||||
|
connection node_2;
|
||||||
|
SET SESSION wsrep_sync_wait = 15;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
5
|
||||||
include/diff_servers.inc [servers=1 2]
|
include/diff_servers.inc [servers=1 2]
|
||||||
connection node_1;
|
connection node_1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
|
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
|
||||||
include/assert_grep.inc [IST first seqno [24] not found from cache, falling back to SST]
|
include/assert_grep.inc [not found from cache, falling back to SST]
|
||||||
connection node_2;
|
connection node_2;
|
||||||
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
|
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
|
||||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@
|
|||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
|
connection node_2;
|
||||||
|
Shutting down server ...
|
||||||
|
connection node_1;
|
||||||
|
CREATE DATABASE `lost+found`;
|
||||||
|
USE `lost+found`;
|
||||||
|
CREATE TABLE t1(id INT);
|
||||||
|
INSERT INTO t1 VALUES (1), (2);
|
||||||
|
SELECT * FROM `lost+found`.t1;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
CREATE DATABASE `#mysql50#not_lost+found`;
|
||||||
|
USE `#mysql50#not_lost+found`;
|
||||||
|
CREATE TABLE t1(id INT);
|
||||||
|
INSERT INTO t1 VALUES (1), (2);
|
||||||
|
SELECT * FROM `#mysql50#not_lost+found`.t1;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
Cleaning var directory ...
|
||||||
|
connection node_2;
|
||||||
|
Starting server ...
|
||||||
|
SELECT * FROM `lost+found`.t1;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
SELECT * FROM `#mysql50#not_lost+found`.t1;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
connection node_1;
|
||||||
|
DROP DATABASE `lost+found`;
|
||||||
|
DROP DATABASE `#mysql50#not_lost+found`;
|
||||||
|
disconnect node_2;
|
||||||
|
disconnect node_1;
|
@ -46,6 +46,12 @@ INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
|
|||||||
--source include/galera_wait_ready.inc
|
--source include/galera_wait_ready.inc
|
||||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SET SESSION wsrep_sync_wait = 15;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
|
||||||
--let $diff_servers = 1 2
|
--let $diff_servers = 1 2
|
||||||
--source include/diff_servers.inc
|
--source include/diff_servers.inc
|
||||||
|
|
||||||
@ -56,8 +62,8 @@ DROP TABLE t1;
|
|||||||
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
|
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
|
||||||
|
|
||||||
# Confirm that IST did not take place
|
# Confirm that IST did not take place
|
||||||
--let $assert_text = IST first seqno [24] not found from cache, falling back to SST
|
--let $assert_text = not found from cache, falling back to SST
|
||||||
--let $assert_select = IST first seqno [24] not found from cache, falling back to SST
|
--let $assert_select = not found from cache, falling back to SST
|
||||||
--let $assert_count = 1
|
--let $assert_count = 1
|
||||||
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
|
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
|
||||||
--let $assert_only_after = starting as process
|
--let $assert_only_after = starting as process
|
||||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,15 @@
|
|||||||
|
!include ../galera_2nodes.cnf
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
wsrep_sst_method=mariabackup
|
||||||
|
wsrep_sst_auth="root:"
|
||||||
|
|
||||||
|
[mysqld.1]
|
||||||
|
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||||
|
|
||||||
|
[mysqld.2]
|
||||||
|
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||||
|
|
||||||
|
[sst]
|
||||||
|
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||||
|
streamfmt=xbstream
|
@ -0,0 +1,71 @@
|
|||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_mariabackup.inc
|
||||||
|
|
||||||
|
# Save original auto_increment_offset values.
|
||||||
|
--let $node_1=node_1
|
||||||
|
--let $node_2=node_2
|
||||||
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
|
||||||
|
#--connection node_2
|
||||||
|
#--source suite/galera/include/galera_unload_provider.inc
|
||||||
|
|
||||||
|
--echo Shutting down server ...
|
||||||
|
--source include/shutdown_mysqld.inc
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
CREATE DATABASE `lost+found`;
|
||||||
|
USE `lost+found`;
|
||||||
|
CREATE TABLE t1(id INT);
|
||||||
|
INSERT INTO t1 VALUES (1), (2);
|
||||||
|
SELECT * FROM `lost+found`.t1;
|
||||||
|
|
||||||
|
CREATE DATABASE `#mysql50#not_lost+found`;
|
||||||
|
USE `#mysql50#not_lost+found`;
|
||||||
|
CREATE TABLE t1(id INT);
|
||||||
|
INSERT INTO t1 VALUES (1), (2);
|
||||||
|
SELECT * FROM `#mysql50#not_lost+found`.t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Force SST
|
||||||
|
#
|
||||||
|
--echo Cleaning var directory ...
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
|
||||||
|
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr
|
||||||
|
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema
|
||||||
|
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test
|
||||||
|
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mysql
|
||||||
|
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
|
||||||
|
--echo Starting server ...
|
||||||
|
let $restart_noprint=2;
|
||||||
|
--source include/start_mysqld.inc
|
||||||
|
|
||||||
|
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
SELECT * FROM `lost+found`.t1;
|
||||||
|
SELECT * FROM `#mysql50#not_lost+found`.t1;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
|
||||||
|
DROP DATABASE `lost+found`;
|
||||||
|
DROP DATABASE `#mysql50#not_lost+found`;
|
||||||
|
|
||||||
|
# rmdir $MYSQLD_DATADIR/lost+found;
|
||||||
|
# rmdir $MYSQLD_DATADIR/not_lost+found;
|
||||||
|
|
||||||
|
# Restore original auto_increment_offset values.
|
||||||
|
--source include/auto_increment_offset_restore.inc
|
||||||
|
|
||||||
|
--source include/galera_end.inc
|
@ -11,11 +11,6 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster
|
galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster
|
||||||
galera_ipv6_mariabackup : MDEV-21770 galera_3nodes.galera_ipv6_mariabackup fails
|
|
||||||
galera_ipv6_mariabackup_section : MDEV-21770 galera_3nodes.galera_ipv6_mariabackup fails
|
|
||||||
galera_ipv6_mysqldump : MDEV-23576 galera_3nodes.galera_ipv6_mysqldump MTR failed: WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
|
|
||||||
galera_ipv6_rsync : MDEV-23581 galera_3nodes.galera_ipv6_rsync MTR failed: WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
|
|
||||||
galera_ipv6_rsync_section : MDEV-23580 galera_3nodes.galera_ipv6_rsync_section MTR failed: WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
|
|
||||||
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
|
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
|
||||||
galera_slave_options_do :MDEV-8798
|
galera_slave_options_do :MDEV-8798
|
||||||
galera_slave_options_ignore : MDEV-8798
|
galera_slave_options_ignore : MDEV-8798
|
||||||
|
@ -769,3 +769,24 @@ ID ParentID Value Flag
|
|||||||
INSERT INTO parent (ID) VALUES (100);
|
INSERT INTO parent (ID) VALUES (100);
|
||||||
UPDATE child SET ParentID=100 WHERE ID=123123;
|
UPDATE child SET ParentID=100 WHERE ID=123123;
|
||||||
DROP TABLE child, parent;
|
DROP TABLE child, parent;
|
||||||
|
#
|
||||||
|
# MDEV-23387 dict_load_foreign() fails to load the table during alter
|
||||||
|
#
|
||||||
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
|
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
|
||||||
|
f3 INT AS (f1) VIRTUAL,
|
||||||
|
INDEX(f1), INDEX(f2))ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ADD CONSTRAINT r FOREIGN KEY(f2) REFERENCES t1(f1), LOCK=NONE;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`f1` int(11) NOT NULL,
|
||||||
|
`f2` int(11) NOT NULL,
|
||||||
|
`f3` int(11) GENERATED ALWAYS AS (`f1`) VIRTUAL,
|
||||||
|
KEY `f1` (`f1`),
|
||||||
|
KEY `f2` (`f2`),
|
||||||
|
CONSTRAINT `r` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
ALTER TABLE t1 DROP INDEX f1;
|
||||||
|
ALTER TABLE t1 DROP f3;
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -637,3 +637,15 @@ UPDATE child SET ParentID=100 WHERE ID=123123;
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
DROP TABLE child, parent;
|
DROP TABLE child, parent;
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-23387 dict_load_foreign() fails to load the table during alter
|
||||||
|
--echo #
|
||||||
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
|
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
|
||||||
|
f3 INT AS (f1) VIRTUAL,
|
||||||
|
INDEX(f1), INDEX(f2))ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ADD CONSTRAINT r FOREIGN KEY(f2) REFERENCES t1(f1), LOCK=NONE;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
ALTER TABLE t1 DROP INDEX f1;
|
||||||
|
ALTER TABLE t1 DROP f3;
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -420,6 +420,41 @@ connection default;
|
|||||||
XA END 'xid';
|
XA END 'xid';
|
||||||
XA ROLLBACK 'xid';
|
XA ROLLBACK 'xid';
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY,
|
||||||
|
f1 VARCHAR(10), f2 VARCHAR(10),
|
||||||
|
f3 VARCHAR(10), f4 VARCHAR(10),
|
||||||
|
f5 VARCHAR(10), f6 VARCHAR(10),
|
||||||
|
f7 VARCHAR(10), f8 VARCHAR(10),
|
||||||
|
INDEX(f1), INDEX(f2), INDEX(f3), INDEX(f4),
|
||||||
|
INDEX(f5), INDEX(f6), INDEX(f7), INDEX(f8)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
|
||||||
|
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
|
||||||
|
(2, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
|
||||||
|
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
|
||||||
|
(3, 'innodb', 'innodb', 'innodb', 'innodb',
|
||||||
|
'innodb', 'innodb', 'innodb', 'innodb');
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f1) REFERENCES t1 (f2) ON DELETE SET NULL;
|
||||||
|
START TRANSACTION;
|
||||||
|
DELETE FROM t1 where f1='mariadb';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
pk f1 f2 f3 f4 f5 f6 f7 f8
|
||||||
|
2 NULL mariadb mariadb mariadb mariadb mariadb mariadb mariadb
|
||||||
|
3 innodb innodb innodb innodb innodb innodb innodb innodb
|
||||||
|
ROLLBACK;
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f3) REFERENCES t1 (f4) ON DELETE CASCADE;
|
||||||
|
START TRANSACTION;
|
||||||
|
DELETE FROM t1 where f3='mariadb';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
pk f1 f2 f3 f4 f5 f6 f7 f8
|
||||||
|
3 innodb innodb innodb innodb innodb innodb innodb innodb
|
||||||
|
ROLLBACK;
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f5) REFERENCES t1 (f6) ON UPDATE SET NULL;
|
||||||
|
UPDATE t1 SET f6='update';
|
||||||
|
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)
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f7) REFERENCES t1 (f8) ON UPDATE CASCADE;
|
||||||
|
UPDATE t1 SET f6='cascade';
|
||||||
|
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)
|
||||||
|
DROP TABLE t1;
|
||||||
# Start of 10.2 tests
|
# Start of 10.2 tests
|
||||||
#
|
#
|
||||||
# MDEV-13246 Stale rows despite ON DELETE CASCADE constraint
|
# MDEV-13246 Stale rows despite ON DELETE CASCADE constraint
|
||||||
|
@ -48,3 +48,5 @@ innodb_stats_drop_locked
|
|||||||
innodb_stats_drop_locked
|
innodb_stats_drop_locked
|
||||||
innodb_stats_drop_locked
|
innodb_stats_drop_locked
|
||||||
innodb_stats_drop_locked
|
innodb_stats_drop_locked
|
||||||
|
DELETE FROM mysql.innodb_index_stats WHERE database_name='test' AND table_name='innodb_stats_drop_locked';
|
||||||
|
DELETE FROM mysql.innodb_table_stats WHERE database_name='test' AND table_name='innodb_stats_drop_locked';
|
||||||
|
@ -421,6 +421,41 @@ ALTER TABLE t1 ADD FOREIGN KEY f (a) REFERENCES t1 (pk), LOCK=EXCLUSIVE;# Cleanu
|
|||||||
XA END 'xid';
|
XA END 'xid';
|
||||||
XA ROLLBACK 'xid';
|
XA ROLLBACK 'xid';
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY,
|
||||||
|
f1 VARCHAR(10), f2 VARCHAR(10),
|
||||||
|
f3 VARCHAR(10), f4 VARCHAR(10),
|
||||||
|
f5 VARCHAR(10), f6 VARCHAR(10),
|
||||||
|
f7 VARCHAR(10), f8 VARCHAR(10),
|
||||||
|
INDEX(f1), INDEX(f2), INDEX(f3), INDEX(f4),
|
||||||
|
INDEX(f5), INDEX(f6), INDEX(f7), INDEX(f8)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
|
||||||
|
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
|
||||||
|
(2, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
|
||||||
|
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
|
||||||
|
(3, 'innodb', 'innodb', 'innodb', 'innodb',
|
||||||
|
'innodb', 'innodb', 'innodb', 'innodb');
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f1) REFERENCES t1 (f2) ON DELETE SET NULL;
|
||||||
|
START TRANSACTION;
|
||||||
|
DELETE FROM t1 where f1='mariadb';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f3) REFERENCES t1 (f4) ON DELETE CASCADE;
|
||||||
|
|
||||||
|
START TRANSACTION;
|
||||||
|
DELETE FROM t1 where f3='mariadb';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f5) REFERENCES t1 (f6) ON UPDATE SET NULL;
|
||||||
|
--error ER_ROW_IS_REFERENCED_2
|
||||||
|
UPDATE t1 SET f6='update';
|
||||||
|
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f7) REFERENCES t1 (f8) ON UPDATE CASCADE;
|
||||||
|
--error ER_ROW_IS_REFERENCED_2
|
||||||
|
UPDATE t1 SET f6='cascade';
|
||||||
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# End of 10.1 tests
|
# End of 10.1 tests
|
||||||
#
|
#
|
||||||
|
@ -56,6 +56,8 @@ WHERE table_name='innodb_stats_drop_locked';
|
|||||||
SELECT table_name FROM mysql.innodb_index_stats
|
SELECT table_name FROM mysql.innodb_index_stats
|
||||||
WHERE table_name='innodb_stats_drop_locked';
|
WHERE table_name='innodb_stats_drop_locked';
|
||||||
|
|
||||||
|
DELETE FROM mysql.innodb_index_stats WHERE database_name='test' AND table_name='innodb_stats_drop_locked';
|
||||||
|
DELETE FROM mysql.innodb_table_stats WHERE database_name='test' AND table_name='innodb_stats_drop_locked';
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
call mtr.add_suppression("Unable to delete statistics for table test.innodb_stats_drop_locked: Lock wait timeout. They can be deleted later using DELETE FROM mysql.innodb_index_stats WHERE database_name");
|
call mtr.add_suppression("Unable to delete statistics for table test.innodb_stats_drop_locked: Lock wait timeout. They can be deleted later using DELETE FROM mysql.innodb_index_stats WHERE database_name");
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
@ -1 +0,0 @@
|
|||||||
--loose-innodb-lock-schedule-algorithm=FCFS
|
|
5
mysql-test/suite/innodb/t/update-cascade.combinations
Normal file
5
mysql-test/suite/innodb/t/update-cascade.combinations
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[FCFS]
|
||||||
|
--innodb-lock-schedule-algorithm=FCFS
|
||||||
|
|
||||||
|
[VATS]
|
||||||
|
--innodb-lock-schedule-algorithm=VATS
|
@ -132,6 +132,27 @@ id title body
|
|||||||
3 Optimizing MySQL In this tutorial we will show ...
|
3 Optimizing MySQL In this tutorial we will show ...
|
||||||
4 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
|
4 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
|
||||||
5 MySQL vs. YourSQL In the following database comparison ...
|
5 MySQL vs. YourSQL In the following database comparison ...
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('(((((((((((((((((((((((((((((((((Security)))))))))))))))))))))))))))))))))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
ERROR HY000: Table handler out of memory
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('((((((((((((((((((((((((((((((((Security))))))))))))))))))))))))))))))))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
id title body
|
||||||
|
6 MySQL Security When configured properly, MySQL ...
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('(((((((((((((((((((((((((((((((vs))))))))))))))))))))))))))))))),(((to)))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
id title body
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('((((((((((((((((((((((((((((((((Security)))))))))))))))))))))))))))))))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
ERROR 42000: syntax error, unexpected $end
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('(((((((((((((((((((((((((((((((((Security))))))))))))))))))))))))))))))))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
ERROR 42000: syntax error, unexpected $end
|
||||||
SELECT * FROM articles WHERE MATCH (title,body)
|
SELECT * FROM articles WHERE MATCH (title,body)
|
||||||
AGAINST ('+ MySQL + (>Well < stands)' IN BOOLEAN MODE);
|
AGAINST ('+ MySQL + (>Well < stands)' IN BOOLEAN MODE);
|
||||||
id title body
|
id title body
|
||||||
|
@ -919,4 +919,46 @@ DROP TABLE t1;
|
|||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP TABLE t3;
|
DROP TABLE t3;
|
||||||
DROP TABLE t4;
|
DROP TABLE t4;
|
||||||
|
#
|
||||||
|
# InnoDB: Failing assertion: result != FTS_INVALID in
|
||||||
|
# fts_trx_row_get_new_state
|
||||||
|
#
|
||||||
|
SET FOREIGN_KEY_CHECKS=1;
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY,
|
||||||
|
f1 VARCHAR(10), f2 VARCHAR(10),
|
||||||
|
f3 VARCHAR(10), f4 VARCHAR(10),
|
||||||
|
f5 VARCHAR(10), f6 VARCHAR(10),
|
||||||
|
f7 VARCHAR(10), f8 VARCHAR(10),
|
||||||
|
FULLTEXT(f1), FULLTEXT(f2), FULLTEXT(f3), FULLTEXT(f4),
|
||||||
|
FULLTEXT(f5), FULLTEXT(f6), FULLTEXT(f7), FULLTEXT(f8),
|
||||||
|
INDEX(f1), INDEX(f2), INDEX(f3), INDEX(f4),
|
||||||
|
INDEX(f5), INDEX(f6), INDEX(f7), INDEX(f8)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
|
||||||
|
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
|
||||||
|
(2, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
|
||||||
|
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
|
||||||
|
(3, 'innodb', 'innodb', 'innodb', 'innodb',
|
||||||
|
'innodb', 'innodb', 'innodb', 'innodb');
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f1) REFERENCES t1 (f2) ON DELETE SET NULL;
|
||||||
|
START TRANSACTION;
|
||||||
|
DELETE FROM t1 where f1='mariadb';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
pk f1 f2 f3 f4 f5 f6 f7 f8
|
||||||
|
2 NULL mariadb mariadb mariadb mariadb mariadb mariadb mariadb
|
||||||
|
3 innodb innodb innodb innodb innodb innodb innodb innodb
|
||||||
|
ROLLBACK;
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f3) REFERENCES t1 (f4) ON DELETE CASCADE;
|
||||||
|
START TRANSACTION;
|
||||||
|
DELETE FROM t1 where f3='mariadb';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
pk f1 f2 f3 f4 f5 f6 f7 f8
|
||||||
|
3 innodb innodb innodb innodb innodb innodb innodb innodb
|
||||||
|
ROLLBACK;
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f5) REFERENCES t1 (f6) ON UPDATE SET NULL;
|
||||||
|
UPDATE t1 SET f6='update';
|
||||||
|
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)
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f7) REFERENCES t1 (f8) ON UPDATE CASCADE;
|
||||||
|
UPDATE t1 SET f6='cascade';
|
||||||
|
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)
|
||||||
|
DROP TABLE t1;
|
||||||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
||||||
|
@ -107,6 +107,26 @@ SELECT * FROM articles WHERE MATCH (title,body)
|
|||||||
SELECT * FROM articles WHERE MATCH (title,body)
|
SELECT * FROM articles WHERE MATCH (title,body)
|
||||||
AGAINST ('+ MySQL - (Well stands)' IN BOOLEAN MODE);
|
AGAINST ('+ MySQL - (Well stands)' IN BOOLEAN MODE);
|
||||||
|
|
||||||
|
--error 128
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('(((((((((((((((((((((((((((((((((Security)))))))))))))))))))))))))))))))))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('((((((((((((((((((((((((((((((((Security))))))))))))))))))))))))))))))))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('(((((((((((((((((((((((((((((((vs))))))))))))))))))))))))))))))),(((to)))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('((((((((((((((((((((((((((((((((Security)))))))))))))))))))))))))))))))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
SELECT * FROM articles WHERE MATCH (title,body) AGAINST
|
||||||
|
('(((((((((((((((((((((((((((((((((Security))))))))))))))))))))))))))))))))'
|
||||||
|
IN BOOLEAN MODE);
|
||||||
|
|
||||||
# Test sub-expression boolean search. Find rows contain
|
# Test sub-expression boolean search. Find rows contain
|
||||||
# "MySQL" and "Well" or "MySQL" and "stands". But rank the
|
# "MySQL" and "Well" or "MySQL" and "stands". But rank the
|
||||||
# doc with "Well" higher, and doc with "stands" lower.
|
# doc with "Well" higher, and doc with "stands" lower.
|
||||||
|
@ -889,4 +889,46 @@ DROP TABLE t2;
|
|||||||
DROP TABLE t3;
|
DROP TABLE t3;
|
||||||
DROP TABLE t4;
|
DROP TABLE t4;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # InnoDB: Failing assertion: result != FTS_INVALID in
|
||||||
|
--echo # fts_trx_row_get_new_state
|
||||||
|
--echo #
|
||||||
|
SET FOREIGN_KEY_CHECKS=1;
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY,
|
||||||
|
f1 VARCHAR(10), f2 VARCHAR(10),
|
||||||
|
f3 VARCHAR(10), f4 VARCHAR(10),
|
||||||
|
f5 VARCHAR(10), f6 VARCHAR(10),
|
||||||
|
f7 VARCHAR(10), f8 VARCHAR(10),
|
||||||
|
FULLTEXT(f1), FULLTEXT(f2), FULLTEXT(f3), FULLTEXT(f4),
|
||||||
|
FULLTEXT(f5), FULLTEXT(f6), FULLTEXT(f7), FULLTEXT(f8),
|
||||||
|
INDEX(f1), INDEX(f2), INDEX(f3), INDEX(f4),
|
||||||
|
INDEX(f5), INDEX(f6), INDEX(f7), INDEX(f8)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
|
||||||
|
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
|
||||||
|
(2, 'mariadb', 'mariadb', 'mariadb', 'mariadb',
|
||||||
|
'mariadb', 'mariadb', 'mariadb', 'mariadb'),
|
||||||
|
(3, 'innodb', 'innodb', 'innodb', 'innodb',
|
||||||
|
'innodb', 'innodb', 'innodb', 'innodb');
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f1) REFERENCES t1 (f2) ON DELETE SET NULL;
|
||||||
|
START TRANSACTION;
|
||||||
|
DELETE FROM t1 where f1='mariadb';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f3) REFERENCES t1 (f4) ON DELETE CASCADE;
|
||||||
|
|
||||||
|
START TRANSACTION;
|
||||||
|
DELETE FROM t1 where f3='mariadb';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f5) REFERENCES t1 (f6) ON UPDATE SET NULL;
|
||||||
|
--error ER_ROW_IS_REFERENCED_2
|
||||||
|
UPDATE t1 SET f6='update';
|
||||||
|
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (f7) REFERENCES t1 (f8) ON UPDATE CASCADE;
|
||||||
|
--error ER_ROW_IS_REFERENCED_2
|
||||||
|
UPDATE t1 SET f6='cascade';
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
||||||
|
13
mysql-test/suite/parts/r/reorganize.result
Normal file
13
mysql-test/suite/parts/r/reorganize.result
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#
|
||||||
|
# MDEV-23248 Server crashes in mi_extra /
|
||||||
|
# ha_partition::loop_extra_alter upon REORGANIZE
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 70 (PARTITION p1 VALUES LESS THAN (100), PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||||
|
INSERT INTO t1 SELECT 4, 6 FROM seq_1_to_131072;
|
||||||
|
UPDATE t1 SET a = 7;
|
||||||
|
set @org_debug=@@debug_dbug;
|
||||||
|
set @@debug_dbug="+d,debug_abort_copy_partitions";
|
||||||
|
ALTER TABLE t1 REORGANIZE PARTITION p1,p2 INTO (PARTITION p1 VALUES LESS THAN (5), PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||||
|
ERROR 42000: Table 't1' uses an extension that doesn't exist in this MariaDB version
|
||||||
|
set @@debug_dbug=@org_debug;
|
||||||
|
DROP TABLE t1;
|
20
mysql-test/suite/parts/t/reorganize.test
Normal file
20
mysql-test/suite/parts/t/reorganize.test
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--source include/have_sequence.inc
|
||||||
|
--source include/have_partition.inc
|
||||||
|
--source include/have_debug.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-23248 Server crashes in mi_extra /
|
||||||
|
--echo # ha_partition::loop_extra_alter upon REORGANIZE
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 70 (PARTITION p1 VALUES LESS THAN (100), PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||||
|
INSERT INTO t1 SELECT 4, 6 FROM seq_1_to_131072;
|
||||||
|
UPDATE t1 SET a = 7;
|
||||||
|
|
||||||
|
set @org_debug=@@debug_dbug;
|
||||||
|
set @@debug_dbug="+d,debug_abort_copy_partitions";
|
||||||
|
--error ER_UNSUPPORTED_EXTENSION
|
||||||
|
ALTER TABLE t1 REORGANIZE PARTITION p1,p2 INTO (PARTITION p1 VALUES LESS THAN (5), PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||||
|
set @@debug_dbug=@org_debug;
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
@ -16,6 +16,5 @@ rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition
|
|||||||
rpl_row_binlog_max_cache_size : MDEV-11092
|
rpl_row_binlog_max_cache_size : MDEV-11092
|
||||||
rpl_row_index_choice : MDEV-11666
|
rpl_row_index_choice : MDEV-11666
|
||||||
rpl_semi_sync_after_sync : fails after MDEV-16172
|
rpl_semi_sync_after_sync : fails after MDEV-16172
|
||||||
rpl_slave_grp_exec: MDEV-10514
|
|
||||||
rpl_auto_increment_update_failure : disabled for now
|
rpl_auto_increment_update_failure : disabled for now
|
||||||
rpl_current_user : waits for MDEV-22374 fix
|
rpl_current_user : waits for MDEV-22374 fix
|
||||||
|
@ -3,20 +3,66 @@ include/master-slave.inc
|
|||||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
call mtr.add_suppression("table or database name 'mysqltest-1'");
|
call mtr.add_suppression("table or database name 'mysqltest-1'");
|
||||||
connection master;
|
connection master;
|
||||||
DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`;
|
CREATE DATABASE `mysqltest-1`;
|
||||||
CREATE DATABASE `#mysql50#mysqltest-1`;
|
|
||||||
connection slave;
|
connection slave;
|
||||||
connection master;
|
connection master;
|
||||||
connection slave;
|
connection slave;
|
||||||
connection master;
|
connection master;
|
||||||
Master position is not changed
|
Master position is not changed
|
||||||
connection slave;
|
connection slave;
|
||||||
STOP SLAVE SQL_THREAD;
|
SET @old_general_log_state = @@global.general_log;
|
||||||
include/wait_for_slave_sql_to_stop.inc
|
SET @old_slow_log_state = @@global.slow_query_log;
|
||||||
|
SET @old_log_output = @@global.log_output;
|
||||||
|
SET GLOBAL general_log = 'ON';
|
||||||
|
SET GLOBAL slow_query_log = 'ON';
|
||||||
|
SET GLOBAL log_output = 'FILE';
|
||||||
|
connection master;
|
||||||
|
ALTER TABLE mysql.slow_log DROP COLUMN thread_id, DROP COLUMN rows_affected;
|
||||||
|
DROP DATABASE `mysqltest-1`;
|
||||||
|
connection slave;
|
||||||
|
connection slave;
|
||||||
|
SHOW CREATE TABLE mysql.slow_log;
|
||||||
|
Table Create Table
|
||||||
|
slow_log CREATE TABLE `slow_log` (
|
||||||
|
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||||
|
`user_host` mediumtext NOT NULL,
|
||||||
|
`query_time` time(6) NOT NULL,
|
||||||
|
`lock_time` time(6) NOT NULL,
|
||||||
|
`rows_sent` int(11) NOT NULL,
|
||||||
|
`rows_examined` int(11) NOT NULL,
|
||||||
|
`db` varchar(512) NOT NULL,
|
||||||
|
`last_insert_id` int(11) NOT NULL,
|
||||||
|
`insert_id` int(11) NOT NULL,
|
||||||
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
|
`sql_text` mediumtext NOT NULL
|
||||||
|
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
|
||||||
connection master;
|
connection master;
|
||||||
connection master;
|
connection master;
|
||||||
Master position has been changed
|
Master position has been changed
|
||||||
DROP DATABASE `mysqltest-1`;
|
|
||||||
connection slave;
|
connection slave;
|
||||||
DROP DATABASE `#mysql50#mysqltest-1`;
|
connection slave;
|
||||||
|
SHOW CREATE TABLE mysql.slow_log;
|
||||||
|
Table Create Table
|
||||||
|
slow_log CREATE TABLE `slow_log` (
|
||||||
|
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||||
|
`user_host` mediumtext NOT NULL,
|
||||||
|
`query_time` time(6) NOT NULL,
|
||||||
|
`lock_time` time(6) NOT NULL,
|
||||||
|
`rows_sent` int(11) NOT NULL,
|
||||||
|
`rows_examined` int(11) NOT NULL,
|
||||||
|
`db` varchar(512) NOT NULL,
|
||||||
|
`last_insert_id` int(11) NOT NULL,
|
||||||
|
`insert_id` int(11) NOT NULL,
|
||||||
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
|
`sql_text` mediumtext NOT NULL,
|
||||||
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
|
`rows_affected` int(11) NOT NULL
|
||||||
|
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
|
||||||
|
SET GLOBAL general_log = 'OFF';
|
||||||
|
SET GLOBAL slow_query_log = 'OFF';
|
||||||
|
truncate mysql.slow_log;
|
||||||
|
truncate mysql.general_log;
|
||||||
|
SET GLOBAL general_log = @old_general_log_state;
|
||||||
|
SET GLOBAL slow_query_log = @old_slow_log_state;
|
||||||
|
SET GLOBAL log_output = @old_log_output;
|
||||||
include/rpl_end.inc
|
include/rpl_end.inc
|
||||||
|
@ -5,10 +5,12 @@ set @time_before_kill := (select CURRENT_TIMESTAMP);
|
|||||||
[Time before the query]
|
[Time before the query]
|
||||||
[Connection ID of the slave I/O thread found]
|
[Connection ID of the slave I/O thread found]
|
||||||
kill <connection_id>;
|
kill <connection_id>;
|
||||||
|
include/wait_for_slave_io_to_stop.inc
|
||||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||||
[Time after the query]
|
[Time after the query]
|
||||||
[Killing of the slave IO thread was successful]
|
[Killing of the slave IO thread was successful]
|
||||||
START SLAVE IO_THREAD;
|
START SLAVE IO_THREAD;
|
||||||
|
include/wait_for_slave_io_to_start.inc
|
||||||
connection master;
|
connection master;
|
||||||
create table t1 (a int primary key);
|
create table t1 (a int primary key);
|
||||||
connection slave;
|
connection slave;
|
||||||
|
@ -55,8 +55,17 @@ FLUSH BINARY LOGS;
|
|||||||
--let $purge_to_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
|
--let $purge_to_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
--eval PURGE BINARY LOGS TO '$purge_to_binlog';
|
--eval PURGE BINARY LOGS TO '$purge_to_binlog';
|
||||||
# with final removal of the extra domain
|
# with final removal of the extra domain
|
||||||
|
###adding to debug info to catch the failure (1076):
|
||||||
|
--error 0,1076
|
||||||
--eval FLUSH BINARY LOGS DELETE_DOMAIN_ID=($extra_domain_id)
|
--eval FLUSH BINARY LOGS DELETE_DOMAIN_ID=($extra_domain_id)
|
||||||
|
|
||||||
|
if ($mysql_errno == 1076) {
|
||||||
|
--echo ### Failure "Could not delete gtid domain"
|
||||||
|
--source include/show_rpl_debug_info.inc
|
||||||
|
}
|
||||||
|
|
||||||
SELECT @@global.gtid_binlog_pos, @@global.gtid_binlog_state;
|
SELECT @@global.gtid_binlog_pos, @@global.gtid_binlog_state;
|
||||||
|
|
||||||
--connection slave
|
--connection slave
|
||||||
SELECT @@global.gtid_slave_pos;
|
SELECT @@global.gtid_slave_pos;
|
||||||
# start the slave sucessfully
|
# start the slave sucessfully
|
||||||
|
@ -14,8 +14,7 @@ call mtr.add_suppression("table or database name 'mysqltest-1'");
|
|||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`;
|
CREATE DATABASE `mysqltest-1`;
|
||||||
CREATE DATABASE `#mysql50#mysqltest-1`;
|
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
@ -34,13 +33,25 @@ if ($before_position == $after_position)
|
|||||||
echo Master position is not changed;
|
echo Master position is not changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Some log events of the mysql_upgrade's will cause errors on slave.
|
# Some log events of the mysql_upgrade previously caused errors on slave,
|
||||||
|
# however with MDEV-4851 this should be ok, so we test it:
|
||||||
connection slave;
|
connection slave;
|
||||||
STOP SLAVE SQL_THREAD;
|
SET @old_general_log_state = @@global.general_log;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
SET @old_slow_log_state = @@global.slow_query_log;
|
||||||
|
SET @old_log_output = @@global.log_output;
|
||||||
|
SET GLOBAL general_log = 'ON';
|
||||||
|
SET GLOBAL slow_query_log = 'ON';
|
||||||
|
SET GLOBAL log_output = 'FILE';
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
#With '--force' option, mysql_upgrade always executes all sql statements for upgrading.
|
#With '--force' option, mysql_upgrade always executes all sql statements for upgrading.
|
||||||
|
ALTER TABLE mysql.slow_log DROP COLUMN thread_id, DROP COLUMN rows_affected;
|
||||||
|
DROP DATABASE `mysqltest-1`;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
SHOW CREATE TABLE mysql.slow_log;
|
||||||
|
connection master;
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --write-binlog --force --user=root > $MYSQLTEST_VARDIR/log/mysql_upgrade.log 2>&1
|
--exec $MYSQL_UPGRADE --skip-verbose --write-binlog --force --user=root > $MYSQLTEST_VARDIR/log/mysql_upgrade.log 2>&1
|
||||||
|
|
||||||
let $datadir= `select @@datadir`;
|
let $datadir= `select @@datadir`;
|
||||||
@ -55,8 +66,15 @@ if ($before_position != $after_position)
|
|||||||
echo Master position has been changed;
|
echo Master position has been changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
DROP DATABASE `mysqltest-1`;
|
sync_slave_with_master;
|
||||||
connection slave;
|
connection slave;
|
||||||
DROP DATABASE `#mysql50#mysqltest-1`;
|
SHOW CREATE TABLE mysql.slow_log;
|
||||||
--let $rpl_only_running_threads= 1
|
SET GLOBAL general_log = 'OFF';
|
||||||
|
SET GLOBAL slow_query_log = 'OFF';
|
||||||
|
truncate mysql.slow_log;
|
||||||
|
truncate mysql.general_log;
|
||||||
|
SET GLOBAL general_log = @old_general_log_state;
|
||||||
|
SET GLOBAL slow_query_log = @old_slow_log_state;
|
||||||
|
SET GLOBAL log_output = @old_log_output;
|
||||||
|
|
||||||
--source include/rpl_end.inc
|
--source include/rpl_end.inc
|
||||||
|
@ -101,7 +101,9 @@ TRUNCATE t3;
|
|||||||
ALTER TABLE t1 ADD PRIMARY KEY (a);
|
ALTER TABLE t1 ADD PRIMARY KEY (a);
|
||||||
ALTER TABLE t2 ADD PRIMARY KEY (a);
|
ALTER TABLE t2 ADD PRIMARY KEY (a);
|
||||||
ALTER TABLE t3 ADD PRIMARY KEY (a);
|
ALTER TABLE t3 ADD PRIMARY KEY (a);
|
||||||
--sync_slave_with_master
|
|
||||||
|
#--sync_slave_with_master
|
||||||
|
--connection slave
|
||||||
RENAME TABLE t3 TO t3_bak;
|
RENAME TABLE t3 TO t3_bak;
|
||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
@ -146,7 +148,7 @@ ALTER TABLE t1 ENGINE=InnoDB;
|
|||||||
ALTER TABLE t2 ENGINE=InnoDB;
|
ALTER TABLE t2 ENGINE=InnoDB;
|
||||||
ALTER TABLE t3 ENGINE=InnoDB;
|
ALTER TABLE t3 ENGINE=InnoDB;
|
||||||
|
|
||||||
--connection slave
|
--sync_slave_with_master
|
||||||
RENAME TABLE t3 TO t3_bak;
|
RENAME TABLE t3 TO t3_bak;
|
||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
|
@ -38,8 +38,8 @@ set @time_before_kill := (select CURRENT_TIMESTAMP);
|
|||||||
|
|
||||||
--replace_regex /kill [0-9]*/kill <connection_id>/
|
--replace_regex /kill [0-9]*/kill <connection_id>/
|
||||||
--eval kill $connection_id
|
--eval kill $connection_id
|
||||||
let $wait_condition= SELECT COUNT(*) = 0 FROM information_schema.processlist where id=$connection_id;
|
--source include/wait_for_slave_io_to_stop.inc
|
||||||
--source include/wait_condition.inc
|
|
||||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||||
|
|
||||||
--echo [Time after the query]
|
--echo [Time after the query]
|
||||||
@ -52,6 +52,7 @@ if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
|
|||||||
--echo [Killing of the slave IO thread was successful]
|
--echo [Killing of the slave IO thread was successful]
|
||||||
|
|
||||||
START SLAVE IO_THREAD;
|
START SLAVE IO_THREAD;
|
||||||
|
--source include/wait_for_slave_io_to_start.inc
|
||||||
|
|
||||||
# Ensure that the slave io thread started properly
|
# Ensure that the slave io thread started properly
|
||||||
connection master;
|
connection master;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#
|
#
|
||||||
# wsrep_cluster_address
|
# wsrep_cluster_address
|
||||||
#
|
#
|
||||||
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex.*");
|
|
||||||
# save the initial value
|
# save the initial value
|
||||||
SET @wsrep_cluster_address_global_saved = @@global.wsrep_cluster_address;
|
SET @wsrep_cluster_address_global_saved = @@global.wsrep_cluster_address;
|
||||||
# default
|
# default
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
--echo # wsrep_cluster_address
|
--echo # wsrep_cluster_address
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex.*");
|
|
||||||
|
|
||||||
--echo # save the initial value
|
--echo # save the initial value
|
||||||
SET @wsrep_cluster_address_global_saved = @@global.wsrep_cluster_address;
|
SET @wsrep_cluster_address_global_saved = @@global.wsrep_cluster_address;
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
--innodb-lock-schedule-algorithm=FCFS
|
|
@ -536,3 +536,59 @@ with system versioning
|
|||||||
select 1 as x;
|
select 1 as x;
|
||||||
ERROR HY000: Table `t1` must have at least one versioned column
|
ERROR HY000: Table `t1` must have at least one versioned column
|
||||||
drop tables t0, t1, t2, t3;
|
drop tables t0, t1, t2, t3;
|
||||||
|
#
|
||||||
|
# MDEV-23968 CREATE TEMPORARY TABLE .. LIKE (system versioned table) returns error if unique index is defined in the table
|
||||||
|
#
|
||||||
|
create table t1 (id int primary key, index(row_start)) with system versioning;
|
||||||
|
ERROR 42000: Key column 'row_start' doesn't exist in table
|
||||||
|
create table t1 (id int primary key, index(row_end)) with system versioning;
|
||||||
|
ERROR 42000: Key column 'row_end' doesn't exist in table
|
||||||
|
create table t1 (id int, primary key(id, row_end, row_end)) with system versioning;
|
||||||
|
ERROR 42000: Key column 'row_end' doesn't exist in table
|
||||||
|
create table t1 (id int primary key) with system versioning;
|
||||||
|
create temporary table t2 like t1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1105 System versioning is stripped from temporary `test.t2`
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||||
|
show create table t2;
|
||||||
|
Table Create Table
|
||||||
|
t2 CREATE TEMPORARY TABLE `t2` (
|
||||||
|
`id` int(11) NOT NULL
|
||||||
|
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||||
|
drop temporary table t2;
|
||||||
|
create or replace table t1 (
|
||||||
|
a int,
|
||||||
|
row_start timestamp(6) as row start,
|
||||||
|
row_end timestamp(6) as row end,
|
||||||
|
period for system_time (row_start, row_end),
|
||||||
|
index(row_start),
|
||||||
|
index(row_end),
|
||||||
|
primary key(row_end, a, row_start),
|
||||||
|
index(row_end, row_start, a)) with system versioning;
|
||||||
|
create temporary table t2 like t1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1105 System versioning is stripped from temporary `test.t2`
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` int(11) NOT NULL,
|
||||||
|
`row_start` timestamp(6) GENERATED ALWAYS AS ROW START,
|
||||||
|
`row_end` timestamp(6) GENERATED ALWAYS AS ROW END,
|
||||||
|
PRIMARY KEY (`row_end`,`a`,`row_start`),
|
||||||
|
KEY `row_start` (`row_start`),
|
||||||
|
KEY `row_end` (`row_end`),
|
||||||
|
KEY `row_end_2` (`row_end`,`row_start`,`a`),
|
||||||
|
PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`)
|
||||||
|
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||||
|
show create table t2;
|
||||||
|
Table Create Table
|
||||||
|
t2 CREATE TEMPORARY TABLE `t2` (
|
||||||
|
`a` int(11) NOT NULL
|
||||||
|
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||||
|
drop temporary table t2;
|
||||||
|
drop table t1;
|
||||||
|
@ -38,7 +38,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
3 UNION e ALL NULL NULL NULL NULL 4 100.00 Using where
|
3 UNION e ALL NULL NULL NULL NULL 4 100.00 Using where
|
||||||
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 with ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME ALL `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME ALL `e` where `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `ancestors`.`emp_id` AS `emp_id`,`ancestors`.`name` AS `name`,`ancestors`.`mgr` AS `mgr`,`ancestors`.`salary` AS `salary` from `ancestors`
|
Note 1003 with ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `ancestors`.`emp_id` AS `emp_id`,`ancestors`.`name` AS `name`,`ancestors`.`mgr` AS `mgr`,`ancestors`.`salary` AS `salary` from `ancestors`
|
||||||
select row_start into @ts_2 from emp where name="john";
|
select row_start into @ts_2 from emp where name="john";
|
||||||
explain extended /* All report to 'Bill' */
|
explain extended /* All report to 'Bill' */
|
||||||
with recursive
|
with recursive
|
||||||
@ -62,7 +62,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00
|
3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00
|
||||||
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME ALL `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME ALL `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `ancestors`.`emp_id` AS `emp_id`,`ancestors`.`name` AS `name`,`ancestors`.`mgr` AS `mgr`,`ancestors`.`salary` AS `salary` from `ancestors`
|
Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `ancestors`.`emp_id` AS `emp_id`,`ancestors`.`name` AS `name`,`ancestors`.`mgr` AS `mgr`,`ancestors`.`salary` AS `salary` from `ancestors`
|
||||||
/* All report to 'Bill' */
|
/* All report to 'Bill' */
|
||||||
with recursive
|
with recursive
|
||||||
ancestors
|
ancestors
|
||||||
@ -103,7 +103,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00
|
3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00
|
||||||
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME ALL `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME ALL `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `ancestors`.`emp_id` AS `emp_id`,`ancestors`.`name` AS `name`,`ancestors`.`mgr` AS `mgr`,`ancestors`.`salary` AS `salary` from `ancestors`
|
Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `ancestors`.`emp_id` AS `emp_id`,`ancestors`.`name` AS `name`,`ancestors`.`mgr` AS `mgr`,`ancestors`.`salary` AS `salary` from `ancestors`
|
||||||
with recursive
|
with recursive
|
||||||
ancestors
|
ancestors
|
||||||
as
|
as
|
||||||
@ -145,7 +145,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00
|
3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00
|
||||||
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME ALL `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME ALL `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `test`.`emp`.`name` AS `name` from `test`.`emp` FOR SYSTEM_TIME ALL semi join (`ancestors`) where `test`.`emp`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
|
Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `test`.`emp`.`name` AS `name` from `test`.`emp` semi join (`ancestors`) where `test`.`emp`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
|
||||||
with recursive
|
with recursive
|
||||||
ancestors
|
ancestors
|
||||||
as
|
as
|
||||||
|
@ -211,12 +211,12 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
|
||||||
Query A:
|
Query A:
|
||||||
Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME ALL join `test`.`t2` FOR SYSTEM_TIME ALL where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t2`.`row_start` <= <cache>(current_timestamp(6)) and `test`.`t1`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t1`.`row_start` <= <cache>(current_timestamp(6))
|
Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp(6) join `test`.`t2` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp(6) where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t2`.`row_start` <= <cache>(current_timestamp(6)) and `test`.`t1`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t1`.`row_start` <= <cache>(current_timestamp(6))
|
||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
|
||||||
Query B:
|
Query B:
|
||||||
Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME ALL join `test`.`t2` FOR SYSTEM_TIME ALL where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t2`.`row_start` <= <cache>(current_timestamp(6)) and `test`.`t1`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t1`.`row_start` <= <cache>(current_timestamp(6))
|
Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp(6) join `test`.`t2` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp(6) where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t2`.`row_start` <= <cache>(current_timestamp(6)) and `test`.`t1`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t1`.`row_start` <= <cache>(current_timestamp(6))
|
||||||
Fine result: queries A and B are equal.
|
Fine result: queries A and B are equal.
|
||||||
## LEFT JOIN: t1, t2 versioned
|
## LEFT JOIN: t1, t2 versioned
|
||||||
select * from (
|
select * from (
|
||||||
|
@ -155,21 +155,21 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`x` AS `IJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME ALL join `test`.`t2` FOR SYSTEM_TIME ALL where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0` and `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`
|
Note 1003 select `test`.`t1`.`x` AS `IJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP @`t0` join `test`.`t2` FOR SYSTEM_TIME AS OF TIMESTAMP @`t0` where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0` and `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`
|
||||||
explain extended select * from (select t1.x as LJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 left join t2 on t1.x = t2.x)
|
explain extended select * from (select t1.x as LJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 left join t2 on t1.x = t2.x)
|
||||||
for system_time as of timestamp @t0 as t;
|
for system_time as of timestamp @t0 as t;
|
||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where
|
||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`x` AS `LJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME ALL left join `test`.`t2` FOR SYSTEM_TIME ALL on(`test`.`t2`.`x` = `test`.`t1`.`x` and `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0`) where `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`
|
Note 1003 select `test`.`t1`.`x` AS `LJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP @`t0` left join `test`.`t2` FOR SYSTEM_TIME AS OF TIMESTAMP @`t0` on(`test`.`t2`.`x` = `test`.`t1`.`x` and `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0`) where `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`
|
||||||
explain extended select * from (select t1.x as RJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 right join t2 on t1.x = t2.x)
|
explain extended select * from (select t1.x as RJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 right join t2 on t1.x = t2.x)
|
||||||
for system_time as of timestamp @t0 as t;
|
for system_time as of timestamp @t0 as t;
|
||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`x` AS `RJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t2` FOR SYSTEM_TIME ALL left join `test`.`t1` FOR SYSTEM_TIME ALL on(`test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`) where `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0`
|
Note 1003 select `test`.`t1`.`x` AS `RJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t2` FOR SYSTEM_TIME AS OF TIMESTAMP @`t0` left join `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP @`t0` on(`test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`) where `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0`
|
||||||
select * from (select t1.x as IJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 inner join t2 on t1.x = t2.x)
|
select * from (select t1.x as IJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 inner join t2 on t1.x = t2.x)
|
||||||
for system_time as of timestamp @t0 as t;
|
for system_time as of timestamp @t0 as t;
|
||||||
IJ2_x1 y1 x2 y2
|
IJ2_x1 y1 x2 y2
|
||||||
@ -329,7 +329,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
|
||||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (incremental, BNL join)
|
1 SIMPLE t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a` from `test`.`t1` FOR SYSTEM_TIME ALL left join (`test`.`t1` FOR SYSTEM_TIME ALL `t2` left join `test`.`t1` FOR SYSTEM_TIME ALL `t3` on(`test`.`t3`.`a` = `test`.`t2`.`a` and `test`.`t3`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test`.`t2`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' and `test`.`t1`.`a` > 1) where `test`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
|
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a` from `test`.`t1` left join (`test`.`t1` `t2` left join `test`.`t1` `t3` on(`test`.`t3`.`a` = `test`.`t2`.`a` and `test`.`t3`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test`.`t2`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' and `test`.`t1`.`a` > 1) where `test`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
|
||||||
select * from t1 left outer join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1;
|
select * from t1 left outer join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1;
|
||||||
a a
|
a a
|
||||||
2 1
|
2 1
|
||||||
@ -563,7 +563,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
|
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
|
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`f1` AS `f1` from `test`.`t1` FOR SYSTEM_TIME ALL join `test`.`t2` left join (`test`.`t3` left join `test`.`t4` FOR SYSTEM_TIME ALL on(`test`.`t4`.`f4` = `test`.`t2`.`f2` and `test`.`t4`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test`.`t3`.`f3` = `test`.`t2`.`f2`) where `test`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
|
Note 1003 select `test`.`t1`.`f1` AS `f1` from `test`.`t1` join `test`.`t2` left join (`test`.`t3` left join `test`.`t4` on(`test`.`t4`.`f4` = `test`.`t2`.`f2` and `test`.`t4`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test`.`t3`.`f3` = `test`.`t2`.`f2`) where `test`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1, t2, t3, t4;
|
drop table t1, t2, t3, t4;
|
||||||
#
|
#
|
||||||
@ -651,6 +651,27 @@ ERROR 22007: Incorrect date value: 'foo' for column `test`.`t2`.`b` at row 1
|
|||||||
drop prepare stmt;
|
drop prepare stmt;
|
||||||
drop procedure pr;
|
drop procedure pr;
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
#
|
||||||
|
# MDEV-23799 CREATE .. SELECT wrong result on join versioned table
|
||||||
|
#
|
||||||
|
create or replace table x (id Int) with system versioning;
|
||||||
|
create or replace table x_p (elementId Int, pkey varchar(20), pvalue varchar(20)) with system versioning;
|
||||||
|
insert into x values (1), (2), (3);
|
||||||
|
insert into x_p values (1, 'gender', 'male');
|
||||||
|
insert into x_p values (2, 'gender', 'female');
|
||||||
|
insert into x_p values (3, 'gender', 'male');
|
||||||
|
create table tmp1
|
||||||
|
select xgender.pvalue as gender, xtitle.pvalue as title
|
||||||
|
from x
|
||||||
|
left join x_p as xgender on x.id = xgender.elementId and xgender.pkey = 'gender'
|
||||||
|
left join x_p as xtitle on x.id = xtitle.elementId and xtitle.pkey = 'title';
|
||||||
|
select * from tmp1;
|
||||||
|
gender title
|
||||||
|
male NULL
|
||||||
|
female NULL
|
||||||
|
male NULL
|
||||||
|
drop table tmp1;
|
||||||
|
drop tables x, x_p;
|
||||||
call verify_trt_dummy(34);
|
call verify_trt_dummy(34);
|
||||||
No A B C D
|
No A B C D
|
||||||
1 1 1 1 1
|
1 1 1 1 1
|
||||||
|
@ -213,17 +213,17 @@ EXPLAIN EXTENDED SELECT x FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION @ts;
|
|||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00 Using where
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00 Using where
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`x` AS `x` from `test`.`t1` FOR SYSTEM_TIME ALL where trt_trx_sees(`test`.`t1`.`sys_trx_end`,@`ts`) and trt_trx_sees_eq(@`ts`,`test`.`t1`.`sys_trx_start`)
|
Note 1003 select `test`.`t1`.`x` AS `x` from `test`.`t1` FOR SYSTEM_TIME AS OF TRANSACTION @`ts` where trt_trx_sees(`test`.`t1`.`sys_trx_end`,@`ts`) and trt_trx_sees_eq(@`ts`,`test`.`t1`.`sys_trx_start`)
|
||||||
EXPLAIN EXTENDED SELECT x FROM t1 FOR SYSTEM_TIME AS OF TIMESTAMP @ts;
|
EXPLAIN EXTENDED SELECT x FROM t1 FOR SYSTEM_TIME AS OF TIMESTAMP @ts;
|
||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00 Using where
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00 Using where
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`x` AS `x` from `test`.`t1` FOR SYSTEM_TIME ALL where trt_trx_sees(`test`.`t1`.`sys_trx_end`,<cache>(trt_trx_id(@`ts`))) and trt_trx_sees_eq(<cache>(trt_trx_id(@`ts`)),`test`.`t1`.`sys_trx_start`)
|
Note 1003 select `test`.`t1`.`x` AS `x` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts` where trt_trx_sees(`test`.`t1`.`sys_trx_end`,<cache>(trt_trx_id(@`ts`))) and trt_trx_sees_eq(<cache>(trt_trx_id(@`ts`)),`test`.`t1`.`sys_trx_start`)
|
||||||
EXPLAIN EXTENDED SELECT x FROM t1 FOR SYSTEM_TIME AS OF @ts;
|
EXPLAIN EXTENDED SELECT x FROM t1 FOR SYSTEM_TIME AS OF @ts;
|
||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00 Using where
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00 Using where
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`x` AS `x` from `test`.`t1` FOR SYSTEM_TIME ALL where trt_trx_sees(`test`.`t1`.`sys_trx_end`,<cache>(trt_trx_id(@`ts`))) and trt_trx_sees_eq(<cache>(trt_trx_id(@`ts`)),`test`.`t1`.`sys_trx_start`)
|
Note 1003 select `test`.`t1`.`x` AS `x` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts` where trt_trx_sees(`test`.`t1`.`sys_trx_end`,<cache>(trt_trx_id(@`ts`))) and trt_trx_sees_eq(<cache>(trt_trx_id(@`ts`)),`test`.`t1`.`sys_trx_start`)
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# Testing AS OF with expressions of various kinds and data types
|
# Testing AS OF with expressions of various kinds and data types
|
||||||
|
@ -279,3 +279,14 @@ b check_row(row_start, row_end)
|
|||||||
drop view v2;
|
drop view v2;
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
#
|
||||||
|
# MDEV-23779 Error upon querying the view, that selecting from versioned table with partitions
|
||||||
|
#
|
||||||
|
create table t1 (i int) with system versioning
|
||||||
|
partition by system_time (partition p0 history, partition pn current);
|
||||||
|
create view v1 as select * from t1 partition (pn);
|
||||||
|
show create view v1;
|
||||||
|
View Create View character_set_client collation_connection
|
||||||
|
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` PARTITION (`pn`) latin1 latin1_swedish_ci
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
@ -406,3 +406,36 @@ with system versioning
|
|||||||
select 1 as x;
|
select 1 as x;
|
||||||
|
|
||||||
drop tables t0, t1, t2, t3;
|
drop tables t0, t1, t2, t3;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-23968 CREATE TEMPORARY TABLE .. LIKE (system versioned table) returns error if unique index is defined in the table
|
||||||
|
--echo #
|
||||||
|
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||||
|
create table t1 (id int primary key, index(row_start)) with system versioning;
|
||||||
|
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||||
|
create table t1 (id int primary key, index(row_end)) with system versioning;
|
||||||
|
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||||
|
create table t1 (id int, primary key(id, row_end, row_end)) with system versioning;
|
||||||
|
create table t1 (id int primary key) with system versioning;
|
||||||
|
create temporary table t2 like t1;
|
||||||
|
--replace_result $default_engine DEFAULT_ENGINE
|
||||||
|
show create table t1;
|
||||||
|
--replace_result $default_engine DEFAULT_ENGINE
|
||||||
|
show create table t2;
|
||||||
|
drop temporary table t2;
|
||||||
|
create or replace table t1 (
|
||||||
|
a int,
|
||||||
|
row_start timestamp(6) as row start,
|
||||||
|
row_end timestamp(6) as row end,
|
||||||
|
period for system_time (row_start, row_end),
|
||||||
|
index(row_start),
|
||||||
|
index(row_end),
|
||||||
|
primary key(row_end, a, row_start),
|
||||||
|
index(row_end, row_start, a)) with system versioning;
|
||||||
|
create temporary table t2 like t1;
|
||||||
|
--replace_result $default_engine DEFAULT_ENGINE
|
||||||
|
show create table t1;
|
||||||
|
--replace_result $default_engine DEFAULT_ENGINE
|
||||||
|
show create table t2;
|
||||||
|
drop temporary table t2;
|
||||||
|
drop table t1;
|
||||||
|
@ -447,6 +447,27 @@ drop prepare stmt;
|
|||||||
drop procedure pr;
|
drop procedure pr;
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-23799 CREATE .. SELECT wrong result on join versioned table
|
||||||
|
--echo #
|
||||||
|
create or replace table x (id Int) with system versioning;
|
||||||
|
create or replace table x_p (elementId Int, pkey varchar(20), pvalue varchar(20)) with system versioning;
|
||||||
|
|
||||||
|
insert into x values (1), (2), (3);
|
||||||
|
insert into x_p values (1, 'gender', 'male');
|
||||||
|
insert into x_p values (2, 'gender', 'female');
|
||||||
|
insert into x_p values (3, 'gender', 'male');
|
||||||
|
|
||||||
|
create table tmp1
|
||||||
|
select xgender.pvalue as gender, xtitle.pvalue as title
|
||||||
|
from x
|
||||||
|
left join x_p as xgender on x.id = xgender.elementId and xgender.pkey = 'gender'
|
||||||
|
left join x_p as xtitle on x.id = xtitle.elementId and xtitle.pkey = 'title';
|
||||||
|
|
||||||
|
select * from tmp1;
|
||||||
|
|
||||||
|
drop table tmp1;
|
||||||
|
drop tables x, x_p;
|
||||||
|
|
||||||
call verify_trt_dummy(34);
|
call verify_trt_dummy(34);
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
--source suite/versioning/engines.inc
|
--source suite/versioning/engines.inc
|
||||||
--source suite/versioning/common.inc
|
--source suite/versioning/common.inc
|
||||||
|
--source include/have_partition.inc
|
||||||
|
|
||||||
create or replace table t1 (x int) with system versioning;
|
create or replace table t1 (x int) with system versioning;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
@ -213,4 +214,16 @@ drop view v2;
|
|||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-23779 Error upon querying the view, that selecting from versioned table with partitions
|
||||||
|
--echo #
|
||||||
|
create table t1 (i int) with system versioning
|
||||||
|
partition by system_time (partition p0 history, partition pn current);
|
||||||
|
create view v1 as select * from t1 partition (pn);
|
||||||
|
show create view v1;
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
--source suite/versioning/common_finish.inc
|
--source suite/versioning/common_finish.inc
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
call mtr.add_suppression("WSREP: Initial position was provided by configuration or SST, avoiding override");
|
||||||
SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
|
SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
|
||||||
SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
|
SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
|
||||||
|
|
||||||
@ -65,7 +66,6 @@ wsrep_cert_interval #
|
|||||||
wsrep_open_transactions #
|
wsrep_open_transactions #
|
||||||
wsrep_open_connections #
|
wsrep_open_connections #
|
||||||
wsrep_incoming_addresses #
|
wsrep_incoming_addresses #
|
||||||
wsrep_debug_sync_waiters #
|
|
||||||
wsrep_applier_thread_count #
|
wsrep_applier_thread_count #
|
||||||
wsrep_cluster_capabilities #
|
wsrep_cluster_capabilities #
|
||||||
wsrep_cluster_conf_id #
|
wsrep_cluster_conf_id #
|
||||||
@ -129,7 +129,6 @@ wsrep_cert_interval #
|
|||||||
wsrep_open_transactions #
|
wsrep_open_transactions #
|
||||||
wsrep_open_connections #
|
wsrep_open_connections #
|
||||||
wsrep_incoming_addresses #
|
wsrep_incoming_addresses #
|
||||||
wsrep_debug_sync_waiters #
|
|
||||||
wsrep_applier_thread_count #
|
wsrep_applier_thread_count #
|
||||||
wsrep_cluster_capabilities #
|
wsrep_cluster_capabilities #
|
||||||
wsrep_cluster_conf_id #
|
wsrep_cluster_conf_id #
|
||||||
|
278
mysql-test/suite/wsrep/r/variables_debug.result
Normal file
278
mysql-test/suite/wsrep/r/variables_debug.result
Normal file
@ -0,0 +1,278 @@
|
|||||||
|
call mtr.add_suppression("WSREP: Initial position was provided by configuration or SST, avoiding override");
|
||||||
|
SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
|
||||||
|
SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
|
||||||
|
|
||||||
|
# MDEV#5534: mysql_tzinfo_to_sql generates wrong query
|
||||||
|
#
|
||||||
|
# Testing wsrep_replicate_myisam variable.
|
||||||
|
SELECT @@session.wsrep_replicate_myisam;
|
||||||
|
ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable
|
||||||
|
SELECT @@global.wsrep_replicate_myisam;
|
||||||
|
@@global.wsrep_replicate_myisam
|
||||||
|
0
|
||||||
|
SET SESSION wsrep_replicate_myisam= ON;
|
||||||
|
ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable and should be set with SET GLOBAL
|
||||||
|
SET GLOBAL wsrep_replicate_myisam= ON;
|
||||||
|
SET GLOBAL wsrep_replicate_myisam= OFF;
|
||||||
|
SET GLOBAL wsrep_provider=none;
|
||||||
|
#
|
||||||
|
# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
|
||||||
|
# variables when using "_"
|
||||||
|
#
|
||||||
|
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
|
||||||
|
SHOW GLOBAL STATUS LIKE 'wsrep%';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_local_state_uuid #
|
||||||
|
wsrep_protocol_version #
|
||||||
|
wsrep_last_committed #
|
||||||
|
wsrep_replicated #
|
||||||
|
wsrep_replicated_bytes #
|
||||||
|
wsrep_repl_keys #
|
||||||
|
wsrep_repl_keys_bytes #
|
||||||
|
wsrep_repl_data_bytes #
|
||||||
|
wsrep_repl_other_bytes #
|
||||||
|
wsrep_received #
|
||||||
|
wsrep_received_bytes #
|
||||||
|
wsrep_local_commits #
|
||||||
|
wsrep_local_cert_failures #
|
||||||
|
wsrep_local_replays #
|
||||||
|
wsrep_local_send_queue #
|
||||||
|
wsrep_local_send_queue_max #
|
||||||
|
wsrep_local_send_queue_min #
|
||||||
|
wsrep_local_send_queue_avg #
|
||||||
|
wsrep_local_recv_queue #
|
||||||
|
wsrep_local_recv_queue_max #
|
||||||
|
wsrep_local_recv_queue_min #
|
||||||
|
wsrep_local_recv_queue_avg #
|
||||||
|
wsrep_local_cached_downto #
|
||||||
|
wsrep_flow_control_paused_ns #
|
||||||
|
wsrep_flow_control_paused #
|
||||||
|
wsrep_flow_control_sent #
|
||||||
|
wsrep_flow_control_recv #
|
||||||
|
wsrep_flow_control_active #
|
||||||
|
wsrep_flow_control_requested #
|
||||||
|
wsrep_cert_deps_distance #
|
||||||
|
wsrep_apply_oooe #
|
||||||
|
wsrep_apply_oool #
|
||||||
|
wsrep_apply_window #
|
||||||
|
wsrep_commit_oooe #
|
||||||
|
wsrep_commit_oool #
|
||||||
|
wsrep_commit_window #
|
||||||
|
wsrep_local_state #
|
||||||
|
wsrep_local_state_comment #
|
||||||
|
wsrep_cert_index_size #
|
||||||
|
wsrep_causal_reads #
|
||||||
|
wsrep_cert_interval #
|
||||||
|
wsrep_open_transactions #
|
||||||
|
wsrep_open_connections #
|
||||||
|
wsrep_incoming_addresses #
|
||||||
|
wsrep_debug_sync_waiters #
|
||||||
|
wsrep_applier_thread_count #
|
||||||
|
wsrep_cluster_capabilities #
|
||||||
|
wsrep_cluster_conf_id #
|
||||||
|
wsrep_cluster_size #
|
||||||
|
wsrep_cluster_state_uuid #
|
||||||
|
wsrep_cluster_status #
|
||||||
|
wsrep_connected #
|
||||||
|
wsrep_local_bf_aborts #
|
||||||
|
wsrep_local_index #
|
||||||
|
wsrep_provider_capabilities #
|
||||||
|
wsrep_provider_name #
|
||||||
|
wsrep_provider_vendor #
|
||||||
|
wsrep_provider_version #
|
||||||
|
wsrep_ready #
|
||||||
|
wsrep_rollbacker_thread_count #
|
||||||
|
wsrep_thread_count #
|
||||||
|
|
||||||
|
SHOW GLOBAL STATUS LIKE 'wsrep_%';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_local_state_uuid #
|
||||||
|
wsrep_protocol_version #
|
||||||
|
wsrep_last_committed #
|
||||||
|
wsrep_replicated #
|
||||||
|
wsrep_replicated_bytes #
|
||||||
|
wsrep_repl_keys #
|
||||||
|
wsrep_repl_keys_bytes #
|
||||||
|
wsrep_repl_data_bytes #
|
||||||
|
wsrep_repl_other_bytes #
|
||||||
|
wsrep_received #
|
||||||
|
wsrep_received_bytes #
|
||||||
|
wsrep_local_commits #
|
||||||
|
wsrep_local_cert_failures #
|
||||||
|
wsrep_local_replays #
|
||||||
|
wsrep_local_send_queue #
|
||||||
|
wsrep_local_send_queue_max #
|
||||||
|
wsrep_local_send_queue_min #
|
||||||
|
wsrep_local_send_queue_avg #
|
||||||
|
wsrep_local_recv_queue #
|
||||||
|
wsrep_local_recv_queue_max #
|
||||||
|
wsrep_local_recv_queue_min #
|
||||||
|
wsrep_local_recv_queue_avg #
|
||||||
|
wsrep_local_cached_downto #
|
||||||
|
wsrep_flow_control_paused_ns #
|
||||||
|
wsrep_flow_control_paused #
|
||||||
|
wsrep_flow_control_sent #
|
||||||
|
wsrep_flow_control_recv #
|
||||||
|
wsrep_flow_control_active #
|
||||||
|
wsrep_flow_control_requested #
|
||||||
|
wsrep_cert_deps_distance #
|
||||||
|
wsrep_apply_oooe #
|
||||||
|
wsrep_apply_oool #
|
||||||
|
wsrep_apply_window #
|
||||||
|
wsrep_commit_oooe #
|
||||||
|
wsrep_commit_oool #
|
||||||
|
wsrep_commit_window #
|
||||||
|
wsrep_local_state #
|
||||||
|
wsrep_local_state_comment #
|
||||||
|
wsrep_cert_index_size #
|
||||||
|
wsrep_causal_reads #
|
||||||
|
wsrep_cert_interval #
|
||||||
|
wsrep_open_transactions #
|
||||||
|
wsrep_open_connections #
|
||||||
|
wsrep_incoming_addresses #
|
||||||
|
wsrep_debug_sync_waiters #
|
||||||
|
wsrep_applier_thread_count #
|
||||||
|
wsrep_cluster_capabilities #
|
||||||
|
wsrep_cluster_conf_id #
|
||||||
|
wsrep_cluster_size #
|
||||||
|
wsrep_cluster_state_uuid #
|
||||||
|
wsrep_cluster_status #
|
||||||
|
wsrep_connected #
|
||||||
|
wsrep_local_bf_aborts #
|
||||||
|
wsrep_local_index #
|
||||||
|
wsrep_provider_capabilities #
|
||||||
|
wsrep_provider_name #
|
||||||
|
wsrep_provider_vendor #
|
||||||
|
wsrep_provider_version #
|
||||||
|
wsrep_ready #
|
||||||
|
wsrep_rollbacker_thread_count #
|
||||||
|
wsrep_thread_count #
|
||||||
|
SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_local_state_comment #
|
||||||
|
# Should show nothing.
|
||||||
|
SHOW STATUS LIKE 'x';
|
||||||
|
Variable_name Value
|
||||||
|
SET GLOBAL wsrep_provider=none;
|
||||||
|
|
||||||
|
SHOW STATUS LIKE 'wsrep_local_state_uuid';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_local_state_uuid #
|
||||||
|
|
||||||
|
SHOW STATUS LIKE 'wsrep_last_committed';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_last_committed #
|
||||||
|
SET GLOBAL wsrep_provider=none;
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
||||||
|
#
|
||||||
|
call mtr.add_suppression("WSREP: Failed to get provider options");
|
||||||
|
SELECT @@global.wsrep_provider;
|
||||||
|
@@global.wsrep_provider
|
||||||
|
libgalera_smm.so
|
||||||
|
SELECT @@global.wsrep_slave_threads;
|
||||||
|
@@global.wsrep_slave_threads
|
||||||
|
1
|
||||||
|
SELECT @@global.wsrep_cluster_address;
|
||||||
|
@@global.wsrep_cluster_address
|
||||||
|
|
||||||
|
SELECT @@global.wsrep_on;
|
||||||
|
@@global.wsrep_on
|
||||||
|
1
|
||||||
|
SHOW STATUS LIKE 'threads_connected';
|
||||||
|
Variable_name Value
|
||||||
|
Threads_connected 1
|
||||||
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_thread_count 0
|
||||||
|
|
||||||
|
SELECT @@global.wsrep_provider;
|
||||||
|
@@global.wsrep_provider
|
||||||
|
libgalera_smm.so
|
||||||
|
SELECT @@global.wsrep_cluster_address;
|
||||||
|
@@global.wsrep_cluster_address
|
||||||
|
|
||||||
|
SELECT @@global.wsrep_on;
|
||||||
|
@@global.wsrep_on
|
||||||
|
1
|
||||||
|
SHOW STATUS LIKE 'threads_connected';
|
||||||
|
Variable_name Value
|
||||||
|
Threads_connected 1
|
||||||
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_thread_count 0
|
||||||
|
|
||||||
|
# Setting wsrep_cluster_address triggers the creation of
|
||||||
|
# applier/rollbacker threads.
|
||||||
|
SET GLOBAL wsrep_cluster_address= 'gcomm://';
|
||||||
|
# Wait for applier thread to get created 1.
|
||||||
|
# Wait for applier thread to get created 2.
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||||
|
EXPECT_1
|
||||||
|
1
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
|
||||||
|
EXPECT_1
|
||||||
|
1
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
|
||||||
|
EXPECT_2
|
||||||
|
2
|
||||||
|
SELECT @@global.wsrep_provider;
|
||||||
|
@@global.wsrep_provider
|
||||||
|
libgalera_smm.so
|
||||||
|
SELECT @@global.wsrep_cluster_address;
|
||||||
|
@@global.wsrep_cluster_address
|
||||||
|
gcomm://
|
||||||
|
SELECT @@global.wsrep_on;
|
||||||
|
@@global.wsrep_on
|
||||||
|
1
|
||||||
|
SHOW STATUS LIKE 'threads_connected';
|
||||||
|
Variable_name Value
|
||||||
|
Threads_connected 1
|
||||||
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_thread_count 2
|
||||||
|
|
||||||
|
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
|
||||||
|
SET GLOBAL wsrep_slave_threads= 10;
|
||||||
|
# Wait for 9 applier threads to get created.
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||||
|
EXPECT_10
|
||||||
|
10
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
|
||||||
|
EXPECT_1
|
||||||
|
1
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
|
||||||
|
EXPECT_11
|
||||||
|
11
|
||||||
|
SHOW STATUS LIKE 'threads_connected';
|
||||||
|
Variable_name Value
|
||||||
|
Threads_connected 1
|
||||||
|
set wsrep_on=0;
|
||||||
|
set wsrep_on=1;
|
||||||
|
create user test@localhost;
|
||||||
|
connect con1,localhost,test;
|
||||||
|
set auto_increment_increment=10;
|
||||||
|
set wsrep_on=0;
|
||||||
|
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
drop user test@localhost;
|
||||||
|
#
|
||||||
|
# MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
|
||||||
|
#
|
||||||
|
SET @wsrep_sst_auth_saved= @@global.wsrep_sst_auth;
|
||||||
|
SET @@global.wsrep_sst_auth= 'user:pass';
|
||||||
|
SELECT @@global.wsrep_sst_auth;
|
||||||
|
@@global.wsrep_sst_auth
|
||||||
|
********
|
||||||
|
SET @@global.wsrep_sst_auth= '';
|
||||||
|
SELECT @@global.wsrep_sst_auth;
|
||||||
|
@@global.wsrep_sst_auth
|
||||||
|
|
||||||
|
SET @@global.wsrep_sst_auth= NULL;
|
||||||
|
SELECT @@global.wsrep_sst_auth;
|
||||||
|
@@global.wsrep_sst_auth
|
||||||
|
NULL
|
||||||
|
SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
|
||||||
|
# End of test.
|
7
mysql-test/suite/wsrep/t/variables.cnf
Normal file
7
mysql-test/suite/wsrep/t/variables.cnf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
!include ../my.cnf
|
||||||
|
|
||||||
|
[mysqld.1]
|
||||||
|
wsrep-on=ON
|
||||||
|
wsrep-cluster-address=gcomm://
|
||||||
|
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||||
|
binlog-format=ROW
|
@ -1 +0,0 @@
|
|||||||
--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_on=1 --binlog_format=ROW
|
|
@ -1,7 +1,8 @@
|
|||||||
--source include/have_wsrep.inc
|
--source include/have_wsrep.inc
|
||||||
--source include/force_restart.inc
|
--source include/force_restart.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/galera_have_debug_sync.inc
|
|
||||||
|
call mtr.add_suppression("WSREP: Initial position was provided by configuration or SST, avoiding override");
|
||||||
|
|
||||||
SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
|
SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
|
||||||
SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
|
SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
|
||||||
|
7
mysql-test/suite/wsrep/t/variables_debug.cnf
Normal file
7
mysql-test/suite/wsrep/t/variables_debug.cnf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
!include ../my.cnf
|
||||||
|
|
||||||
|
[mysqld.1]
|
||||||
|
wsrep-on=ON
|
||||||
|
wsrep-cluster-address=gcomm://
|
||||||
|
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||||
|
binlog-format=ROW
|
176
mysql-test/suite/wsrep/t/variables_debug.test
Normal file
176
mysql-test/suite/wsrep/t/variables_debug.test
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
--source include/have_wsrep.inc
|
||||||
|
--source include/force_restart.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/galera_have_debug_sync.inc
|
||||||
|
|
||||||
|
call mtr.add_suppression("WSREP: Initial position was provided by configuration or SST, avoiding override");
|
||||||
|
|
||||||
|
SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
|
||||||
|
SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query
|
||||||
|
--echo #
|
||||||
|
--echo # Testing wsrep_replicate_myisam variable.
|
||||||
|
|
||||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
SELECT @@session.wsrep_replicate_myisam;
|
||||||
|
SELECT @@global.wsrep_replicate_myisam;
|
||||||
|
|
||||||
|
--error ER_GLOBAL_VARIABLE
|
||||||
|
SET SESSION wsrep_replicate_myisam= ON;
|
||||||
|
SET GLOBAL wsrep_replicate_myisam= ON;
|
||||||
|
|
||||||
|
# Reset it back.
|
||||||
|
SET GLOBAL wsrep_replicate_myisam= OFF;
|
||||||
|
SET GLOBAL wsrep_provider=none;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
|
||||||
|
--echo # variables when using "_"
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
--replace_column 2 #
|
||||||
|
SHOW GLOBAL STATUS LIKE 'wsrep%';
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--replace_column 2 #
|
||||||
|
SHOW GLOBAL STATUS LIKE 'wsrep_%';
|
||||||
|
|
||||||
|
--replace_column 2 #
|
||||||
|
SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
|
||||||
|
|
||||||
|
--echo # Should show nothing.
|
||||||
|
SHOW STATUS LIKE 'x';
|
||||||
|
|
||||||
|
# Reset it back.
|
||||||
|
SET GLOBAL wsrep_provider=none;
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
# The following 2 variables are used by mariabackup
|
||||||
|
# SST.
|
||||||
|
--echo
|
||||||
|
--replace_column 2 #
|
||||||
|
SHOW STATUS LIKE 'wsrep_local_state_uuid';
|
||||||
|
--echo
|
||||||
|
--replace_column 2 #
|
||||||
|
SHOW STATUS LIKE 'wsrep_last_committed';
|
||||||
|
|
||||||
|
# Reset it back.
|
||||||
|
SET GLOBAL wsrep_provider=none;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
||||||
|
--echo #
|
||||||
|
call mtr.add_suppression("WSREP: Failed to get provider options");
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
|
||||||
|
SELECT @@global.wsrep_provider;
|
||||||
|
SELECT @@global.wsrep_slave_threads;
|
||||||
|
SELECT @@global.wsrep_cluster_address;
|
||||||
|
SELECT @@global.wsrep_on;
|
||||||
|
SHOW STATUS LIKE 'threads_connected';
|
||||||
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||||
|
--echo
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
|
||||||
|
SELECT @@global.wsrep_provider;
|
||||||
|
SELECT @@global.wsrep_cluster_address;
|
||||||
|
SELECT @@global.wsrep_on;
|
||||||
|
SHOW STATUS LIKE 'threads_connected';
|
||||||
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||||
|
--echo
|
||||||
|
|
||||||
|
--echo # Setting wsrep_cluster_address triggers the creation of
|
||||||
|
--echo # applier/rollbacker threads.
|
||||||
|
SET GLOBAL wsrep_cluster_address= 'gcomm://';
|
||||||
|
|
||||||
|
--echo # Wait for applier thread to get created 1.
|
||||||
|
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--echo # Wait for applier thread to get created 2.
|
||||||
|
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
|
||||||
|
|
||||||
|
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
|
||||||
|
SELECT @@global.wsrep_provider;
|
||||||
|
SELECT @@global.wsrep_cluster_address;
|
||||||
|
SELECT @@global.wsrep_on;
|
||||||
|
SHOW STATUS LIKE 'threads_connected';
|
||||||
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||||
|
--echo
|
||||||
|
|
||||||
|
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
|
||||||
|
SET GLOBAL wsrep_slave_threads= 10;
|
||||||
|
|
||||||
|
--echo # Wait for 9 applier threads to get created.
|
||||||
|
--let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
|
||||||
|
SELECT VARIABLE_VALUE AS EXPECT_11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
|
||||||
|
|
||||||
|
SHOW STATUS LIKE 'threads_connected';
|
||||||
|
|
||||||
|
#
|
||||||
|
# privileges for wsrep_on
|
||||||
|
#
|
||||||
|
set wsrep_on=0;
|
||||||
|
set wsrep_on=1;
|
||||||
|
--source include/wait_until_connected_again.inc
|
||||||
|
create user test@localhost;
|
||||||
|
connect con1,localhost,test;
|
||||||
|
set auto_increment_increment=10;
|
||||||
|
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
||||||
|
set wsrep_on=0;
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
drop user test@localhost;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
|
||||||
|
--echo #
|
||||||
|
SET @wsrep_sst_auth_saved= @@global.wsrep_sst_auth;
|
||||||
|
SET @@global.wsrep_sst_auth= 'user:pass';
|
||||||
|
SELECT @@global.wsrep_sst_auth;
|
||||||
|
SET @@global.wsrep_sst_auth= '';
|
||||||
|
SELECT @@global.wsrep_sst_auth;
|
||||||
|
SET @@global.wsrep_sst_auth= NULL;
|
||||||
|
SELECT @@global.wsrep_sst_auth;
|
||||||
|
SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
|
||||||
|
|
||||||
|
# Reset (for mtr internal checks)
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
|
||||||
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||||
|
SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved;
|
||||||
|
SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
--source include/galera_wait_ready.inc
|
||||||
|
|
||||||
|
--echo # End of test.
|
@ -792,14 +792,13 @@ void my_hash_replace(HASH *hash, HASH_SEARCH_STATE *current_record,
|
|||||||
my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
|
my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
|
||||||
{
|
{
|
||||||
uint records, i;
|
uint records, i;
|
||||||
HASH_LINK *data;
|
|
||||||
|
|
||||||
records= hash->records;
|
records= hash->records;
|
||||||
data= dynamic_element(&hash->array,0,HASH_LINK*);
|
|
||||||
|
|
||||||
for (i= 0 ; i < records ; i++)
|
for (i= 0 ; i < records ; i++)
|
||||||
{
|
{
|
||||||
if ((*action)(data[i].data, argument))
|
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
|
||||||
|
argument))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -113,6 +113,9 @@ void my_error(uint nr, myf MyFlags, ...)
|
|||||||
DBUG_ENTER("my_error");
|
DBUG_ENTER("my_error");
|
||||||
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno));
|
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno));
|
||||||
|
|
||||||
|
if (errno == 1213)
|
||||||
|
DBUG_ASSERT(0);
|
||||||
|
|
||||||
if (!(format = my_get_err_msg(nr)))
|
if (!(format = my_get_err_msg(nr)))
|
||||||
(void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr);
|
(void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr);
|
||||||
else
|
else
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
#include <ssl_compat.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The check is only done for OpenSSL 1.1.x.
|
The check is only done for OpenSSL 1.1.x.
|
||||||
@ -25,12 +24,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HAVE_OPENSSL11
|
#ifndef HAVE_OPENSSL11
|
||||||
|
#include <ssl_compat.h>
|
||||||
int check_openssl_compatibility()
|
int check_openssl_compatibility()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
#include <ssl_compat.h>
|
||||||
|
|
||||||
static uint testing;
|
static uint testing;
|
||||||
size_t alloc_size, alloc_count;
|
size_t alloc_size, alloc_count;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env perl -i
|
#!/usr/bin/perl -i
|
||||||
#
|
#
|
||||||
# This script converts all numbers that look like addresses or memory sizes,
|
# This script converts all numbers that look like addresses or memory sizes,
|
||||||
# in a debug files generated by --debug (like mysqld --debug-dbug), to #.
|
# in a debug files generated by --debug (like mysqld --debug-dbug), to #.
|
||||||
|
@ -646,18 +646,18 @@ ALTER TABLE db modify Delete_history_priv enum('N','Y') COLLATE utf8_general_ci
|
|||||||
|
|
||||||
UPDATE user SET Delete_history_priv = Super_priv WHERE @had_user_delete_history_priv = 0;
|
UPDATE user SET Delete_history_priv = Super_priv WHERE @had_user_delete_history_priv = 0;
|
||||||
|
|
||||||
ALTER TABLE user ADD plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL,
|
ALTER TABLE user ADD plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL AFTER max_user_connections,
|
||||||
ADD authentication_string TEXT NOT NULL;
|
ADD authentication_string TEXT NOT NULL AFTER plugin;
|
||||||
ALTER TABLE user CHANGE auth_string authentication_string TEXT NOT NULL;
|
ALTER TABLE user CHANGE auth_string authentication_string TEXT NOT NULL;
|
||||||
ALTER TABLE user MODIFY plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL,
|
ALTER TABLE user MODIFY plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL,
|
||||||
MODIFY authentication_string TEXT NOT NULL;
|
MODIFY authentication_string TEXT NOT NULL;
|
||||||
ALTER TABLE user ADD password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
|
ALTER TABLE user ADD password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER authentication_string;
|
||||||
ALTER TABLE user ADD password_last_changed timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL after password_expired;
|
ALTER TABLE user ADD password_last_changed timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL after password_expired;
|
||||||
ALTER TABLE user ADD password_lifetime smallint unsigned DEFAULT NULL after password_last_changed;
|
ALTER TABLE user ADD password_lifetime smallint unsigned DEFAULT NULL after password_last_changed;
|
||||||
ALTER TABLE user ADD account_locked enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL after password_lifetime;
|
ALTER TABLE user ADD account_locked enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL after password_lifetime;
|
||||||
ALTER TABLE user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
|
ALTER TABLE user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER account_locked;
|
||||||
ALTER TABLE user ADD default_role char(80) binary DEFAULT '' NOT NULL;
|
ALTER TABLE user ADD default_role char(80) binary DEFAULT '' NOT NULL AFTER is_role;
|
||||||
ALTER TABLE user ADD max_statement_time decimal(12,6) DEFAULT 0 NOT NULL;
|
ALTER TABLE user ADD max_statement_time decimal(12,6) DEFAULT 0 NOT NULL AFTER default_role;
|
||||||
-- Somewhere above, we ran ALTER TABLE user .... CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin.
|
-- Somewhere above, we ran ALTER TABLE user .... CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin.
|
||||||
-- we want password_expired column to have collation utf8_general_ci.
|
-- we want password_expired column to have collation utf8_general_ci.
|
||||||
ALTER TABLE user MODIFY password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
|
ALTER TABLE user MODIFY password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
|
||||||
|
@ -437,25 +437,10 @@ mysqld_ld_preload_text() {
|
|||||||
echo "$text"
|
echo "$text"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mysql_config=
|
|
||||||
get_mysql_config() {
|
|
||||||
if [ -z "$mysql_config" ]; then
|
|
||||||
mysql_config=`echo "$0" | sed 's,/[^/][^/]*$,/mysql_config,'`
|
|
||||||
if [ ! -x "$mysql_config" ]; then
|
|
||||||
log_error "Can not run mysql_config $@ from '$mysql_config'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
"$mysql_config" "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# set_malloc_lib LIB
|
# set_malloc_lib LIB
|
||||||
# - If LIB is empty, do nothing and return
|
# - If LIB is empty, do nothing and return
|
||||||
# - If LIB starts with 'tcmalloc' or 'jemalloc', look for the shared library in
|
# - If LIB starts with 'tcmalloc' or 'jemalloc', look for the shared library
|
||||||
# /usr/lib, /usr/lib64 and then pkglibdir.
|
# using `ldconfig`.
|
||||||
# tcmalloc is part of the Google perftools project.
|
# tcmalloc is part of the Google perftools project.
|
||||||
# - If LIB is an absolute path, assume it is a malloc shared library
|
# - If LIB is an absolute path, assume it is a malloc shared library
|
||||||
#
|
#
|
||||||
@ -463,28 +448,28 @@ get_mysql_config() {
|
|||||||
# running mysqld. See ld.so for details.
|
# running mysqld. See ld.so for details.
|
||||||
set_malloc_lib() {
|
set_malloc_lib() {
|
||||||
malloc_lib="$1"
|
malloc_lib="$1"
|
||||||
|
|
||||||
if expr "$malloc_lib" : "\(tcmalloc\|jemalloc\)" > /dev/null ; then
|
if expr "$malloc_lib" : "\(tcmalloc\|jemalloc\)" > /dev/null ; then
|
||||||
pkglibdir=`get_mysql_config --variable=pkglibdir`
|
if ! my_which ldconfig > /dev/null 2>&1
|
||||||
where=''
|
then
|
||||||
# This list is kept intentionally simple. Simply set --malloc-lib
|
log_error "ldconfig command not found, required for ldconfig -p"
|
||||||
# to a full path if another location is desired.
|
|
||||||
for libdir in /usr/lib /usr/lib64 "$pkglibdir" "$pkglibdir/mysql"; do
|
|
||||||
tmp=`echo "$libdir/lib$malloc_lib.so".[0-9]`
|
|
||||||
where="$where $libdir"
|
|
||||||
# log_notice "DEBUG: Checking for malloc lib '$tmp'"
|
|
||||||
[ -r "$tmp" ] || continue
|
|
||||||
malloc_lib="$tmp"
|
|
||||||
where=''
|
|
||||||
break
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "$where" ]; then
|
|
||||||
log_error "no shared library for lib$malloc_lib.so.[0-9] found in$where"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
# format from ldconfig:
|
||||||
|
# "libjemalloc.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjemalloc.so.1"
|
||||||
|
libmalloc_path="$(ldconfig -p | sed -n "/lib${malloc_lib}/p" | cut -d '>' -f2)"
|
||||||
|
|
||||||
|
if [ -z "$libmalloc_path" ]; then
|
||||||
|
log_error "no shared library for lib$malloc_lib.so.[0-9] found."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
for f in $libmalloc_path; do
|
||||||
|
if [ -f "$f" ]; then
|
||||||
|
malloc_lib=$f # get the first path if many
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
# Allow --malloc-lib='' to override other settings
|
# Allow --malloc-lib='' to override other settings
|
||||||
[ -z "$malloc_lib" ] && return
|
[ -z "$malloc_lib" ] && return
|
||||||
|
|
||||||
@ -501,7 +486,6 @@ set_malloc_lib() {
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
add_mysqld_ld_preload "$malloc_lib"
|
add_mysqld_ld_preload "$malloc_lib"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,28 +45,68 @@ case "$1" in
|
|||||||
case "${WSREP_SST_OPT_ADDR}" in
|
case "${WSREP_SST_OPT_ADDR}" in
|
||||||
\[*)
|
\[*)
|
||||||
# IPv6
|
# IPv6
|
||||||
|
# Remove the starting and ending square brackets, if present:
|
||||||
addr_no_bracket=${WSREP_SST_OPT_ADDR#\[}
|
addr_no_bracket=${WSREP_SST_OPT_ADDR#\[}
|
||||||
readonly WSREP_SST_OPT_HOST_UNESCAPED=${addr_no_bracket%%\]*}
|
readonly WSREP_SST_OPT_HOST_UNESCAPED=${addr_no_bracket%%\]*}
|
||||||
|
# Square brackets are needed in most cases:
|
||||||
readonly WSREP_SST_OPT_HOST="[${WSREP_SST_OPT_HOST_UNESCAPED}]"
|
readonly WSREP_SST_OPT_HOST="[${WSREP_SST_OPT_HOST_UNESCAPED}]"
|
||||||
|
# Some utilities and subsequent code require an address
|
||||||
|
# without square brackets:
|
||||||
readonly WSREP_SST_OPT_HOST_ESCAPED="\\[${WSREP_SST_OPT_HOST_UNESCAPED}\\]"
|
readonly WSREP_SST_OPT_HOST_ESCAPED="\\[${WSREP_SST_OPT_HOST_UNESCAPED}\\]"
|
||||||
|
readonly WSREP_SST_OPT_HOST_IPv6=1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*}
|
readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*}
|
||||||
readonly WSREP_SST_OPT_HOST_UNESCAPED=$WSREP_SST_OPT_HOST
|
readonly WSREP_SST_OPT_HOST_UNESCAPED=$WSREP_SST_OPT_HOST
|
||||||
readonly WSREP_SST_OPT_HOST_ESCAPED=$WSREP_SST_OPT_HOST
|
readonly WSREP_SST_OPT_HOST_ESCAPED=$WSREP_SST_OPT_HOST
|
||||||
|
readonly WSREP_SST_OPT_HOST_IPv6=0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
# Let's remove the leading part that contains the host address:
|
||||||
remain=${WSREP_SST_OPT_ADDR#${WSREP_SST_OPT_HOST_ESCAPED}}
|
remain=${WSREP_SST_OPT_ADDR#${WSREP_SST_OPT_HOST_ESCAPED}}
|
||||||
|
# Let's remove the ":" character that separates the port number
|
||||||
|
# from the hostname:
|
||||||
remain=${remain#:}
|
remain=${remain#:}
|
||||||
|
# Extract the port number from the address - all characters
|
||||||
|
# up to "/" (if present):
|
||||||
readonly WSREP_SST_OPT_ADDR_PORT=${remain%%/*}
|
readonly WSREP_SST_OPT_ADDR_PORT=${remain%%/*}
|
||||||
remain=${remain#*/}
|
# If the "/" character is present, then the path is not empty:
|
||||||
|
if [ "${remain#*/}" != "${remain}" ]; then
|
||||||
|
# This operation removes everything up to the "/" character,
|
||||||
|
# effectively removing the port number from the string:
|
||||||
|
readonly WSREP_SST_OPT_PATH=${remain#*/}
|
||||||
|
else
|
||||||
|
readonly WSREP_SST_OPT_PATH=""
|
||||||
|
fi
|
||||||
|
# The rest of the string is the same as the path (for now):
|
||||||
|
remain=${WSREP_SST_OPT_PATH}
|
||||||
|
# If there is one more "/" in the string, then everything before
|
||||||
|
# it will be the module name, otherwise the module name is empty:
|
||||||
|
if [ "${remain%%/*}" != "${remain}" ]; then
|
||||||
|
# This operation removes the tail after the very first
|
||||||
|
# occurrence of the "/" character (inclusively):
|
||||||
readonly WSREP_SST_OPT_MODULE=${remain%%/*}
|
readonly WSREP_SST_OPT_MODULE=${remain%%/*}
|
||||||
readonly WSREP_SST_OPT_PATH=${WSREP_SST_OPT_ADDR#*/}
|
else
|
||||||
|
readonly WSREP_SST_OPT_MODULE=""
|
||||||
|
fi
|
||||||
|
# Remove the module name part from the string, which ends with "/":
|
||||||
remain=${WSREP_SST_OPT_PATH#*/}
|
remain=${WSREP_SST_OPT_PATH#*/}
|
||||||
|
# If the rest of the string does not match the original, then there
|
||||||
|
# was something else besides the module name:
|
||||||
if [ "$remain" != "${WSREP_SST_OPT_PATH}" ]; then
|
if [ "$remain" != "${WSREP_SST_OPT_PATH}" ]; then
|
||||||
|
# Extract the part that matches the LSN by removing all
|
||||||
|
# characters starting from the very first "/":
|
||||||
readonly WSREP_SST_OPT_LSN=${remain%%/*}
|
readonly WSREP_SST_OPT_LSN=${remain%%/*}
|
||||||
|
# Exctract everything after the first occurrence of
|
||||||
|
# the "/" character in the string:
|
||||||
remain=${remain#*/}
|
remain=${remain#*/}
|
||||||
|
# If the remainder does not match the original string,
|
||||||
|
# then there is something else (the version number in
|
||||||
|
# our case):
|
||||||
if [ "$remain" != "${WSREP_SST_OPT_LSN}" ]; then
|
if [ "$remain" != "${WSREP_SST_OPT_LSN}" ]; then
|
||||||
|
# Let's extract the version number by removing the tail
|
||||||
|
# after the very first occurence of the "/" character
|
||||||
|
# (inclusively):
|
||||||
readonly WSREP_SST_OPT_SST_VER=${remain%%/*}
|
readonly WSREP_SST_OPT_SST_VER=${remain%%/*}
|
||||||
else
|
else
|
||||||
readonly WSREP_SST_OPT_SST_VER=""
|
readonly WSREP_SST_OPT_SST_VER=""
|
||||||
|
@ -186,27 +186,48 @@ get_transfer()
|
|||||||
if nc -h 2>&1 | grep -q ncat;then
|
if nc -h 2>&1 | grep -q ncat;then
|
||||||
# Ncat
|
# Ncat
|
||||||
tcmd="nc -l ${TSST_PORT}"
|
tcmd="nc -l ${TSST_PORT}"
|
||||||
elif nc -h 2>&1 | grep -q -- '-d\>';then
|
elif nc -h 2>&1 | grep -qw -- '-d\>';then
|
||||||
# Debian netcat
|
# Debian netcat
|
||||||
|
if [ $WSREP_SST_OPT_HOST_IPv6 -eq 1 ];then
|
||||||
|
# When host is not explicitly specified (when only the port
|
||||||
|
# is specified) netcat can only bind to an IPv4 address if
|
||||||
|
# the "-6" option is not explicitly specified:
|
||||||
|
tcmd="nc -dl -6 ${TSST_PORT}"
|
||||||
|
else
|
||||||
tcmd="nc -dl ${TSST_PORT}"
|
tcmd="nc -dl ${TSST_PORT}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# traditional netcat
|
# traditional netcat
|
||||||
tcmd="nc -l -p ${TSST_PORT}"
|
tcmd="nc -l -p ${TSST_PORT}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
# Check to see if netcat supports the '-N' flag.
|
||||||
|
# -N Shutdown the network socket after EOF on stdin
|
||||||
|
# If it supports the '-N' flag, then we need to use the '-N'
|
||||||
|
# flag, otherwise the transfer will stay open after the file
|
||||||
|
# transfer and cause the command to timeout.
|
||||||
|
# Older versions of netcat did not need this flag and will
|
||||||
|
# return an error if the flag is used.
|
||||||
|
#
|
||||||
|
tcmd_extra=""
|
||||||
|
if nc -h 2>&1 | grep -qw -- -N; then
|
||||||
|
tcmd_extra+="-N"
|
||||||
|
wsrep_log_info "Using nc -N"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# netcat doesn't understand [] around IPv6 address
|
||||||
if nc -h 2>&1 | grep -q ncat;then
|
if nc -h 2>&1 | grep -q ncat;then
|
||||||
# Ncat
|
# Ncat
|
||||||
tcmd="nc ${REMOTEIP} ${TSST_PORT}"
|
wsrep_log_info "Using Ncat as streamer"
|
||||||
elif nc -h 2>&1 | grep -q -- '-d\>';then
|
tcmd="nc ${tcmd_extra} ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
|
||||||
|
elif nc -h 2>&1 | grep -qw -- '-d\>';then
|
||||||
# Debian netcat
|
# Debian netcat
|
||||||
if nc -h 2>&1 | grep -q -- '-N\>';then
|
wsrep_log_info "Using Debian netcat as streamer"
|
||||||
tcmd="nc -N ${REMOTEIP} ${TSST_PORT}"
|
tcmd="nc ${tcmd_extra} ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
|
||||||
else
|
|
||||||
tcmd="nc ${REMOTEIP} ${TSST_PORT}"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
# traditional netcat
|
# traditional netcat
|
||||||
tcmd="nc -q0 ${REMOTEIP} ${TSST_PORT}"
|
wsrep_log_info "Using traditional netcat as streamer"
|
||||||
|
tcmd="nc -q0 ${tcmd_extra} ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -523,25 +544,11 @@ kill_xtrabackup()
|
|||||||
|
|
||||||
setup_ports()
|
setup_ports()
|
||||||
{
|
{
|
||||||
|
SST_PORT=${WSREP_SST_OPT_ADDR_PORT}
|
||||||
if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then
|
if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then
|
||||||
if [ "${WSREP_SST_OPT_ADDR#\[}" != "$WSREP_SST_OPT_ADDR" ]; then
|
REMOTEIP=${WSREP_SST_OPT_HOST}
|
||||||
remain=$(echo $WSREP_SST_OPT_ADDR | awk -F '\\][:/]' '{ print $2 }')
|
lsn=${WSREP_SST_OPT_LSN}
|
||||||
REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F '\\]:' '{ print $1 }')"]"
|
sst_ver=${WSREP_SST_OPT_SST_VER}
|
||||||
SST_PORT=$(echo $remain | awk -F '[:/]' '{ print $1 }')
|
|
||||||
lsn=$(echo $remain | awk -F '[:/]' '{ print $3 }')
|
|
||||||
sst_ver=$(echo $remain | awk -F '[:/]' '{ print $4 }')
|
|
||||||
else
|
|
||||||
SST_PORT=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $2 }')
|
|
||||||
REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F ':' '{ print $1 }')
|
|
||||||
lsn=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $4 }')
|
|
||||||
sst_ver=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $5 }')
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ "${WSREP_SST_OPT_ADDR#\[}" != "$WSREP_SST_OPT_ADDR" ]; then
|
|
||||||
SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F '\\]:' '{ print $2 }')
|
|
||||||
else
|
|
||||||
SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $2 }')
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -701,6 +708,8 @@ if ${INNOBACKUPEX_BIN} /tmp --help 2>/dev/null | grep -q -- '--version-check'; t
|
|||||||
disver="--no-version-check"
|
disver="--no-version-check"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
iopts+=" --databases-exclude=\"lost+found\""
|
||||||
|
|
||||||
if [[ ${FORCE_FTWRL:-0} -eq 1 ]];then
|
if [[ ${FORCE_FTWRL:-0} -eq 1 ]];then
|
||||||
wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL"
|
wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL"
|
||||||
iopts+=" --no-backup-locks"
|
iopts+=" --no-backup-locks"
|
||||||
|
@ -2025,6 +2025,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
|
|||||||
DBUG_ASSERT(part_elem->part_state == PART_TO_BE_REORGED);
|
DBUG_ASSERT(part_elem->part_state == PART_TO_BE_REORGED);
|
||||||
part_elem->part_state= PART_TO_BE_DROPPED;
|
part_elem->part_state= PART_TO_BE_DROPPED;
|
||||||
}
|
}
|
||||||
|
DBUG_ASSERT(m_new_file == 0);
|
||||||
m_new_file= new_file_array;
|
m_new_file= new_file_array;
|
||||||
if (unlikely((error= copy_partitions(copied, deleted))))
|
if (unlikely((error= copy_partitions(copied, deleted))))
|
||||||
{
|
{
|
||||||
@ -2033,6 +2034,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
|
|||||||
They will later be deleted through the ddl-log.
|
They will later be deleted through the ddl-log.
|
||||||
*/
|
*/
|
||||||
cleanup_new_partition(part_count);
|
cleanup_new_partition(part_count);
|
||||||
|
m_new_file= 0;
|
||||||
}
|
}
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
@ -2124,6 +2126,8 @@ int ha_partition::copy_partitions(ulonglong * const copied,
|
|||||||
file->ha_rnd_end();
|
file->ha_rnd_end();
|
||||||
reorg_part++;
|
reorg_part++;
|
||||||
}
|
}
|
||||||
|
DBUG_EXECUTE_IF("debug_abort_copy_partitions",
|
||||||
|
DBUG_RETURN(HA_ERR_UNSUPPORTED); );
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
error:
|
error:
|
||||||
m_reorged_file[reorg_part]->ha_rnd_end();
|
m_reorged_file[reorg_part]->ha_rnd_end();
|
||||||
|
@ -7668,6 +7668,8 @@ Vers_parse_info::fix_create_like(Alter_info &alter_info, HA_CREATE_INFO &create_
|
|||||||
TABLE_LIST &src_table, TABLE_LIST &table)
|
TABLE_LIST &src_table, TABLE_LIST &table)
|
||||||
{
|
{
|
||||||
List_iterator<Create_field> it(alter_info.create_list);
|
List_iterator<Create_field> it(alter_info.create_list);
|
||||||
|
List_iterator<Key> key_it(alter_info.key_list);
|
||||||
|
List_iterator<Key_part_spec> kp_it;
|
||||||
Create_field *f, *f_start=NULL, *f_end= NULL;
|
Create_field *f, *f_start=NULL, *f_end= NULL;
|
||||||
|
|
||||||
DBUG_ASSERT(alter_info.create_list.elements > 2);
|
DBUG_ASSERT(alter_info.create_list.elements > 2);
|
||||||
@ -7682,6 +7684,23 @@ Vers_parse_info::fix_create_like(Alter_info &alter_info, HA_CREATE_INFO &create_
|
|||||||
it.remove();
|
it.remove();
|
||||||
remove--;
|
remove--;
|
||||||
}
|
}
|
||||||
|
key_it.rewind();
|
||||||
|
while (Key *key= key_it++)
|
||||||
|
{
|
||||||
|
kp_it.init(key->columns);
|
||||||
|
while (Key_part_spec *kp= kp_it++)
|
||||||
|
{
|
||||||
|
if (0 == lex_string_cmp(system_charset_info, &kp->field_name,
|
||||||
|
&f->field_name))
|
||||||
|
{
|
||||||
|
kp_it.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (0 == key->columns.elements)
|
||||||
|
{
|
||||||
|
key_it.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
DBUG_ASSERT(remove == 0);
|
DBUG_ASSERT(remove == 0);
|
||||||
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
|
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||||
|
@ -590,9 +590,11 @@ bool LOGGER::is_log_table_enabled(uint log_table_type)
|
|||||||
{
|
{
|
||||||
switch (log_table_type) {
|
switch (log_table_type) {
|
||||||
case QUERY_LOG_SLOW:
|
case QUERY_LOG_SLOW:
|
||||||
return (table_log_handler != NULL) && global_system_variables.sql_log_slow;
|
return (table_log_handler != NULL) && global_system_variables.sql_log_slow
|
||||||
|
&& (log_output_options & LOG_TABLE);
|
||||||
case QUERY_LOG_GENERAL:
|
case QUERY_LOG_GENERAL:
|
||||||
return (table_log_handler != NULL) && opt_log ;
|
return (table_log_handler != NULL) && opt_log
|
||||||
|
&& (log_output_options & LOG_TABLE);
|
||||||
default:
|
default:
|
||||||
DBUG_ASSERT(0);
|
DBUG_ASSERT(0);
|
||||||
return FALSE; /* make compiler happy */
|
return FALSE; /* make compiler happy */
|
||||||
@ -10558,7 +10560,8 @@ binlog_checksum_update(MYSQL_THD thd, struct st_mysql_sys_var *var,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int show_binlog_vars(THD *thd, SHOW_VAR *var, char *buff)
|
static int show_binlog_vars(THD *thd, SHOW_VAR *var, void *,
|
||||||
|
system_status_var *status_var, enum_var_type)
|
||||||
{
|
{
|
||||||
mysql_bin_log.set_status_variables(thd);
|
mysql_bin_log.set_status_variables(thd);
|
||||||
var->type= SHOW_ARRAY;
|
var->type= SHOW_ARRAY;
|
||||||
|
@ -2061,7 +2061,7 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
|
|||||||
else
|
else
|
||||||
DBUG_RETURN(NULL);
|
DBUG_RETURN(NULL);
|
||||||
#else
|
#else
|
||||||
*error= ER(ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE);
|
*error= ER_THD_OR_DEFAULT(current_thd, ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE);
|
||||||
sql_print_error("%s", *error);
|
sql_print_error("%s", *error);
|
||||||
DBUG_RETURN(NULL);
|
DBUG_RETURN(NULL);
|
||||||
#endif
|
#endif
|
||||||
|
@ -7525,8 +7525,8 @@ show_ssl_get_server_not_after(THD *thd, SHOW_VAR *var, char *buff,
|
|||||||
|
|
||||||
#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */
|
#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */
|
||||||
|
|
||||||
static int show_default_keycache(THD *thd, SHOW_VAR *var, char *buff,
|
static int show_default_keycache(THD *thd, SHOW_VAR *var, void *buff,
|
||||||
enum enum_var_type scope)
|
system_status_var *, enum_var_type)
|
||||||
{
|
{
|
||||||
struct st_data {
|
struct st_data {
|
||||||
KEY_CACHE_STATISTICS stats;
|
KEY_CACHE_STATISTICS stats;
|
||||||
@ -7559,7 +7559,7 @@ static int show_default_keycache(THD *thd, SHOW_VAR *var, char *buff,
|
|||||||
|
|
||||||
v->name= 0;
|
v->name= 0;
|
||||||
|
|
||||||
DBUG_ASSERT((char*)(v+1) <= buff + SHOW_VAR_FUNC_BUFF_SIZE);
|
DBUG_ASSERT((char*)(v+1) <= static_cast<char*>(buff) + SHOW_VAR_FUNC_BUFF_SIZE);
|
||||||
|
|
||||||
#undef set_one_keycache_var
|
#undef set_one_keycache_var
|
||||||
|
|
||||||
@ -7583,8 +7583,8 @@ static int show_memory_used(THD *thd, SHOW_VAR *var, char *buff,
|
|||||||
|
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
static int debug_status_func(THD *thd, SHOW_VAR *var, char *buff,
|
static int debug_status_func(THD *thd, SHOW_VAR *var, void *buff,
|
||||||
enum enum_var_type scope)
|
system_status_var *, enum_var_type)
|
||||||
{
|
{
|
||||||
#define add_var(X,Y,Z) \
|
#define add_var(X,Y,Z) \
|
||||||
v->name= X; \
|
v->name= X; \
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user