mirror of
https://github.com/MariaDB/server.git
synced 2025-03-27 01:18:42 +01:00
Merge 10.4 to 10.5
This commit is contained in:
commit
1657b7a583
185 changed files with 3709 additions and 657 deletions
cmake
extra/mariabackup
man
mysql-test
include
main
alter_table.resultalter_table.testaria_icp_debug.resultaria_icp_debug.testbackup_locks.resultbackup_locks.testerrors.resulterrors.testimplicit_commit.resultimplicit_commit.testindex_merge_myisam.resultinnodb_icp_debug.resultinnodb_icp_debug.testlimit_rows_examined.resultlimit_rows_examined.testlog_tables.resultlog_tables.testmulti_update_big.resultmulti_update_big.testmyisam_icp_debug.resultmyisam_icp_debug.testmysql_upgrade.resultmysql_upgrade.testpartition.resultpartition.testpool_of_threads.resultpool_of_threads.testrange.resultrange.testrange_mrr_icp.resultrange_vs_index_merge_innodb.resultrowid_filter_innodb_debug.resultrowid_filter_innodb_debug.testrowid_filter_myisam_debug.resultrowid_filter_myisam_debug.testsp-destruct.resultsp-destruct.testsp.resultsp.testsum_distinct-big.resultsum_distinct-big.testudf.resultudf.test
mysql-test-run.plstd_data
suite
binlog
compat/oracle
encryption
r
t
funcs_1/r
galera
disabled.def
r
galera_gcache_recover_full_gcache.resultgalera_load_data.resultgalera_sst_mariabackup_lost_found.resultgalera_var_trx_fragment_size.result
t
galera_3nodes
gcol
innodb
r
t
innodb_fts
period
rpl
sys_vars
|
@ -6,11 +6,11 @@ FUNCTION(MY_CHECK_AND_SET_LINKER_FLAG flag_to_set)
|
|||
RETURN()
|
||||
ENDIF()
|
||||
STRING(REGEX REPLACE "[-,= +]" "_" result "HAVE_LINK_FLAG_${flag_to_set}")
|
||||
SET(SAVE_CMAKE_REQUIRED_LINK_OPTIONS "${CMAKE_REQUIRED_LINK_OPTIONS}")
|
||||
SET(SAVE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
|
||||
STRING(REGEX REPLACE "^-Wno-" "-W" flag_to_check ${flag_to_set})
|
||||
SET(CMAKE_REQUIRED_LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS} ${flag_to_check})
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${flag_to_check})
|
||||
CHECK_CXX_SOURCE_COMPILES("int main(void) { return 0; }" ${result})
|
||||
SET(CMAKE_REQUIRED_LINK_OPTIONS "${SAVE_CMAKE_REQUIRED_LINK_OPTIONS}")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "${SAVE_CMAKE_REQUIRED_LIBRARIES}")
|
||||
IF (${result})
|
||||
FOREACH(linktype SHARED MODULE EXE)
|
||||
IF(ARGN)
|
||||
|
|
|
@ -2291,7 +2291,7 @@ check_if_skip_database(
|
|||
if (databases_exclude_hash.array &&
|
||||
find_filter_in_hashtable(name, &databases_exclude_hash,
|
||||
&database) &&
|
||||
!database->has_tables) {
|
||||
(!database->has_tables || !databases_include_hash.array)) {
|
||||
/* Database is found and there are no tables specified,
|
||||
skip entire db. */
|
||||
return DATABASE_SKIP;
|
||||
|
@ -2650,7 +2650,7 @@ static lsn_t xtrabackup_copy_log(lsn_t start_lsn, lsn_t end_lsn, bool last)
|
|||
/* We got a full log block. */
|
||||
scanned_lsn += data_len;
|
||||
} else if (data_len >= log_sys.trailer_offset()
|
||||
|| data_len <= LOG_BLOCK_HDR_SIZE) {
|
||||
|| data_len < LOG_BLOCK_HDR_SIZE) {
|
||||
/* We got a garbage block (abrupt end of the log). */
|
||||
msg(0,"garbage block: " LSN_PF ",%zu",scanned_lsn, data_len);
|
||||
break;
|
||||
|
|
|
@ -57,13 +57,13 @@ all would be imported into a table named
|
|||
patient\&.
|
||||
.PP
|
||||
.PP
|
||||
\fBmysqldump\fR
|
||||
\fBmysqlimport\fR
|
||||
supports the following options, which can be specified on the command line or in the
|
||||
[mysqldump]
|
||||
[mysqlimport]
|
||||
and
|
||||
[client]
|
||||
option file groups\&.
|
||||
\fBmysqldump\fR
|
||||
\fBmysqlimport\fR
|
||||
also supports the options for processing option files\&.
|
||||
.sp
|
||||
.RS 4
|
||||
|
@ -267,17 +267,17 @@ Empty the table before importing the text file\&.
|
|||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysqldump: fields-terminated-by option
|
||||
.\" fields-terminated-by option: mysqldump
|
||||
.\" mysqlimport: fields-terminated-by option
|
||||
.\" fields-terminated-by option: mysqlimport
|
||||
\fB\-\-fields\-terminated\-by=\&.\&.\&.\fR,
|
||||
.\" mysqldump: fields-enclosed-by option
|
||||
.\" fields-enclosed-by option: mysqldump
|
||||
.\" mysqlimport: fields-enclosed-by option
|
||||
.\" fields-enclosed-by option: mysqlimport
|
||||
\fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR,
|
||||
.\" mysqldump: fields-optionally-enclosed-by option
|
||||
.\" fields-optionally-enclosed-by option: mysqldump
|
||||
.\" mysqlimport: fields-optionally-enclosed-by option
|
||||
.\" fields-optionally-enclosed-by option: mysqlimport
|
||||
\fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR,
|
||||
.\" mysqldump: fields-escaped-by option
|
||||
.\" fields-escaped-by option: mysqldump
|
||||
.\" mysqlimport: fields-escaped-by option
|
||||
.\" fields-escaped-by option: mysqlimport
|
||||
\fB\-\-fields\-escaped\-by=\&.\&.\&.\fR
|
||||
.sp
|
||||
These options have the same meaning as the corresponding clauses for
|
||||
|
@ -379,8 +379,8 @@ lines of the data file\&.
|
|||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysqldump: lines-terminated-by option
|
||||
.\" lines-terminated-by option: mysqldump
|
||||
.\" mysqlimport: lines-terminated-by option
|
||||
.\" lines-terminated-by option: mysqlimport
|
||||
\fB\-\-lines\-terminated\-by=\&.\&.\&.\fR
|
||||
.sp
|
||||
This option has the same meaning as the corresponding clause for
|
||||
|
|
50
mysql-test/include/icp_debug_kill.inc
Normal file
50
mysql-test/include/icp_debug_kill.inc
Normal file
|
@ -0,0 +1,50 @@
|
|||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t0,t1,t2;
|
||||
--enable_warnings
|
||||
|
||||
create table t0(a int primary key);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
||||
create table t1(a int primary key);
|
||||
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
|
||||
|
||||
create table t2 (
|
||||
kp1 int,
|
||||
kp2 int,
|
||||
col char(100),
|
||||
key(kp1, kp2)
|
||||
);
|
||||
insert into t2 select a, a, a from t1;
|
||||
|
||||
select engine from information_schema.tables
|
||||
where table_schema=database() and table_name='t2';
|
||||
|
||||
explain
|
||||
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
|
||||
|
||||
let $target_id= `select connection_id()`;
|
||||
|
||||
set debug_sync='handler_index_cond_check SIGNAL at_icp_check WAIT_FOR go';
|
||||
send
|
||||
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
|
||||
|
||||
connect (con1, localhost, root,,);
|
||||
connection con1;
|
||||
set debug_sync='now WAIT_FOR at_icp_check';
|
||||
evalp kill query $target_id;
|
||||
set debug_sync='now SIGNAL go';
|
||||
|
||||
connection default;
|
||||
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
reap;
|
||||
set debug_sync='RESET';
|
||||
|
||||
disconnect con1;
|
||||
drop table t0,t1,t2;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
|
@ -35,6 +35,7 @@ BEGIN
|
|||
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
|
||||
AND variable_name not like 'GTID%POS'
|
||||
AND variable_name != 'GTID_BINLOG_STATE'
|
||||
AND variable_name != 'THREAD_POOL_SIZE'
|
||||
ORDER BY variable_name;
|
||||
|
||||
-- Dump all databases, there should be none
|
||||
|
|
68
mysql-test/include/rowid_filter_debug_kill.inc
Normal file
68
mysql-test/include/rowid_filter_debug_kill.inc
Normal file
|
@ -0,0 +1,68 @@
|
|||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22761 KILL QUERY during rowid_filter, crashes
|
||||
--echo #
|
||||
|
||||
create table t0(a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
||||
create table t1(a int);
|
||||
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
|
||||
|
||||
# 100 rows
|
||||
create table t2(a int);
|
||||
insert into t2 select A.a + B.a* 10 from t0 A, t0 B;
|
||||
|
||||
# 10K rows
|
||||
CREATE TABLE t3 (
|
||||
key1 int ,
|
||||
key2 int,
|
||||
filler varchar(255),
|
||||
KEY (key1),
|
||||
KEY (key2)
|
||||
);
|
||||
select engine from information_schema.tables
|
||||
where table_schema=database() and table_name='t3';
|
||||
|
||||
insert into t3
|
||||
select
|
||||
A.a,
|
||||
A.a,
|
||||
'filler-data-filler-data'
|
||||
from
|
||||
t0 A, t1 B;
|
||||
|
||||
analyze table t2,t3;
|
||||
|
||||
explain
|
||||
select * from t2, t3
|
||||
where
|
||||
t3.key1=t2.a and t3.key2 in (2,3);
|
||||
|
||||
let $target_id= `select connection_id()`;
|
||||
|
||||
set debug_sync='handler_rowid_filter_check SIGNAL at_rowid_filter_check WAIT_FOR go';
|
||||
send
|
||||
select * from t2, t3
|
||||
where
|
||||
t3.key1=t2.a and t3.key2 in (2,3);
|
||||
|
||||
connect (con1, localhost, root,,);
|
||||
connection con1;
|
||||
set debug_sync='now WAIT_FOR at_rowid_filter_check';
|
||||
evalp kill query $target_id;
|
||||
set debug_sync='now SIGNAL go';
|
||||
|
||||
connection default;
|
||||
disconnect con1;
|
||||
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
reap;
|
||||
set debug_sync='RESET';
|
||||
|
||||
drop table t0,t1,t2,t3;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
|
@ -2521,6 +2521,17 @@ t2 CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2, t1;
|
||||
#
|
||||
# MDEV-18163: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
||||
# m_lock_type != 2' failed in handler::ha_rnd_next(); / Assertion
|
||||
# `table_list->table' failed in find_field_in_table_ref / ERROR 1901
|
||||
# (on optimized builds)
|
||||
#
|
||||
CREATE TABLE t1 (k1 varchar(10) DEFAULT 5);
|
||||
CREATE TABLE t2 (i1 int);
|
||||
ALTER TABLE t1 ALTER COLUMN k1 SET DEFAULT (SELECT 1 FROM t2 limit 1);
|
||||
ERROR HY000: Function or expression 'select ...' cannot be used in the DEFAULT clause of `k1`
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -2036,6 +2036,20 @@ ALTER TABLE t2 DROP CONSTRAINT PRIMARY KEY;
|
|||
SHOW CREATE TABLE t2;
|
||||
DROP TABLE t2, t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-18163: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
||||
--echo # m_lock_type != 2' failed in handler::ha_rnd_next(); / Assertion
|
||||
--echo # `table_list->table' failed in find_field_in_table_ref / ERROR 1901
|
||||
--echo # (on optimized builds)
|
||||
--echo #
|
||||
|
||||
|
||||
CREATE TABLE t1 (k1 varchar(10) DEFAULT 5);
|
||||
CREATE TABLE t2 (i1 int);
|
||||
--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
|
||||
ALTER TABLE t1 ALTER COLUMN k1 SET DEFAULT (SELECT 1 FROM t2 limit 1);
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
|
34
mysql-test/main/aria_icp_debug.result
Normal file
34
mysql-test/main/aria_icp_debug.result
Normal file
|
@ -0,0 +1,34 @@
|
|||
set default_storage_engine=aria;
|
||||
drop table if exists t0,t1,t2;
|
||||
create table t0(a int primary key);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1(a int primary key);
|
||||
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
|
||||
create table t2 (
|
||||
kp1 int,
|
||||
kp2 int,
|
||||
col char(100),
|
||||
key(kp1, kp2)
|
||||
);
|
||||
insert into t2 select a, a, a from t1;
|
||||
select engine from information_schema.tables
|
||||
where table_schema=database() and table_name='t2';
|
||||
engine
|
||||
Aria
|
||||
explain
|
||||
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range kp1 kp1 5 NULL 10 Using index condition
|
||||
set debug_sync='handler_index_cond_check SIGNAL at_icp_check WAIT_FOR go';
|
||||
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
|
||||
connect con1, localhost, root,,;
|
||||
connection con1;
|
||||
set debug_sync='now WAIT_FOR at_icp_check';
|
||||
kill query $target_id;
|
||||
set debug_sync='now SIGNAL go';
|
||||
connection default;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
set debug_sync='RESET';
|
||||
disconnect con1;
|
||||
drop table t0,t1,t2;
|
||||
set default_storage_engine=default;
|
5
mysql-test/main/aria_icp_debug.test
Normal file
5
mysql-test/main/aria_icp_debug.test
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
set default_storage_engine=aria;
|
||||
--source include/icp_debug_kill.inc
|
||||
set default_storage_engine=default;
|
||||
|
|
@ -39,6 +39,108 @@ MDL_INTENTION_EXCLUSIVE Schema metadata lock test
|
|||
select * from t1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
backup unlock;
|
||||
#
|
||||
# BACKUP LOCK and BACKUP UNLOCK are not allowed in procedures.
|
||||
#
|
||||
CREATE PROCEDURE p_BACKUP_LOCK()
|
||||
BEGIN
|
||||
BACKUP LOCK;
|
||||
END|
|
||||
ERROR 0A000: BACKUP LOCK is not allowed in stored procedures
|
||||
CREATE PROCEDURE p_BACKUP_UNLOCK()
|
||||
BEGIN
|
||||
BACKUP UNLOCK;
|
||||
END|
|
||||
ERROR 0A000: BACKUP UNLOCK is not allowed in stored procedures
|
||||
#
|
||||
# BACKUP STAGE doesn't work when a BACKUP LOCK is active.
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
BACKUP LOCK t1;
|
||||
BACKUP STAGE START;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
BACKUP UNLOCK;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# FLUSH TABLES WITH READ LOCK is not allowed when BACKUP LOCK is active.
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
BACKUP LOCK t1;
|
||||
FLUSH TABLES t1 WITH READ LOCK;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
BACKUP UNLOCK;
|
||||
BACKUP LOCK t1;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
BACKUP UNLOCK;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-20945 BACKUP UNLOCK assertion failures.
|
||||
#
|
||||
# Scenario 1.
|
||||
CREATE TABLE t1 (a INT);
|
||||
BACKUP LOCK t1;
|
||||
FLUSH TABLE t1 WITH READ LOCK;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
UNLOCK TABLES;
|
||||
BACKUP UNLOCK;
|
||||
DROP TABLE t1;
|
||||
# Scenario 2.
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (b INT);
|
||||
LOCK TABLES t2 AS a2 WRITE;
|
||||
BACKUP LOCK t1;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
UNLOCK TABLES;
|
||||
INSERT INTO t1 VALUES(0);
|
||||
# restart
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
# Scenario 3.
|
||||
CREATE TEMPORARY TABLE t3 (c INT);
|
||||
BACKUP LOCK t1;
|
||||
SET @@SESSION.profiling=ON;
|
||||
CREATE TABLE t1 (c INT);
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
LOCK TABLES t3 AS a1 READ, t1 AS a3 READ, t3 AS a5 READ LOCAL;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
UNLOCK TABLE;
|
||||
# restart
|
||||
# Scenario 4.
|
||||
CREATE TABLE t (c INT);
|
||||
BACKUP LOCK not_existing.t;
|
||||
LOCK TABLES t WRITE;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
UNLOCK TABLES;
|
||||
# restart
|
||||
DROP TABLE t;
|
||||
# Scenario 5.
|
||||
BACKUP LOCK t1;
|
||||
CREATE TABLE t2 (c1 TIME, c2 TIME, c3 DATE, KEY(c1, c2));
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
LOCK TABLE t2 READ;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
# restart
|
||||
# Scenario 6.
|
||||
BACKUP LOCK t;
|
||||
CREATE VIEW v AS SELECT 1;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
LOCK TABLES v READ;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
START TRANSACTION READ ONLY;
|
||||
BACKUP LOCK t;
|
||||
# restart
|
||||
# Scenario 7.
|
||||
SET SQL_MODE='';
|
||||
SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.u;
|
||||
CREATE TABLE t (a INT) ENGINE=Aria;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS s (c INT) ENGINE=Aria;
|
||||
LOCK TABLES s AS a READ LOCAL,t AS b WRITE;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.u;
|
||||
# restart
|
||||
#
|
||||
connection con1;
|
||||
connection default;
|
||||
disconnect con1;
|
||||
|
|
|
@ -43,6 +43,125 @@ SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.me
|
|||
--error ER_LOCK_DEADLOCK
|
||||
select * from t1;
|
||||
backup unlock;
|
||||
|
||||
--echo #
|
||||
--echo # BACKUP LOCK and BACKUP UNLOCK are not allowed in procedures.
|
||||
--echo #
|
||||
delimiter |;
|
||||
--error ER_SP_BADSTATEMENT
|
||||
CREATE PROCEDURE p_BACKUP_LOCK()
|
||||
BEGIN
|
||||
BACKUP LOCK;
|
||||
END|
|
||||
--error ER_SP_BADSTATEMENT
|
||||
CREATE PROCEDURE p_BACKUP_UNLOCK()
|
||||
BEGIN
|
||||
BACKUP UNLOCK;
|
||||
END|
|
||||
delimiter ;|
|
||||
|
||||
--echo #
|
||||
--echo # BACKUP STAGE doesn't work when a BACKUP LOCK is active.
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT);
|
||||
BACKUP LOCK t1;
|
||||
--error ER_CANT_UPDATE_WITH_READLOCK
|
||||
BACKUP STAGE START;
|
||||
BACKUP UNLOCK;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # FLUSH TABLES WITH READ LOCK is not allowed when BACKUP LOCK is active.
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT);
|
||||
BACKUP LOCK t1;
|
||||
--error ER_LOCK_OR_ACTIVE_TRANSACTION
|
||||
FLUSH TABLES t1 WITH READ LOCK;
|
||||
BACKUP UNLOCK;
|
||||
|
||||
BACKUP LOCK t1;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
BACKUP UNLOCK;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20945 BACKUP UNLOCK assertion failures.
|
||||
--echo #
|
||||
|
||||
--echo # Scenario 1.
|
||||
CREATE TABLE t1 (a INT);
|
||||
BACKUP LOCK t1;
|
||||
--error ER_LOCK_OR_ACTIVE_TRANSACTION
|
||||
FLUSH TABLE t1 WITH READ LOCK;
|
||||
UNLOCK TABLES;
|
||||
BACKUP UNLOCK; # Shouldn't trigger an assertion.
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Scenario 2.
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (b INT);
|
||||
LOCK TABLES t2 AS a2 WRITE;
|
||||
--error ER_LOCK_OR_ACTIVE_TRANSACTION
|
||||
BACKUP LOCK t1;
|
||||
UNLOCK TABLES;
|
||||
INSERT INTO t1 VALUES(0);
|
||||
--source include/restart_mysqld.inc
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
||||
--echo # Scenario 3.
|
||||
CREATE TEMPORARY TABLE t3 (c INT);
|
||||
BACKUP LOCK t1; # Table `t1` doesn't exist.
|
||||
SET @@SESSION.profiling=ON;
|
||||
--error ER_CANT_UPDATE_WITH_READLOCK
|
||||
CREATE TABLE t1 (c INT);
|
||||
--error ER_LOCK_OR_ACTIVE_TRANSACTION
|
||||
LOCK TABLES t3 AS a1 READ, t1 AS a3 READ, t3 AS a5 READ LOCAL;
|
||||
UNLOCK TABLE;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--echo # Scenario 4.
|
||||
CREATE TABLE t (c INT);
|
||||
BACKUP LOCK not_existing.t;
|
||||
--error ER_LOCK_OR_ACTIVE_TRANSACTION
|
||||
LOCK TABLES t WRITE;
|
||||
UNLOCK TABLES;
|
||||
--source include/restart_mysqld.inc
|
||||
DROP TABLE t;
|
||||
|
||||
--echo # Scenario 5.
|
||||
BACKUP LOCK t1;
|
||||
--error ER_CANT_UPDATE_WITH_READLOCK
|
||||
CREATE TABLE t2 (c1 TIME, c2 TIME, c3 DATE, KEY(c1, c2));
|
||||
--error ER_LOCK_OR_ACTIVE_TRANSACTION
|
||||
LOCK TABLE t2 READ;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--echo # Scenario 6.
|
||||
BACKUP LOCK t;
|
||||
--error ER_CANT_UPDATE_WITH_READLOCK
|
||||
CREATE VIEW v AS SELECT 1;
|
||||
--error ER_LOCK_OR_ACTIVE_TRANSACTION
|
||||
LOCK TABLES v READ;
|
||||
START TRANSACTION READ ONLY;
|
||||
BACKUP LOCK t;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--echo # Scenario 7.
|
||||
SET SQL_MODE='';
|
||||
SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.u;
|
||||
--error ER_CANT_UPDATE_WITH_READLOCK
|
||||
CREATE TABLE t (a INT) ENGINE=Aria;
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS s (c INT) ENGINE=Aria;
|
||||
--error ER_LOCK_OR_ACTIVE_TRANSACTION
|
||||
LOCK TABLES s AS a READ LOCAL,t AS b WRITE;
|
||||
--let $q= `SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE`
|
||||
SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.u;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--echo #
|
||||
|
||||
connection con1;
|
||||
--reap
|
||||
connection default;
|
||||
|
|
|
@ -196,3 +196,38 @@ ERROR 22003: BIGINT value is out of range in '-73 * -2465717823867977728'
|
|||
SELECT UPDATEXML(-73 * -2465717823867977728,@@global.long_query_time,null);
|
||||
ERROR 22003: BIGINT value is out of range in '-73 * -2465717823867977728'
|
||||
# End of 10.3 tests
|
||||
#
|
||||
# MDEV-23518: Syntax error in ond SP results in misleading
|
||||
# message on SHOW CREATE PROCEDURE
|
||||
#
|
||||
CREATE PROCEDURE P1 ()
|
||||
BEGIN NOT ATOMIC
|
||||
IF (SELECT 2) THEN
|
||||
SELECT 4;
|
||||
END IF ;
|
||||
END;
|
||||
$$
|
||||
select name,db,body from mysql.proc where name = "P1";
|
||||
name db body
|
||||
P1 test BEGIN NOT ATOMIC
|
||||
IF (SELECT 2) THEN
|
||||
SELECT 4;
|
||||
END IF ;
|
||||
END
|
||||
update mysql.proc set body_utf8="BEGIN NOT ATOMIC
|
||||
IF (SELECT 2) OR foo = 3 THEN
|
||||
SELECT 4;
|
||||
END IF ;
|
||||
END", body="BEGIN NOT ATOMIC
|
||||
IF (SELECT 2) OR foo = 3 THEN
|
||||
SELECT 4;
|
||||
END IF ;
|
||||
END"where name = "P1";
|
||||
show create procedure P1;
|
||||
ERROR HY000: Failed to load routine test.P1 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1327 Undeclared variable: foo
|
||||
Error 1457 Failed to load routine test.P1 (internal code -6). For more details, run SHOW WARNINGS
|
||||
drop procedure P1;
|
||||
# End of 10.4 tests
|
||||
|
|
|
@ -246,3 +246,39 @@ SELECT UPDATEXML(-73 * -2465717823867977728,@@global.auto_increment_increment,nu
|
|||
SELECT UPDATEXML(-73 * -2465717823867977728,@@global.long_query_time,null);
|
||||
|
||||
-- echo # End of 10.3 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23518: Syntax error in ond SP results in misleading
|
||||
--echo # message on SHOW CREATE PROCEDURE
|
||||
--echo #
|
||||
|
||||
DELIMITER $$;
|
||||
|
||||
CREATE PROCEDURE P1 ()
|
||||
BEGIN NOT ATOMIC
|
||||
IF (SELECT 2) THEN
|
||||
SELECT 4;
|
||||
END IF ;
|
||||
END;
|
||||
$$
|
||||
|
||||
DELIMITER ;$$
|
||||
|
||||
select name,db,body from mysql.proc where name = "P1";
|
||||
update mysql.proc set body_utf8="BEGIN NOT ATOMIC
|
||||
IF (SELECT 2) OR foo = 3 THEN
|
||||
SELECT 4;
|
||||
END IF ;
|
||||
END", body="BEGIN NOT ATOMIC
|
||||
IF (SELECT 2) OR foo = 3 THEN
|
||||
SELECT 4;
|
||||
END IF ;
|
||||
END"where name = "P1";
|
||||
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
show create procedure P1;
|
||||
show warnings;
|
||||
|
||||
drop procedure P1;
|
||||
|
||||
-- echo # End of 10.4 tests
|
||||
|
|
|
@ -1035,6 +1035,16 @@ YES
|
|||
# SQLCOM_BACKUP
|
||||
#
|
||||
#
|
||||
# SQLCOM_BACKUP_LOCK
|
||||
#
|
||||
INSERT INTO db1.trans VALUES (1);
|
||||
BACKUP LOCK t1;
|
||||
ROLLBACK;
|
||||
BACKUP UNLOCK;
|
||||
CALL db1.test_if_commit();
|
||||
IMPLICIT COMMIT
|
||||
YES
|
||||
#
|
||||
# SQLCOM_SHOW_ARCHIVE
|
||||
#
|
||||
#
|
||||
|
|
|
@ -1114,6 +1114,16 @@ source include/implicit_commit_helper.inc;
|
|||
# backup database db1 to 'backup_db1.ba';
|
||||
#source include/implicit_commit_helper.inc;
|
||||
|
||||
--echo #
|
||||
--echo # SQLCOM_BACKUP_LOCK
|
||||
--echo #
|
||||
|
||||
INSERT INTO db1.trans VALUES (1);
|
||||
BACKUP LOCK t1;
|
||||
ROLLBACK;
|
||||
BACKUP UNLOCK;
|
||||
CALL db1.test_if_commit();
|
||||
|
||||
--echo #
|
||||
--echo # SQLCOM_SHOW_ARCHIVE
|
||||
--echo #
|
||||
|
|
|
@ -1689,7 +1689,7 @@ EXPLAIN
|
|||
SELECT * FROM t1 FORCE KEY (PRIMARY , i , c1 , c2)
|
||||
WHERE pk = 255 OR i = 22 OR (pk IN (1 , 136) AND c2 IN ('c' , 'w') AND (c1 NOT BETWEEN 'e' AND 'i' OR c2 > 'g')) OR pk != 1 ;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY,c1,i,c2 NULL NULL NULL 69 Using where
|
||||
1 SIMPLE t1 index_merge PRIMARY,c1,i,c2 PRIMARY,i 0,5 NULL 69 Using sort_union(PRIMARY,i); Using where
|
||||
DROP TABLE t1;
|
||||
set optimizer_switch= @optimizer_switch_save;
|
||||
#
|
||||
|
|
34
mysql-test/main/innodb_icp_debug.result
Normal file
34
mysql-test/main/innodb_icp_debug.result
Normal file
|
@ -0,0 +1,34 @@
|
|||
set default_storage_engine=innodb;
|
||||
drop table if exists t0,t1,t2;
|
||||
create table t0(a int primary key);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1(a int primary key);
|
||||
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
|
||||
create table t2 (
|
||||
kp1 int,
|
||||
kp2 int,
|
||||
col char(100),
|
||||
key(kp1, kp2)
|
||||
);
|
||||
insert into t2 select a, a, a from t1;
|
||||
select engine from information_schema.tables
|
||||
where table_schema=database() and table_name='t2';
|
||||
engine
|
||||
InnoDB
|
||||
explain
|
||||
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range kp1 kp1 5 NULL 11 Using index condition
|
||||
set debug_sync='handler_index_cond_check SIGNAL at_icp_check WAIT_FOR go';
|
||||
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
|
||||
connect con1, localhost, root,,;
|
||||
connection con1;
|
||||
set debug_sync='now WAIT_FOR at_icp_check';
|
||||
kill query $target_id;
|
||||
set debug_sync='now SIGNAL go';
|
||||
connection default;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
set debug_sync='RESET';
|
||||
disconnect con1;
|
||||
drop table t0,t1,t2;
|
||||
set default_storage_engine=default;
|
6
mysql-test/main/innodb_icp_debug.test
Normal file
6
mysql-test/main/innodb_icp_debug.test
Normal file
|
@ -0,0 +1,6 @@
|
|||
--source include/have_innodb.inc
|
||||
|
||||
set default_storage_engine=innodb;
|
||||
--source include/icp_debug_kill.inc
|
||||
set default_storage_engine=default;
|
||||
|
|
@ -865,6 +865,21 @@ Warning 1931 Query execution was interrupted. The query examined at least 22 row
|
|||
drop view v;
|
||||
drop table t1, t2;
|
||||
#
|
||||
# 10.1 Test
|
||||
#
|
||||
# MDEV-17729: Assertion `! is_set() || m_can_overwrite_status'
|
||||
# failed in Diagnostics_area::set_error_status
|
||||
#
|
||||
set @old_mode= @@sql_mode;
|
||||
CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,k INT, c CHAR(20));
|
||||
INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0');
|
||||
SET @@sql_mode='STRICT_TRANS_TABLES';
|
||||
INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2;
|
||||
Warnings:
|
||||
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
|
||||
SET @@sql_mode=@old_mode;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-18117: Crash with Explain extended when using limit rows examined
|
||||
#
|
||||
create table t1 (c1 char(2));
|
||||
|
@ -879,3 +894,4 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t2`.`c2` AS `c2` from `test`.`t1` join `test`.`t2` where `test`.`t2`.`c2` = `test`.`t1`.`c1`
|
||||
drop table t1,t2;
|
||||
# End of 10.4 tests
|
||||
|
|
|
@ -578,6 +578,23 @@ EXECUTE ps;
|
|||
drop view v;
|
||||
drop table t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # 10.1 Test
|
||||
--echo #
|
||||
--echo # MDEV-17729: Assertion `! is_set() || m_can_overwrite_status'
|
||||
--echo # failed in Diagnostics_area::set_error_status
|
||||
--echo #
|
||||
set @old_mode= @@sql_mode;
|
||||
|
||||
CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,k INT, c CHAR(20));
|
||||
INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0');
|
||||
|
||||
SET @@sql_mode='STRICT_TRANS_TABLES';
|
||||
INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2;
|
||||
|
||||
SET @@sql_mode=@old_mode;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-18117: Crash with Explain extended when using limit rows examined
|
||||
--echo #
|
||||
|
@ -589,3 +606,5 @@ insert into t2 values ('bb'), ('cc'), ('dd'), ('ff');
|
|||
explain extended
|
||||
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2;
|
||||
drop table t1,t2;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
|
|
@ -380,6 +380,14 @@ slow_log
|
|||
slow_log_new
|
||||
drop table slow_log_new, general_log_new;
|
||||
use test;
|
||||
SET GLOBAL LOG_OUTPUT = 'FILE';
|
||||
SET GLOBAL slow_query_log = 1;
|
||||
SET GLOBAL general_log = 1;
|
||||
ALTER TABLE mysql.slow_log ADD COLUMN comment_text TEXT NOT NULL;
|
||||
ALTER TABLE mysql.general_log ADD COLUMN comment_text TEXT NOT NULL;
|
||||
SET GLOBAL LOG_OUTPUT = 'NONE';
|
||||
ALTER TABLE mysql.slow_log DROP COLUMN comment_text;
|
||||
ALTER TABLE mysql.general_log DROP COLUMN comment_text;
|
||||
SET GLOBAL LOG_OUTPUT = 'TABLE';
|
||||
SET GLOBAL general_log = 0;
|
||||
FLUSH LOGS;
|
||||
|
|
|
@ -54,7 +54,7 @@ select * from general_log where argument like '%general_log%';
|
|||
|
||||
#
|
||||
# Check some basic queries interfering with the log tables.
|
||||
# In our test we'll use a tbale with verbose comments to the short
|
||||
# In our test we'll use a table with verbose comments to the short
|
||||
# command type names, used in the tables
|
||||
#
|
||||
|
||||
|
@ -474,6 +474,24 @@ show tables like "%log%";
|
|||
drop table slow_log_new, general_log_new;
|
||||
use test;
|
||||
|
||||
#
|
||||
# Bug#69953 / MDEV-4851
|
||||
# Log tables should be modifable on LOG_OUTPUT != TABLE
|
||||
#
|
||||
#
|
||||
|
||||
SET GLOBAL LOG_OUTPUT = 'FILE';
|
||||
SET GLOBAL slow_query_log = 1;
|
||||
SET GLOBAL general_log = 1;
|
||||
|
||||
ALTER TABLE mysql.slow_log ADD COLUMN comment_text TEXT NOT NULL;
|
||||
ALTER TABLE mysql.general_log ADD COLUMN comment_text TEXT NOT NULL;
|
||||
|
||||
SET GLOBAL LOG_OUTPUT = 'NONE';
|
||||
ALTER TABLE mysql.slow_log DROP COLUMN comment_text;
|
||||
ALTER TABLE mysql.general_log DROP COLUMN comment_text;
|
||||
|
||||
|
||||
#
|
||||
# Bug#27857 (Log tables supplies the wrong value for generating
|
||||
# AUTO_INCREMENT numbers)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
DROP TABLE IF EXISTS t1,t2;
|
||||
CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL) ;
|
||||
# The protocolling of many inserts into t1 is suppressed.
|
||||
INSERT INTO t1 SELECT seq,seq FROM seq_1_to_2097152;
|
||||
ALTER TABLE t1 ADD INDEX i1(a);
|
||||
DELETE FROM t1 WHERE a > 2000000;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
--source include/long_test.inc
|
||||
--source include/have_sequence.inc
|
||||
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL) ;
|
||||
--echo # The protocolling of many inserts into t1 is suppressed.
|
||||
--disable_query_log
|
||||
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4);
|
||||
let $1=19;
|
||||
set @d=4;
|
||||
begin;
|
||||
while ($1)
|
||||
{
|
||||
eval INSERT INTO t1 SELECT a+@d,b+@d FROM t1;
|
||||
eval SET @d=@d*2;
|
||||
dec $1;
|
||||
}
|
||||
commit;
|
||||
--enable_query_log
|
||||
INSERT INTO t1 SELECT seq,seq FROM seq_1_to_2097152;
|
||||
|
||||
ALTER TABLE t1 ADD INDEX i1(a);
|
||||
DELETE FROM t1 WHERE a > 2000000;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
|
|
32
mysql-test/main/myisam_icp_debug.result
Normal file
32
mysql-test/main/myisam_icp_debug.result
Normal file
|
@ -0,0 +1,32 @@
|
|||
drop table if exists t0,t1,t2;
|
||||
create table t0(a int primary key);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1(a int primary key);
|
||||
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
|
||||
create table t2 (
|
||||
kp1 int,
|
||||
kp2 int,
|
||||
col char(100),
|
||||
key(kp1, kp2)
|
||||
);
|
||||
insert into t2 select a, a, a from t1;
|
||||
select engine from information_schema.tables
|
||||
where table_schema=database() and table_name='t2';
|
||||
engine
|
||||
MyISAM
|
||||
explain
|
||||
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range kp1 kp1 5 NULL 11 Using index condition
|
||||
set debug_sync='handler_index_cond_check SIGNAL at_icp_check WAIT_FOR go';
|
||||
select * from t2 where kp1 between 10 and 20 and kp2 +1 >100;
|
||||
connect con1, localhost, root,,;
|
||||
connection con1;
|
||||
set debug_sync='now WAIT_FOR at_icp_check';
|
||||
kill query $target_id;
|
||||
set debug_sync='now SIGNAL go';
|
||||
connection default;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
set debug_sync='RESET';
|
||||
disconnect con1;
|
||||
drop table t0,t1,t2;
|
1
mysql-test/main/myisam_icp_debug.test
Normal file
1
mysql-test/main/myisam_icp_debug.test
Normal file
|
@ -0,0 +1 @@
|
|||
--source include/icp_debug_kill.inc
|
|
@ -570,6 +570,128 @@ t1 CREATE TABLE `t1` (
|
|||
DROP TABLE test.t1;
|
||||
SET GLOBAL enforce_storage_engine=NULL;
|
||||
# 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
|
||||
#
|
||||
# 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 #
|
||||
--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 #
|
||||
|
|
|
@ -2807,5 +2807,16 @@ id
|
|||
16
|
||||
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
|
||||
#
|
||||
|
|
|
@ -3004,6 +3004,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;
|
||||
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 # End of 10.1 tests
|
||||
--echo #
|
||||
|
|
|
@ -2188,3 +2188,8 @@ sleep(50)
|
|||
connection extracon;
|
||||
sleep(5.5)
|
||||
0
|
||||
connect comp_con,localhost,root,,,,,COMPRESS;
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
||||
disconnect comp_con;
|
||||
|
|
|
@ -92,3 +92,9 @@ connection con2;
|
|||
|
||||
connection extracon;
|
||||
--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
|
||||
23 <= a;
|
||||
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
|
||||
23 <= a AND a <= 25 OR
|
||||
25 <= a AND b = 23 OR
|
||||
|
@ -3121,6 +3121,82 @@ a b
|
|||
set eq_range_index_dive_limit=default;
|
||||
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
|
||||
#
|
||||
create table ten(a int);
|
||||
|
@ -3140,9 +3216,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
|
||||
1 SIMPLE t1 range a a 5 NULL 201 1201.00 100.00 100.00 Using where; Using index
|
||||
drop table t1,ten,t2;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
# MDEV-15777: Use inferred IS NOT NULL predicates in the range optimizer
|
||||
#
|
||||
|
|
|
@ -2092,6 +2092,52 @@ set eq_range_index_dive_limit=default;
|
|||
|
||||
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 # MDEV-18551: New defaults for eq_range_index_dive_limit
|
||||
--echo #
|
||||
|
@ -2115,9 +2161,7 @@ let $a= `select group_concat(a) from t2`;
|
|||
eval analyze SELECT * FROM t1 where a in ($a);
|
||||
drop table t1,ten,t2;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15777: Use inferred IS NOT NULL predicates in the range optimizer
|
||||
|
|
|
@ -1300,7 +1300,7 @@ SELECT * FROM t1 WHERE
|
|||
25 <= a AND b = 23 OR
|
||||
23 <= a;
|
||||
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
|
||||
23 <= a AND a <= 25 OR
|
||||
25 <= a AND b = 23 OR
|
||||
|
@ -3110,6 +3110,82 @@ a b
|
|||
set eq_range_index_dive_limit=default;
|
||||
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
|
||||
#
|
||||
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
|
||||
1 SIMPLE t1 range a a 5 NULL 201 1201.00 100.00 100.00 Using where; Using index
|
||||
drop table t1,ten,t2;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
# MDEV-15777: Use inferred IS NOT NULL predicates in the range optimizer
|
||||
#
|
||||
|
|
|
@ -374,7 +374,7 @@ WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
|
|||
OR ((ID BETWEEN 100 AND 200) AND
|
||||
(Name LIKE 'Pa%' OR (Population > 103200 AND Population < 104000)));
|
||||
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 ()
|
||||
WHERE ((ID < 10) AND (Name LIKE 'H%' OR (Country > 'A' AND Country < 'ARG')))
|
||||
OR ((ID BETWEEN 100 AND 110) AND
|
||||
|
|
83
mysql-test/main/rowid_filter_innodb_debug.result
Normal file
83
mysql-test/main/rowid_filter_innodb_debug.result
Normal file
|
@ -0,0 +1,83 @@
|
|||
set default_storage_engine=innodb;
|
||||
#
|
||||
# MDEV-22761 KILL QUERY during rowid_filter, crashes
|
||||
#
|
||||
create table t0(a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1(a int);
|
||||
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
|
||||
create table t2(a int);
|
||||
insert into t2 select A.a + B.a* 10 from t0 A, t0 B;
|
||||
CREATE TABLE t3 (
|
||||
key1 int ,
|
||||
key2 int,
|
||||
filler varchar(255),
|
||||
KEY (key1),
|
||||
KEY (key2)
|
||||
);
|
||||
select engine from information_schema.tables
|
||||
where table_schema=database() and table_name='t3';
|
||||
engine
|
||||
InnoDB
|
||||
insert into t3
|
||||
select
|
||||
A.a,
|
||||
A.a,
|
||||
'filler-data-filler-data'
|
||||
from
|
||||
t0 A, t1 B;
|
||||
analyze table t2,t3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 analyze status Engine-independent statistics collected
|
||||
test.t2 analyze status OK
|
||||
test.t3 analyze status Engine-independent statistics collected
|
||||
test.t3 analyze status OK
|
||||
explain
|
||||
select * from t2, t3
|
||||
where
|
||||
t3.key1=t2.a and t3.key2 in (2,3);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 100 Using where
|
||||
1 SIMPLE t3 ref|filter key1,key2 key1|key2 5|5 test.t2.a 1000 (20%) Using where; Using rowid filter
|
||||
set debug_sync='handler_rowid_filter_check SIGNAL at_rowid_filter_check WAIT_FOR go';
|
||||
select * from t2, t3
|
||||
where
|
||||
t3.key1=t2.a and t3.key2 in (2,3);
|
||||
connect con1, localhost, root,,;
|
||||
connection con1;
|
||||
set debug_sync='now WAIT_FOR at_rowid_filter_check';
|
||||
kill query $target_id;
|
||||
set debug_sync='now SIGNAL go';
|
||||
connection default;
|
||||
disconnect con1;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
set debug_sync='RESET';
|
||||
drop table t0,t1,t2,t3;
|
||||
set default_storage_engine=default;
|
||||
set @save_optimizer_switch= @@optimizer_switch;
|
||||
set @save_use_stat_tables= @@use_stat_tables;
|
||||
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
|
||||
set @@use_stat_tables=preferably;
|
||||
set optimizer_use_condition_selectivity=2;
|
||||
set optimizer_switch='rowid_filter=on';
|
||||
#
|
||||
# MDEV-22761 KILL QUERY during rowid_filter, crashes
|
||||
# (The smaller testcase)
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4);
|
||||
set debug_sync='handler_rowid_filter_check SIGNAL killme WAIT_FOR go';
|
||||
SELECT * FROM t1 WHERE a > 0 AND b=0;
|
||||
connect con1, localhost, root,,;
|
||||
connection con1;
|
||||
set debug_sync='now WAIT_FOR killme';
|
||||
kill query @id;
|
||||
set debug_sync='now SIGNAL go';
|
||||
connection default;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
set debug_sync='RESET';
|
||||
disconnect con1;
|
||||
drop table t1;
|
||||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
set @@optimizer_switch=@save_optimizer_switch;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
51
mysql-test/main/rowid_filter_innodb_debug.test
Normal file
51
mysql-test/main/rowid_filter_innodb_debug.test
Normal file
|
@ -0,0 +1,51 @@
|
|||
--source include/have_innodb.inc
|
||||
|
||||
set default_storage_engine=innodb;
|
||||
--source include/rowid_filter_debug_kill.inc
|
||||
set default_storage_engine=default;
|
||||
|
||||
--source include/default_optimizer_switch.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
set @save_optimizer_switch= @@optimizer_switch;
|
||||
set @save_use_stat_tables= @@use_stat_tables;
|
||||
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
|
||||
|
||||
set @@use_stat_tables=preferably;
|
||||
|
||||
set optimizer_use_condition_selectivity=2;
|
||||
set optimizer_switch='rowid_filter=on';
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22761 KILL QUERY during rowid_filter, crashes
|
||||
--echo # (The smaller testcase)
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4);
|
||||
|
||||
let $ID= `SELECT @id := CONNECTION_ID()`;
|
||||
|
||||
set debug_sync='handler_rowid_filter_check SIGNAL killme WAIT_FOR go';
|
||||
send SELECT * FROM t1 WHERE a > 0 AND b=0;
|
||||
|
||||
connect (con1, localhost, root,,);
|
||||
connection con1;
|
||||
let $ignore= `SELECT @id := $ID`;
|
||||
set debug_sync='now WAIT_FOR killme';
|
||||
kill query @id;
|
||||
set debug_sync='now SIGNAL go';
|
||||
|
||||
connection default;
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
reap;
|
||||
set debug_sync='RESET';
|
||||
|
||||
disconnect con1;
|
||||
drop table t1;
|
||||
|
||||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
set @@optimizer_switch=@save_optimizer_switch;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
54
mysql-test/main/rowid_filter_myisam_debug.result
Normal file
54
mysql-test/main/rowid_filter_myisam_debug.result
Normal file
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# MDEV-22761 KILL QUERY during rowid_filter, crashes
|
||||
#
|
||||
create table t0(a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1(a int);
|
||||
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
|
||||
create table t2(a int);
|
||||
insert into t2 select A.a + B.a* 10 from t0 A, t0 B;
|
||||
CREATE TABLE t3 (
|
||||
key1 int ,
|
||||
key2 int,
|
||||
filler varchar(255),
|
||||
KEY (key1),
|
||||
KEY (key2)
|
||||
);
|
||||
select engine from information_schema.tables
|
||||
where table_schema=database() and table_name='t3';
|
||||
engine
|
||||
MyISAM
|
||||
insert into t3
|
||||
select
|
||||
A.a,
|
||||
A.a,
|
||||
'filler-data-filler-data'
|
||||
from
|
||||
t0 A, t1 B;
|
||||
analyze table t2,t3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 analyze status Engine-independent statistics collected
|
||||
test.t2 analyze status OK
|
||||
test.t3 analyze status Engine-independent statistics collected
|
||||
test.t3 analyze status Table is already up to date
|
||||
explain
|
||||
select * from t2, t3
|
||||
where
|
||||
t3.key1=t2.a and t3.key2 in (2,3);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 100 Using where
|
||||
1 SIMPLE t3 ref|filter key1,key2 key1|key2 5|5 test.t2.a 1000 (18%) Using where; Using rowid filter
|
||||
set debug_sync='handler_rowid_filter_check SIGNAL at_rowid_filter_check WAIT_FOR go';
|
||||
select * from t2, t3
|
||||
where
|
||||
t3.key1=t2.a and t3.key2 in (2,3);
|
||||
connect con1, localhost, root,,;
|
||||
connection con1;
|
||||
set debug_sync='now WAIT_FOR at_rowid_filter_check';
|
||||
kill query $target_id;
|
||||
set debug_sync='now SIGNAL go';
|
||||
connection default;
|
||||
disconnect con1;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
set debug_sync='RESET';
|
||||
drop table t0,t1,t2,t3;
|
3
mysql-test/main/rowid_filter_myisam_debug.test
Normal file
3
mysql-test/main/rowid_filter_myisam_debug.test
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
--source include/rowid_filter_debug_kill.inc
|
||||
|
|
@ -71,19 +71,49 @@ values
|
|||
'alksj wpsj sa ^#!@ '
|
||||
);
|
||||
select bug14233_1();
|
||||
ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.bug14233_1 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1601 Creation context of stored routine `test`.`bug14233_1` is invalid
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select count(*) from mysql.user' at line 3
|
||||
Error 1457 Failed to load routine test.bug14233_1 (internal code -6). For more details, run SHOW WARNINGS
|
||||
create view v1 as select bug14233_1();
|
||||
ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.bug14233_1 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1601 Creation context of stored routine `test`.`bug14233_1` is invalid
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select count(*) from mysql.user' at line 3
|
||||
Error 1457 Failed to load routine test.bug14233_1 (internal code -6). For more details, run SHOW WARNINGS
|
||||
select bug14233_2();
|
||||
ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.bug14233_2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1601 Creation context of stored routine `test`.`bug14233_2` is invalid
|
||||
Error 1320 No RETURN found in FUNCTION test.bug14233_2
|
||||
Error 1457 Failed to load routine test.bug14233_2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
create view v1 as select bug14233_2();
|
||||
ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.bug14233_2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1601 Creation context of stored routine `test`.`bug14233_2` is invalid
|
||||
Error 1320 No RETURN found in FUNCTION test.bug14233_2
|
||||
Error 1457 Failed to load routine test.bug14233_2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
call bug14233_3();
|
||||
ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.bug14233_3 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1601 Creation context of stored routine `test`.`bug14233_3` is invalid
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wpsj sa ^#!@ ' at line 3
|
||||
Error 1457 Failed to load routine test.bug14233_3 (internal code -6). For more details, run SHOW WARNINGS
|
||||
drop trigger t1_ai;
|
||||
create trigger t1_ai after insert on t1 for each row call bug14233_3();
|
||||
insert into t1 values (0);
|
||||
ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.bug14233_3 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1601 Creation context of stored routine `test`.`bug14233_3` is invalid
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wpsj sa ^#!@ ' at line 3
|
||||
Error 1457 Failed to load routine test.bug14233_3 (internal code -6). For more details, run SHOW WARNINGS
|
||||
drop trigger t1_ai;
|
||||
drop table t1;
|
||||
drop function bug14233_1;
|
||||
|
|
|
@ -128,20 +128,26 @@ values
|
|||
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
select bug14233_1();
|
||||
show warnings;
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
create view v1 as select bug14233_1();
|
||||
show warnings;
|
||||
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
select bug14233_2();
|
||||
show warnings;
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
create view v1 as select bug14233_2();
|
||||
show warnings;
|
||||
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
call bug14233_3();
|
||||
show warnings;
|
||||
drop trigger t1_ai;
|
||||
create trigger t1_ai after insert on t1 for each row call bug14233_3();
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
insert into t1 values (0);
|
||||
show warnings;
|
||||
|
||||
# Clean-up
|
||||
drop trigger t1_ai;
|
||||
|
|
|
@ -5304,8 +5304,12 @@ drop database if exists това_е_дълго_име_за_база_данни_
|
|||
create database това_е_дълго_име_за_база_данни_нали|
|
||||
INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','', 'utf8', 'utf8_general_ci', 'utf8_general_ci', 'n/a', 'NONE')|
|
||||
call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()|
|
||||
ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго (internal code -6). For more details, run SHOW WARNINGS
|
||||
drop database това_е_дълго_име_за_база_данни_нали|
|
||||
show warnings|
|
||||
Level Code Message
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 2
|
||||
Error 1457 Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго (internal code -6). For more details, run SHOW WARNINGS
|
||||
CREATE TABLE t3 (
|
||||
Member_ID varchar(15) NOT NULL,
|
||||
PRIMARY KEY (Member_ID)
|
||||
|
|
|
@ -6315,7 +6315,7 @@ INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_да
|
|||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()|
|
||||
drop database това_е_дълго_име_за_база_данни_нали|
|
||||
|
||||
show warnings|
|
||||
|
||||
#
|
||||
# BUG#21493: Crash on the second call of a procedure containing
|
||||
|
|
|
@ -3,27 +3,7 @@ set @save_max_heap_table_size=@@max_heap_table_size;
|
|||
set default_storage_engine=MYISAM;
|
||||
CREATE TABLE t1 (id INTEGER);
|
||||
CREATE TABLE t2 (id INTEGER);
|
||||
INSERT INTO t1 (id) VALUES (1), (1), (1),(1);
|
||||
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;
|
||||
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_1_to_1024 b;
|
||||
SELECT AVG(DISTINCT id) FROM t1 GROUP BY id % 13;
|
||||
AVG(DISTINCT id)
|
||||
513.5000
|
||||
|
@ -54,11 +34,9 @@ SUM(DISTINCT id)/COUNT(DISTINCT id)
|
|||
517.0000
|
||||
511.5000
|
||||
512.5000
|
||||
INSERT INTO t1 SELECT id+1024 FROM t1;
|
||||
INSERT INTO t1 SELECT id+2048 FROM t1;
|
||||
INSERT INTO t1 SELECT id+4096 FROM t1;
|
||||
INSERT INTO t1 SELECT id+8192 FROM t1;
|
||||
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
|
||||
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_1025_to_16384 b;
|
||||
INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a,seq_1_to_16384 b
|
||||
ORDER by (a.seq*0+b.seq)*rand();
|
||||
SELECT SUM(DISTINCT id) sm FROM t1;
|
||||
sm
|
||||
134225920
|
||||
|
@ -110,9 +88,10 @@ sm
|
|||
# (bug #56927)
|
||||
#
|
||||
SET max_heap_table_size=default;
|
||||
INSERT INTO t1 SELECT id+16384 FROM t1;
|
||||
DELETE FROM t2;
|
||||
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
|
||||
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_16385_to_32768 b;
|
||||
TRUNCATE t2;
|
||||
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;
|
||||
sm
|
||||
536887296
|
||||
|
|
|
@ -21,32 +21,15 @@ set default_storage_engine=MYISAM;
|
|||
CREATE TABLE t1 (id INTEGER);
|
||||
CREATE TABLE t2 (id INTEGER);
|
||||
|
||||
INSERT INTO t1 (id) VALUES (1), (1), (1),(1);
|
||||
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;
|
||||
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_1_to_1024 b;
|
||||
|
||||
# Just test that AVG(DISTINCT) is there
|
||||
SELECT AVG(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 id+2048 FROM t1;
|
||||
INSERT INTO t1 SELECT id+4096 FROM t1;
|
||||
INSERT INTO t1 SELECT id+8192 FROM t1;
|
||||
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
|
||||
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_1025_to_16384 b;
|
||||
INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a,seq_1_to_16384 b
|
||||
ORDER by (a.seq*0+b.seq)*rand();
|
||||
|
||||
# SELECT '++++++++++++++++++++++++++++++++++++++++++++++++++';
|
||||
|
||||
|
@ -76,9 +59,10 @@ SELECT SUM(DISTINCT id) sm FROM t1 GROUP BY id % 13;
|
|||
|
||||
SET max_heap_table_size=default;
|
||||
|
||||
INSERT INTO t1 SELECT id+16384 FROM t1;
|
||||
DELETE FROM t2;
|
||||
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
|
||||
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_16385_to_32768 b;
|
||||
TRUNCATE t2;
|
||||
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;
|
||||
|
||||
|
|
|
@ -479,9 +479,23 @@ myfunc_int(max(a) over (order by b) , b)
|
|||
drop view v1;
|
||||
drop function myfunc_int;
|
||||
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
|
||||
RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
|
||||
CREATE AGGREGATE FUNCTION avg2
|
||||
|
@ -584,3 +598,4 @@ drop table t1;
|
|||
DROP FUNCTION avgcost;
|
||||
DROP FUNCTION avg2;
|
||||
DROP FUNCTION myfunc_double;
|
||||
# End of 10.4 tests
|
||||
|
|
|
@ -542,9 +542,31 @@ drop view v1;
|
|||
drop function myfunc_int;
|
||||
drop table t1;
|
||||
|
||||
--echo
|
||||
--echo MDEV-15073: Generic UDAF parser code in server for windows functions
|
||||
--echo
|
||||
--echo #
|
||||
--echo # MDEV-23327: Can't uninstall UDF if the implementation library
|
||||
--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
|
||||
eval CREATE AGGREGATE FUNCTION avgcost
|
||||
|
@ -607,3 +629,5 @@ drop table t1;
|
|||
DROP FUNCTION avgcost;
|
||||
DROP FUNCTION avg2;
|
||||
DROP FUNCTION myfunc_double;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
|
|
@ -1679,6 +1679,16 @@ sub command_line_setup {
|
|||
$opt_shutdown_timeout= 24 * 60;
|
||||
# One day for PID file creation (this is given in seconds not minutes)
|
||||
$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");
|
||||
}
|
||||
}
|
||||
}
|
||||
mtr_verbose("ASAN_OPTIONS=$ENV{ASAN_OPTIONS}");
|
||||
|
||||
|
@ -6462,7 +6472,7 @@ Options for debugging the product
|
|||
debug-server Use debug version of server, but without turning on
|
||||
tracing
|
||||
debugger=NAME Start mysqld in the selected debugger
|
||||
gdb[=gdb-arguments] Start the mysqld(s) in gdb.
|
||||
gdb[=gdb_arguments] Start the mariadbd(s) in gdb
|
||||
manual-debug Let user manually start mysqld in debugger, before
|
||||
running test(s)
|
||||
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
|
||||
#
|
|
@ -249,7 +249,11 @@ RETURN f2();
|
|||
END;
|
||||
END;
|
||||
$$
|
||||
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
|
||||
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
DROP PACKAGE test2;
|
||||
#
|
||||
# Broken CREATE PACKAGE at a package function call time
|
||||
|
@ -271,11 +275,23 @@ UPDATE mysql.proc SET `body`='garbage'
|
|||
WHERE db='test' AND name='test2' AND type='PACKAGE';
|
||||
# sp-cache-invalidate
|
||||
SELECT test2.f1();
|
||||
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
|
||||
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
SELECT test2.f1();
|
||||
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
|
||||
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
SELECT test2.f1();
|
||||
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
|
||||
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
DROP PACKAGE test2;
|
||||
#
|
||||
# Broken CREATE PACKAGE at a package procedure call time
|
||||
|
@ -297,11 +313,23 @@ UPDATE mysql.proc SET `body`='garbage'
|
|||
WHERE db='test' AND name='test2' AND type='PACKAGE';
|
||||
# sp-cache-invalidate
|
||||
CALL test2.p1();
|
||||
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
|
||||
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
CALL test2.p1();
|
||||
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
|
||||
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
CALL test2.p1();
|
||||
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
|
||||
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
|
||||
DROP PACKAGE test2;
|
||||
#
|
||||
# Bad routine names
|
||||
|
|
|
@ -335,6 +335,7 @@ CREATE PACKAGE BODY test2 AS
|
|||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
show warnings;
|
||||
|
||||
DROP PACKAGE test2;
|
||||
|
||||
|
@ -367,10 +368,13 @@ UPDATE mysql.proc SET `body`='garbage'
|
|||
--source sp-cache-invalidate.inc
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
SELECT test2.f1();
|
||||
show warnings;
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
SELECT test2.f1();
|
||||
show warnings;
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
SELECT test2.f1();
|
||||
show warnings;
|
||||
|
||||
DROP PACKAGE test2;
|
||||
|
||||
|
@ -403,10 +407,13 @@ UPDATE mysql.proc SET `body`='garbage'
|
|||
--source sp-cache-invalidate.inc
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
CALL test2.p1();
|
||||
show warnings;
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
CALL test2.p1();
|
||||
show warnings;
|
||||
--error ER_SP_PROC_TABLE_CORRUPT
|
||||
CALL test2.p1();
|
||||
show warnings;
|
||||
|
||||
DROP PACKAGE test2;
|
||||
|
||||
|
|
|
@ -41,6 +41,14 @@ call innodb_insert_proc(2000);
|
|||
insert into innodb_compact select * from innodb_normal;
|
||||
insert into innodb_dynamic select * from innodb_normal;
|
||||
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
|
||||
set global innodb_compression_algorithm = 1;
|
||||
alter table innodb_normal engine=innodb page_compressed=DEFAULT;
|
||||
|
@ -64,6 +72,16 @@ innodb_dynamic CREATE TABLE `innodb_dynamic` (
|
|||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) 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 table innodb_normal;
|
||||
drop table innodb_compact;
|
||||
|
|
|
@ -37,41 +37,44 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
|
|||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT `encrypted`=yes `encryption_key_id`=4
|
||||
create procedure innodb_insert_proc (repeat_count int)
|
||||
begin
|
||||
declare current_num int;
|
||||
set current_num = 0;
|
||||
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//
|
||||
commit;
|
||||
begin;
|
||||
call innodb_insert_proc(2000);
|
||||
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';
|
||||
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
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';
|
||||
variable_value > 0
|
||||
1
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
# restart
|
||||
update innodb_normal set c1 = c1 +1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_compressed set c1 = c1 + 1;
|
||||
update innodb_dynamic set c1 = c1 + 1;
|
||||
update innodb_redundant set c1 = c1 + 1;
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
variable_value > 0
|
||||
1
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value > 0
|
||||
1
|
||||
BEGIN;
|
||||
INSERT INTO innodb_normal SET c1 = 1;
|
||||
INSERT INTO innodb_compact SET c1 = 1;
|
||||
INSERT INTO innodb_compressed SET c1 = 1;
|
||||
INSERT INTO innodb_dynamic SET c1 = 1;
|
||||
INSERT INTO innodb_redundant SET c1 = 1;
|
||||
COMMIT;
|
||||
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
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_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;
|
||||
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
||||
show create table innodb_compact;
|
||||
|
@ -101,13 +104,16 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
|
|||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
drop procedure innodb_insert_proc;
|
||||
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
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;
|
||||
drop table innodb_normal;
|
||||
drop table innodb_compact;
|
||||
drop table innodb_compressed;
|
||||
|
|
|
@ -37,8 +37,10 @@ insert into innodb_compact select * from innodb_normal;
|
|||
insert into innodb_dynamic select * from innodb_normal;
|
||||
commit;
|
||||
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
||||
--source include/wait_condition.inc
|
||||
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';
|
||||
|
||||
--let $restart_parameters=--innodb-encrypt-tables=OFF
|
||||
--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;
|
||||
alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT page_compressed=DEFAULT;
|
||||
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 table innodb_normal;
|
||||
|
|
|
@ -18,47 +18,34 @@ show create table innodb_compressed;
|
|||
show create table innodb_dynamic;
|
||||
show create table innodb_redundant;
|
||||
|
||||
delimiter //;
|
||||
create procedure innodb_insert_proc (repeat_count int)
|
||||
begin
|
||||
declare current_num int;
|
||||
set current_num = 0;
|
||||
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;
|
||||
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||
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;
|
||||
|
||||
begin;
|
||||
call innodb_insert_proc(2000);
|
||||
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';
|
||||
select variable_value > 0 from information_schema.global_status
|
||||
where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
update innodb_normal set c1 = c1 +1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_compressed set c1 = c1 + 1;
|
||||
update innodb_dynamic set c1 = c1 + 1;
|
||||
update innodb_redundant set c1 = c1 + 1;
|
||||
BEGIN;
|
||||
INSERT INTO innodb_normal SET c1 = 1;
|
||||
INSERT INTO innodb_compact SET c1 = 1;
|
||||
INSERT INTO innodb_compressed SET 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';
|
||||
--source include/wait_condition.inc
|
||||
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||
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';
|
||||
select variable_name from information_schema.global_status
|
||||
where variable_value > 0 and variable_name
|
||||
IN ('INNODB_NUM_PAGES_ENCRYPTED','INNODB_NUM_PAGES_DECRYPTED');
|
||||
|
||||
SET GLOBAL innodb_encrypt_tables=OFF;
|
||||
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;
|
||||
show create table innodb_redundant;
|
||||
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_DECRYPTED';
|
||||
--source include/wait_condition.inc
|
||||
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||
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_compact;
|
||||
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;
|
||||
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
|
||||
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
|
||||
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
|
||||
|
@ -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;
|
||||
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
|
||||
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
|
||||
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
|
||||
|
@ -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;
|
||||
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
|
||||
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
|
||||
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
|
||||
|
|
|
@ -27,7 +27,6 @@ galera_ftwrl : MDEV-21525 galera.galera_ftwrl
|
|||
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
|
||||
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_load_data : MDEV-19968 galera.galera_load_data
|
||||
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_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
|
||||
|
|
|
@ -19,10 +19,18 @@ connection node_2;
|
|||
Performing --wsrep-recover ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
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]
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
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;
|
||||
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;
|
|
@ -0,0 +1,95 @@
|
|||
connection node_2;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_trx_fragment_size=DEFAULT;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SET SESSION wsrep_trx_fragment_size=0;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SET GLOBAL wsrep_trx_fragment_size=0;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SET GLOBAL wsrep_trx_fragment_size=-1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_trx_fragment_size value: '-1'
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SET SESSION wsrep_trx_fragment_size=-1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_trx_fragment_size value: '-1'
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SET GLOBAL wsrep_trx_fragment_size=100;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 0
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SET SESSION wsrep_trx_fragment_size=100;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SET GLOBAL wsrep_trx_fragment_size='A';
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_trx_fragment_size'
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SET SESSION wsrep_trx_fragment_size='A';
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_trx_fragment_size'
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SET GLOBAL wsrep_trx_fragment_size=NULL;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_trx_fragment_size'
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SET SESSION wsrep_trx_fragment_size=NULL;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_trx_fragment_size'
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
Variable_name Value
|
||||
wsrep_trx_fragment_size 100
|
||||
SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
|
|
@ -46,6 +46,12 @@ INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
|
|||
--source include/galera_wait_ready.inc
|
||||
--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
|
||||
--source include/diff_servers.inc
|
||||
|
||||
|
@ -56,8 +62,8 @@ DROP TABLE t1;
|
|||
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
|
||||
|
||||
# Confirm that IST did not take place
|
||||
--let $assert_text = IST first seqno [24] 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_text = 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_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
|
||||
--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
|
43
mysql-test/suite/galera/t/galera_var_trx_fragment_size.test
Normal file
43
mysql-test/suite/galera/t/galera_var_trx_fragment_size.test
Normal file
|
@ -0,0 +1,43 @@
|
|||
--source include/galera_cluster.inc
|
||||
|
||||
SET SESSION wsrep_trx_fragment_size=DEFAULT;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SET SESSION wsrep_trx_fragment_size=0;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SET GLOBAL wsrep_trx_fragment_size=0;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SET GLOBAL wsrep_trx_fragment_size=-1;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SET SESSION wsrep_trx_fragment_size=-1;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SET GLOBAL wsrep_trx_fragment_size=100;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SET SESSION wsrep_trx_fragment_size=100;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET GLOBAL wsrep_trx_fragment_size='A';
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET SESSION wsrep_trx_fragment_size='A';
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET GLOBAL wsrep_trx_fragment_size=NULL;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET SESSION wsrep_trx_fragment_size=NULL;
|
||||
SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
|
||||
SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
|
|
@ -12,11 +12,7 @@
|
|||
|
||||
GCF-354 : MDEV-24010 galera_3nodes.GCF-354 MTR fails : WSREP has not yet prepared node for application use
|
||||
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_slave_options_do :MDEV-8798
|
||||
galera_slave_options_ignore : MDEV-8798
|
||||
galera_ipv6_mysqldump : MDEV-23576
|
||||
|
|
|
@ -769,3 +769,24 @@ ID ParentID Value Flag
|
|||
INSERT INTO parent (ID) VALUES (100);
|
||||
UPDATE child SET ParentID=100 WHERE ID=123123;
|
||||
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
|
||||
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;
|
||||
|
|
|
@ -416,6 +416,41 @@ connection default;
|
|||
XA END 'xid';
|
||||
XA ROLLBACK 'xid';
|
||||
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
|
||||
#
|
||||
# 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
|
||||
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';
|
||||
|
|
|
@ -416,4 +416,27 @@ DROP TABLE t;
|
|||
CREATE TABLE t (pk SERIAL, b TEXT CHARACTER SET utf8) ENGINE=InnoDB;
|
||||
ALTER TABLE t MODIFY b TEXT CHARACTER SET utf8mb4 FIRST;
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-23672 Assertion `v.v_indexes.empty()' failed in dict_table_t::instant_column
|
||||
#
|
||||
create table t1 (
|
||||
col_int integer,
|
||||
col_text text not null,
|
||||
col_int_g integer generated always as (col_int) unique,
|
||||
col_text_g text generated always as (substr(col_text,1,499)) )
|
||||
engine innodb row_format = redundant;
|
||||
insert into t1 (col_int,col_text) values (0, 'a'), (null, 'b');
|
||||
alter table t1 modify column col_text text null, algorithm = instant;
|
||||
insert into t1 (col_int,col_text) values (1, null), (null, null);
|
||||
update t1 set col_text= 'd';
|
||||
select * from t1;
|
||||
col_int col_text col_int_g col_text_g
|
||||
0 d 0 d
|
||||
NULL d NULL d
|
||||
1 d 1 d
|
||||
NULL d NULL d
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
|
||||
|
|
|
@ -421,6 +421,41 @@ ALTER TABLE t1 ADD FOREIGN KEY f (a) REFERENCES t1 (pk), LOCK=EXCLUSIVE;# Cleanu
|
|||
XA END 'xid';
|
||||
XA ROLLBACK 'xid';
|
||||
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
|
||||
#
|
||||
|
|
|
@ -56,6 +56,8 @@ WHERE table_name='innodb_stats_drop_locked';
|
|||
SELECT table_name FROM mysql.innodb_index_stats
|
||||
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
|
||||
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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
--loose-innodb-lock-schedule-algorithm=FCFS
|
|
@ -437,4 +437,25 @@ CREATE TABLE t (pk SERIAL, b TEXT CHARACTER SET utf8) ENGINE=InnoDB;
|
|||
ALTER TABLE t MODIFY b TEXT CHARACTER SET utf8mb4 FIRST;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23672 Assertion `v.v_indexes.empty()' failed in dict_table_t::instant_column
|
||||
--echo #
|
||||
create table t1 (
|
||||
col_int integer,
|
||||
col_text text not null,
|
||||
col_int_g integer generated always as (col_int) unique,
|
||||
col_text_g text generated always as (substr(col_text,1,499)) )
|
||||
engine innodb row_format = redundant;
|
||||
insert into t1 (col_int,col_text) values (0, 'a'), (null, 'b');
|
||||
# FIXME: remove the following to trigger the bug
|
||||
--disable_query_log
|
||||
alter table t1 modify column col_text text null, force;
|
||||
--enable_query_log
|
||||
alter table t1 modify column col_text text null, algorithm = instant;
|
||||
insert into t1 (col_int,col_text) values (1, null), (null, null);
|
||||
update t1 set col_text= 'd';
|
||||
select * from t1;
|
||||
check table t1;
|
||||
drop table t1;
|
||||
|
||||
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
|
||||
|
|
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 ...
|
||||
4 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
|
||||
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)
|
||||
AGAINST ('+ MySQL + (>Well < stands)' IN BOOLEAN MODE);
|
||||
id title body
|
||||
|
|
|
@ -919,4 +919,46 @@ DROP TABLE t1;
|
|||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
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;
|
||||
|
|
|
@ -107,6 +107,26 @@ SELECT * FROM articles WHERE MATCH (title,body)
|
|||
SELECT * FROM articles WHERE MATCH (title,body)
|
||||
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
|
||||
# "MySQL" and "Well" or "MySQL" and "stands". But rank the
|
||||
# doc with "Well" higher, and doc with "stands" lower.
|
||||
|
|
|
@ -889,4 +889,46 @@ DROP TABLE t2;
|
|||
DROP TABLE t3;
|
||||
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;
|
||||
|
|
|
@ -368,7 +368,28 @@ drop procedure sp;
|
|||
drop table t,t2,t3,log_tbl;
|
||||
drop view v;
|
||||
drop procedure log;
|
||||
# MDEV-19130 Assertion
|
||||
# `next_insert_id >= auto_inc_interval_for_cur_row.minimum()'
|
||||
# failed in handler::update_auto_increment after error 167
|
||||
create or replace table t (f tinyint auto_increment null,
|
||||
s timestamp, e timestamp,
|
||||
period for app(s,e), key(f, s));
|
||||
insert into t (s,e) values
|
||||
('2021-08-22 10:28:43', '2023-09-17 00:00:00'),
|
||||
('2019-05-09 21:45:24', '2020-04-22 14:38:49');
|
||||
insert into t (s,e) select s,e from t;
|
||||
insert into t (s,e) select s,e from t;
|
||||
insert into t (s,e) select s,e from t;
|
||||
insert into t (s,e) values ('2015-07-07 00:00:00','2020-03-11 08:48:52');
|
||||
insert into t (s,e) select s,e from t;
|
||||
insert into t (s,e) select s,e from t;
|
||||
insert into t select * from t;
|
||||
ERROR 22003: Out of range value for column 'f' at row ROW
|
||||
delete ignore from t
|
||||
for portion of app from '2015-07-07 00:00:00' to '2020-03-11 08:48:52';
|
||||
drop table t;
|
||||
create table t1 (pk int, s date, e date, period for se (s,e), primary key (pk,se without overlaps));
|
||||
insert into t1 values (1,'2020-01-01','2020-02-20');
|
||||
delete from t1 for portion of se from '2020-01-30' to '2020-01-31';
|
||||
drop table t1;
|
||||
# End of 10.5 tests
|
||||
|
|
|
@ -281,3 +281,14 @@ create table t1 (s date, e date, period for app(s,e), f varchar(8)) engine=aria
|
|||
insert into t1 values ('2024-05-13','2026-03-25','foo');
|
||||
update t1 for portion of app from '2024-04-02' to '2026-03-15' set f = 'bar';
|
||||
drop table t1;
|
||||
# MDEV-19130 Assertion
|
||||
# `next_insert_id >= auto_inc_interval_for_cur_row.minimum()'
|
||||
# failed in handler::update_auto_increment after error 167
|
||||
create table t1 (id int auto_increment, f int, s datetime, e datetime, period for p(s,e), primary key(id));
|
||||
insert into t1 (s,e) values ('1994-01-06','2004-11-30'),('1994-06-21','1997-06-20');
|
||||
update ignore t1 set id = 2429681664;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'id' at row 1
|
||||
Warning 1264 Out of range value for column 'id' at row 2
|
||||
update ignore t1 for portion of p from '1995-07-06' to '2009-01-12' set f = 1;
|
||||
drop table t1;
|
||||
|
|
|
@ -194,11 +194,38 @@ call sp;
|
|||
drop table t1;
|
||||
drop procedure sp;
|
||||
|
||||
|
||||
drop table t,t2,t3,log_tbl;
|
||||
drop view v;
|
||||
drop procedure log;
|
||||
|
||||
--echo # MDEV-19130 Assertion
|
||||
--echo # `next_insert_id >= auto_inc_interval_for_cur_row.minimum()'
|
||||
--echo # failed in handler::update_auto_increment after error 167
|
||||
|
||||
create or replace table t (f tinyint auto_increment null,
|
||||
s timestamp, e timestamp,
|
||||
period for app(s,e), key(f, s));
|
||||
insert into t (s,e) values
|
||||
('2021-08-22 10:28:43', '2023-09-17 00:00:00'),
|
||||
('2019-05-09 21:45:24', '2020-04-22 14:38:49');
|
||||
insert into t (s,e) select s,e from t;
|
||||
insert into t (s,e) select s,e from t;
|
||||
insert into t (s,e) select s,e from t;
|
||||
insert into t (s,e) values ('2015-07-07 00:00:00','2020-03-11 08:48:52');
|
||||
insert into t (s,e) select s,e from t;
|
||||
insert into t (s,e) select s,e from t;
|
||||
|
||||
--replace_regex /row \d+/row ROW/
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t select * from t;
|
||||
|
||||
--disable_warnings
|
||||
delete ignore from t
|
||||
for portion of app from '2015-07-07 00:00:00' to '2020-03-11 08:48:52';
|
||||
--enable_warnings
|
||||
|
||||
drop table t;
|
||||
|
||||
#
|
||||
# MDEV-22424 Server crashes in handler::check_duplicate_long_entry_key or Assertion `inited == NONE || lookup_handler != this' failed upon DELETE FOR PORTION on table with long unique key
|
||||
#
|
||||
|
@ -206,3 +233,5 @@ create table t1 (pk int, s date, e date, period for se (s,e), primary key (pk,s
|
|||
insert into t1 values (1,'2020-01-01','2020-02-20');
|
||||
delete from t1 for portion of se from '2020-01-30' to '2020-01-31';
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
|
|
@ -173,3 +173,13 @@ update t1 for portion of app from '2024-04-02' to '2026-03-15' set f = 'bar';
|
|||
|
||||
# cleanup
|
||||
drop table t1;
|
||||
|
||||
--echo # MDEV-19130 Assertion
|
||||
--echo # `next_insert_id >= auto_inc_interval_for_cur_row.minimum()'
|
||||
--echo # failed in handler::update_auto_increment after error 167
|
||||
create table t1 (id int auto_increment, f int, s datetime, e datetime, period for p(s,e), primary key(id));
|
||||
insert into t1 (s,e) values ('1994-01-06','2004-11-30'),('1994-06-21','1997-06-20');
|
||||
update ignore t1 set id = 2429681664;
|
||||
update ignore t1 for portion of p from '1995-07-06' to '2009-01-12' set f = 1;
|
||||
|
||||
drop table t1;
|
||||
|
|
|
@ -16,7 +16,6 @@ rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition
|
|||
rpl_row_binlog_max_cache_size : MDEV-11092
|
||||
rpl_row_index_choice : MDEV-11666
|
||||
rpl_semi_sync_after_sync : fails after MDEV-16172
|
||||
rpl_slave_grp_exec: MDEV-10514
|
||||
rpl_auto_increment_update_failure : disabled for now
|
||||
rpl_current_user : waits for MDEV-22374 fix
|
||||
rpl_parallel2 : waits for MDEV-23089
|
||||
|
|
|
@ -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("table or database name 'mysqltest-1'");
|
||||
connection master;
|
||||
DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`;
|
||||
CREATE DATABASE `#mysql50#mysqltest-1`;
|
||||
CREATE DATABASE `mysqltest-1`;
|
||||
connection slave;
|
||||
connection master;
|
||||
connection slave;
|
||||
connection master;
|
||||
Master position is not changed
|
||||
connection slave;
|
||||
STOP SLAVE SQL_THREAD;
|
||||
include/wait_for_slave_sql_to_stop.inc
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
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;
|
||||
Master position has been changed
|
||||
DROP DATABASE `mysqltest-1`;
|
||||
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
|
||||
|
|
|
@ -5,10 +5,12 @@ set @time_before_kill := (select CURRENT_TIMESTAMP);
|
|||
[Time before the query]
|
||||
[Connection ID of the slave I/O thread found]
|
||||
kill <connection_id>;
|
||||
include/wait_for_slave_io_to_stop.inc
|
||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||
[Time after the query]
|
||||
[Killing of the slave IO thread was successful]
|
||||
START SLAVE IO_THREAD;
|
||||
include/wait_for_slave_io_to_start.inc
|
||||
connection master;
|
||||
create table t1 (a int primary key);
|
||||
connection slave;
|
||||
|
|
|
@ -55,8 +55,17 @@ FLUSH BINARY LOGS;
|
|||
--let $purge_to_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||
--eval PURGE BINARY LOGS TO '$purge_to_binlog';
|
||||
# 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)
|
||||
|
||||
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;
|
||||
|
||||
--connection slave
|
||||
SELECT @@global.gtid_slave_pos;
|
||||
# start the slave sucessfully
|
||||
|
|
|
@ -14,8 +14,7 @@ call mtr.add_suppression("table or database name 'mysqltest-1'");
|
|||
|
||||
connection master;
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`;
|
||||
CREATE DATABASE `#mysql50#mysqltest-1`;
|
||||
CREATE DATABASE `mysqltest-1`;
|
||||
--enable_warnings
|
||||
sync_slave_with_master;
|
||||
|
||||
|
@ -34,13 +33,25 @@ if ($before_position == $after_position)
|
|||
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;
|
||||
STOP SLAVE SQL_THREAD;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
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;
|
||||
#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
|
||||
|
||||
let $datadir= `select @@datadir`;
|
||||
|
@ -55,8 +66,15 @@ if ($before_position != $after_position)
|
|||
echo Master position has been changed;
|
||||
}
|
||||
|
||||
DROP DATABASE `mysqltest-1`;
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
DROP DATABASE `#mysql50#mysqltest-1`;
|
||||
--let $rpl_only_running_threads= 1
|
||||
SHOW CREATE TABLE mysql.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;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
|
|
@ -101,7 +101,9 @@ TRUNCATE t3;
|
|||
ALTER TABLE t1 ADD PRIMARY KEY (a);
|
||||
ALTER TABLE t2 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;
|
||||
|
||||
--connection master
|
||||
|
@ -146,7 +148,7 @@ ALTER TABLE t1 ENGINE=InnoDB;
|
|||
ALTER TABLE t2 ENGINE=InnoDB;
|
||||
ALTER TABLE t3 ENGINE=InnoDB;
|
||||
|
||||
--connection slave
|
||||
--sync_slave_with_master
|
||||
RENAME TABLE t3 TO t3_bak;
|
||||
|
||||
--connection master
|
||||
|
|
|
@ -38,8 +38,8 @@ set @time_before_kill := (select CURRENT_TIMESTAMP);
|
|||
|
||||
--replace_regex /kill [0-9]*/kill <connection_id>/
|
||||
--eval kill $connection_id
|
||||
let $wait_condition= SELECT COUNT(*) = 0 FROM information_schema.processlist where id=$connection_id;
|
||||
--source include/wait_condition.inc
|
||||
--source include/wait_for_slave_io_to_stop.inc
|
||||
|
||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||
|
||||
--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]
|
||||
|
||||
START SLAVE IO_THREAD;
|
||||
--source include/wait_for_slave_io_to_start.inc
|
||||
|
||||
# Ensure that the slave io thread started properly
|
||||
connection master;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#
|
||||
# wsrep_cluster_address
|
||||
#
|
||||
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex.*");
|
||||
# save the initial value
|
||||
SET @wsrep_cluster_address_global_saved = @@global.wsrep_cluster_address;
|
||||
# default
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
--echo # wsrep_cluster_address
|
||||
--echo #
|
||||
|
||||
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex.*");
|
||||
|
||||
--echo # save the initial value
|
||||
SET @wsrep_cluster_address_global_saved = @@global.wsrep_cluster_address;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue