1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-15 08:21:24 +03:00

Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3

This commit is contained in:
Alexander Barkov
2017-03-24 18:48:40 +04:00
321 changed files with 5654 additions and 9539 deletions

View File

@@ -6,26 +6,16 @@
source include/not_embedded.inc;
--disable_query_log
call mtr.add_suppression("InnoDB: New log files created");
call mtr.add_suppression("InnoDB: Creating foreign key constraint system tables");
let $innodb_index_stats = query_get_value(show create table mysql.innodb_index_stats, Create Table, 1);
let $innodb_table_stats = query_get_value(show create table mysql.innodb_table_stats, Create Table, 1);
let $database=`select database()`;
drop table mysql.innodb_index_stats, mysql.innodb_table_stats;
let $_server_id= `SELECT @@server_id`;
let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect;
let $datadir= `SELECT @@datadir`;
exec echo "wait" > $_expect_file_name;
shutdown_server;
remove_file $datadir/ib_logfile0;
remove_file $datadir/ib_logfile1;
--source include/shutdown_mysqld.inc
remove_files_wildcard $datadir ib_logfile*;
remove_file $datadir/ibdata1;
exec echo "restart" > $_expect_file_name;
enable_reconnect;
source include/wait_until_connected_again.inc;
disable_reconnect;
--source include/start_mysqld.inc
--disable_query_log
use mysql;

View File

@@ -1,4 +1,3 @@
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
@@ -117,9 +116,9 @@ UPDATE t2 SET qa=@l,ra=@l,sa=@l,ta=@l,ua=@l;
UPDATE t2 SET va=@l,wa=@l,xa=@l,ya=@l,za=@l;
COMMIT;
INSERT INTO t1 SELECT * from t2;
SET DEBUG_DBUG='+d,crash_commit_before';
BEGIN;
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e;
ERROR HY000: Lost connection to MySQL server during query
# Kill and restart
UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f,
k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f,
v=@f,w=@f,x=@b,y=@f,z=@f,

View File

@@ -1,4 +1,3 @@
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
@@ -259,7 +258,7 @@ UPDATE t2 SET kc=@i,lc=@i,mc=@i,nc=@i,oc=@i,pc=@i;
UPDATE t2 SET qc=@i,rc=@i,sc=@i,tc=@i,uc=@i;
UPDATE t2 SET vc=@i,wc=@i,xc=@i,yc=@i,zc=@i;
COMMIT;
SET DEBUG_DBUG='+d,crash_commit_before';
BEGIN;
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c,
v=@c,w=@c,x=@c,y=@c,z=@c,
@@ -272,7 +271,7 @@ vb=@c,wb=@c,xb=@c,yb=@c,zb=@c,
ac=@c,bc=@c,cc=@c,dc=@c,ec=@c,fc=@c,gc=@c,hc=@c,ic=@c,jc=@c,
kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c,
vc=@c,wc=@c,xc=@c,yc=@c,zc=@c;
ERROR HY000: Lost connection to MySQL server during query
# Kill and restart
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e,
k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e,
v=@e,w=@e,x=@e,y=@e,z=@e,

View File

@@ -0,0 +1,28 @@
CREATE TABLE t1 (
t1_int INT,
t1_time TIME
) ENGINE=innodb;
CREATE TABLE t2 (
t2_int int PRIMARY KEY,
t2_int2 INT
) ENGINE=INNODB;
INSERT IGNORE INTO t2 VALUES ();
Warnings:
Warning 1364 Field 't2_int' doesn't have a default value
INSERT INTO t1 VALUES ();
SELECT *
FROM t1 AS t1a
WHERE NOT EXISTS
(SELECT *
FROM t1 AS t1b
WHERE t1b.t1_int NOT IN
(SELECT t2.t2_int
FROM t2
WHERE t1b.t1_time LIKE t1b.t1_int
OR t1b.t1_time <> t2.t2_int2
AND 6=7
)
)
;
t1_int t1_time
DROP TABLE t1,t2;

View File

@@ -0,0 +1,28 @@
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
CREATE TABLE t2 (i INT) ENGINE=InnoDB;
CREATE OR REPLACE TRIGGER tr1
AFTER UPDATE ON t2
FOR EACH ROW
INSERT INTO tlog (i) VALUES (1);
INSERT IGNORE INTO t2 VALUES (1);
CREATE TRIGGER IF NOT EXISTS tr2
BEFORE INSERT ON t2
FOR EACH ROW
INSERT INTO tlog (i) VALUES (2);
START TRANSACTION;
INSERT INTO t1 VALUES (1);
UPDATE t2 SET i = 3;
ERROR 42S02: Table 'test.tlog' doesn't exist
INSERT INTO t1 VALUES (2);
INSERT INTO t2 VALUES (4);
ERROR 42S02: Table 'test.tlog' doesn't exist
UPDATE t1 SET i = 4 LIMIT 1;
COMMIT;
SELECT * FROM t1;
i
4
2
SELECT * FROM t2;
i
1
DROP TABLE t1,t2;

View File

@@ -1,6 +1,5 @@
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/not_windows.inc
--disable_query_log
CALL mtr.add_suppression(".*Failed to set O_DIRECT on file.*");

View File

@@ -1,14 +1,7 @@
--source include/have_innodb.inc
--source include/have_innodb_32k.inc
--source include/have_debug.inc
# Valgrind would complain about memory leaks when we crash on purpose.
--source include/not_valgrind.inc
# Embedded server does not support crashing
# Embedded server does not support restarting
--source include/not_embedded.inc
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
let $MYSQLD_DATADIR= `select @@datadir`;
@@ -148,15 +141,9 @@ COMMIT;
INSERT INTO t1 SELECT * from t2;
SET DEBUG_DBUG='+d,crash_commit_before';
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
BEGIN;
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e;
# Write file to make mysql-test-run.pl restart the server
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
--source include/kill_and_restart_mysqld.inc
UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f,
k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f,

View File

@@ -1,14 +1,7 @@
--source include/have_innodb.inc
--source include/have_innodb_64k.inc
--source include/have_debug.inc
# Valgrind would complain about memory leaks when we crash on purpose.
--source include/not_valgrind.inc
# Embedded server does not support crashing
# Embedded server does not support restarting
--source include/not_embedded.inc
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
let $MYSQLD_DATADIR= `select @@datadir`;
@@ -293,9 +286,7 @@ UPDATE t2 SET vc=@i,wc=@i,xc=@i,yc=@i,zc=@i;
COMMIT;
SET DEBUG_DBUG='+d,crash_commit_before';
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
BEGIN;
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c,
v=@c,w=@c,x=@c,y=@c,z=@c,
@@ -308,11 +299,7 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
ac=@c,bc=@c,cc=@c,dc=@c,ec=@c,fc=@c,gc=@c,hc=@c,ic=@c,jc=@c,
kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c,
vc=@c,wc=@c,xc=@c,yc=@c,zc=@c;
# Write file to make mysql-test-run.pl restart the server
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
--source include/kill_and_restart_mysqld.inc
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e,
k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e,

View File

@@ -1,13 +1,9 @@
# Test for bug #12400341: INNODB CAN LEAVE ORPHAN IBD FILES AROUND
-- source include/have_debug.inc
-- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
if (`select count(*)=0 from information_schema.global_variables where variable_name = 'INNODB_TRX_RSEG_N_SLOTS_DEBUG'`)
{
--skip Test requires InnoDB built with UNIV_DEBUG definition.
}
# Don't test under valgrind, undo slots of the previous test might exist still
# and cause unstable result.
--source include/not_valgrind.inc

View File

@@ -3,11 +3,6 @@
-- source include/have_innodb.inc
-- source include/have_debug.inc
if (`select count(*)=0 from information_schema.global_variables where variable_name = 'INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG'`)
{
--skip Test requires InnoDB built with UNIV_DEBUG definition.
}
--disable_query_log
set @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug;
set @old_innodb_undo_logs = @@innodb_undo_logs;

View File

@@ -5,7 +5,7 @@
#
# This is a symbolic test, it would not fail if the bug is present.
# Rather those SQL commands have been used during manual testing under
# UNIV_DEBUG & UNIV_SYNC_DEBUG to test all changed codepaths for locking
# innodb_sync_debug to test all changed codepaths for locking
# correctness.
#

View File

@@ -0,0 +1,32 @@
-- source include/have_innodb.inc
# Bug #59307 uninitialized value in rw_lock_set_writer_id_and_recursion_flag()
# when Valgrind instrumentation (HAVE_VALGRIND) is not enabled
CREATE TABLE t1 (
t1_int INT,
t1_time TIME
) ENGINE=innodb;
CREATE TABLE t2 (
t2_int int PRIMARY KEY,
t2_int2 INT
) ENGINE=INNODB;
INSERT IGNORE INTO t2 VALUES ();
INSERT INTO t1 VALUES ();
SELECT *
FROM t1 AS t1a
WHERE NOT EXISTS
(SELECT *
FROM t1 AS t1b
WHERE t1b.t1_int NOT IN
(SELECT t2.t2_int
FROM t2
WHERE t1b.t1_time LIKE t1b.t1_int
OR t1b.t1_time <> t2.t2_int2
AND 6=7
)
)
;
DROP TABLE t1,t2;

View File

@@ -0,0 +1,31 @@
--source include/have_innodb.inc
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
CREATE TABLE t2 (i INT) ENGINE=InnoDB;
CREATE OR REPLACE TRIGGER tr1
AFTER UPDATE ON t2
FOR EACH ROW
INSERT INTO tlog (i) VALUES (1);
INSERT IGNORE INTO t2 VALUES (1);
CREATE TRIGGER IF NOT EXISTS tr2
BEFORE INSERT ON t2
FOR EACH ROW
INSERT INTO tlog (i) VALUES (2);
START TRANSACTION;
INSERT INTO t1 VALUES (1);
--error ER_NO_SUCH_TABLE
UPDATE t2 SET i = 3;
INSERT INTO t1 VALUES (2);
--error ER_NO_SUCH_TABLE
INSERT INTO t2 VALUES (4);
UPDATE t1 SET i = 4 LIMIT 1;
COMMIT;
SELECT * FROM t1;
SELECT * FROM t2;
DROP TABLE t1,t2;