mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
5.5 merge
This commit is contained in:
13
mysql-test/include/have_unix_socket.inc
Normal file
13
mysql-test/include/have_unix_socket.inc
Normal file
@ -0,0 +1,13 @@
|
||||
--source include/not_embedded.inc
|
||||
|
||||
if (!$AUTH_SOCKET_SO) {
|
||||
skip No unix_socket plugin;
|
||||
}
|
||||
|
||||
if (!$USER) {
|
||||
skip USER variable is undefined;
|
||||
}
|
||||
|
||||
if (`SELECT count(*) <> 0 FROM mysql.user WHERE user = '$USER'`) {
|
||||
skip \$USER=$USER which exists in mysql.user;
|
||||
}
|
@ -740,7 +740,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` varbinary(10) NOT NULL DEFAULT ''
|
||||
`c1` varbinary(10) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 as select concat(connection_id()) as c1;
|
||||
|
@ -1132,7 +1132,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` varchar(10) CHARACTER SET cp1251 NOT NULL DEFAULT ''
|
||||
`c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 as select concat(connection_id()) as c1;
|
||||
|
@ -1212,7 +1212,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` varchar(10) NOT NULL DEFAULT ''
|
||||
`c1` varchar(10) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 as select concat(connection_id()) as c1;
|
||||
|
@ -2212,7 +2212,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT ''
|
||||
`c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 as select concat(connection_id()) as c1;
|
||||
|
@ -3089,7 +3089,7 @@ create table t1 as select concat(uncompressed_length('')) as c1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT ''
|
||||
`c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 as select concat(connection_id()) as c1;
|
||||
|
@ -2366,6 +2366,46 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
3 DEPENDENT SUBQUERY pi ref gallery_id gallery_id 4 test.gal.id 4 Using temporary; Using filesort
|
||||
drop table galleries, pictures;
|
||||
#
|
||||
# MDEV-5740: Assertion
|
||||
#`!derived->first_select()->exclude_from_table_unique_test ||
|
||||
#derived->outer_select()-> exclude_from_table_unique_test'
|
||||
#failed on 2nd execution of PS with derived_merge
|
||||
#
|
||||
set @save_optimizer_switch5740=@@optimizer_switch;
|
||||
SET optimizer_switch = 'derived_merge=on';
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (b INT);
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
PREPARE stmt FROM '
|
||||
INSERT INTO t1 SELECT * FROM t2 UNION SELECT * FROM (SELECT * FROM t1) AS sq
|
||||
';
|
||||
EXECUTE stmt;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
EXECUTE stmt;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
deallocate prepare stmt;
|
||||
drop table t1,t2;
|
||||
set optimizer_switch=@save_optimizer_switch5740;
|
||||
#
|
||||
# end of 5.3 tests
|
||||
#
|
||||
set optimizer_switch=@exit_optimizer_switch;
|
||||
|
12
mysql-test/r/failed_auth_unixsocket.result
Normal file
12
mysql-test/r/failed_auth_unixsocket.result
Normal file
@ -0,0 +1,12 @@
|
||||
update mysql.user set plugin='unix_socket';
|
||||
flush privileges;
|
||||
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
|
||||
ERROR HY000: Plugin 'unix_socket' is not loaded
|
||||
ERROR HY000: Plugin 'unix_socket' is not loaded
|
||||
install plugin unix_socket soname 'auth_socket.so';
|
||||
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
|
||||
ERROR 28000: Access denied for user 'USER'@'localhost'
|
||||
ERROR 28000: Access denied for user 'USER'@'localhost'
|
||||
update mysql.user set plugin='';
|
||||
flush privileges;
|
||||
uninstall plugin unix_socket;
|
@ -127,3 +127,23 @@ NULL 825307441
|
||||
EXPLAIN EXTENDED SELECT * FROM (SELECT UNCOMPRESSED_LENGTH(c1) FROM t1) AS s;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Start of 5.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-5783 Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX(UNCOMPRESSED_LENGTH(pk))
|
||||
#
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SELECT UNCOMPRESSED_LENGTH(pk) FROM t1;
|
||||
UNCOMPRESSED_LENGTH(pk)
|
||||
NULL
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1259 ZLIB: Input data corrupted
|
||||
Warning 1259 ZLIB: Input data corrupted
|
||||
SELECT * FROM t1 ORDER BY HEX(UNCOMPRESSED_LENGTH(pk));
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 5.3 tests
|
||||
#
|
||||
|
@ -272,6 +272,22 @@ SELECT NAME_CONST('a', -(1)) OR 1;
|
||||
NAME_CONST('a', -(1)) OR 1
|
||||
1
|
||||
#
|
||||
#MDEV-5446: Assertion `!table || (!table->read_set ||
|
||||
#bitmap_is_set(table->read_set, field_index))' fails on
|
||||
#EXPLAIN EXTENDED with VALUES function
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,10);
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
EXPLAIN EXTENDED SELECT VALUES(b) FROM v1;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select values(10) AS `VALUES(b)` from dual
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
End of 5.3 tests
|
||||
#
|
||||
# Bug #52165: Assertion failed: file .\dtoa.c, line 465
|
||||
#
|
||||
CREATE TABLE t1 (a SET('a'), b INT);
|
||||
|
2
mysql-test/r/locked_temporary-5955.result
Normal file
2
mysql-test/r/locked_temporary-5955.result
Normal file
@ -0,0 +1,2 @@
|
||||
CREATE TEMPORARY TABLE tmp (i INT) ENGINE=InnoDB;
|
||||
LOCK TABLES tmp AS p WRITE;
|
@ -2535,45 +2535,6 @@ i
|
||||
4
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-5177: ha_partition and innodb index intersection produce fewer rows (MySQL Bug#70703)
|
||||
#
|
||||
create table t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
pk int not null,
|
||||
primary key (pk),
|
||||
key(a),
|
||||
key(b)
|
||||
) partition by hash(pk) partitions 10;
|
||||
insert into t1 values (1,2,4);
|
||||
insert into t1 values (1,0,17);
|
||||
insert into t1 values (1,2,25);
|
||||
insert into t1 values (10,20,122);
|
||||
insert into t1 values (10,20,123);
|
||||
create table t2 (a int);
|
||||
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
insert into t1 select 1,2, 200 + A.a + 10*B.a + 100*C.a from t2 A, t2 B, t2 C;
|
||||
insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a,
|
||||
10+A.a + 10*B.a + 100*C.a + 1000*D.a,
|
||||
2000 + A.a + 10*B.a + 100*C.a + 1000*D.a
|
||||
from t2 A, t2 B, t2 C ,t2 D;
|
||||
explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref PRIMARY,a,b b 4 const 982 Using where
|
||||
create temporary table t3 as
|
||||
select * from t1 where a=1 and b=2 and pk between 1 and 999 ;
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
802
|
||||
drop table t3;
|
||||
create temporary table t3 as
|
||||
select * from t1 ignore index(a,b) where a=1 and b=2 and pk between 1 and 999 ;
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
802
|
||||
drop table t3;
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-5555: Incorrect index_merge on BTREE indices
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
|
@ -654,4 +654,43 @@ col1 col2 col3
|
||||
1 2 2013-03-11 16:33:04
|
||||
1 2 2013-03-11 16:33:24
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-5177: ha_partition and innodb index intersection produce fewer rows (MySQL Bug#70703)
|
||||
#
|
||||
create table t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
pk int not null,
|
||||
primary key (pk),
|
||||
key(a),
|
||||
key(b)
|
||||
) engine=innodb partition by hash(pk) partitions 10;
|
||||
insert into t1 values (1,2,4);
|
||||
insert into t1 values (1,0,17);
|
||||
insert into t1 values (1,2,25);
|
||||
insert into t1 values (10,20,122);
|
||||
insert into t1 values (10,20,123);
|
||||
create table t2 (a int);
|
||||
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
insert into t1 select 1,2, 200 + A.a + 10*B.a + 100*C.a from t2 A, t2 B, t2 C;
|
||||
insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a,
|
||||
10+A.a + 10*B.a + 100*C.a + 1000*D.a,
|
||||
2000 + A.a + 10*B.a + 100*C.a + 1000*D.a
|
||||
from t2 A, t2 B, t2 C ,t2 D;
|
||||
explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge PRIMARY,a,b b,a 4,4 NULL # Using intersect(b,a); Using where; Using index
|
||||
create temporary table t3 as
|
||||
select * from t1 where a=1 and b=2 and pk between 1 and 999 ;
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
802
|
||||
drop table t3;
|
||||
create temporary table t3 as
|
||||
select * from t1 ignore index(a,b) where a=1 and b=2 and pk between 1 and 999 ;
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
802
|
||||
drop table t3;
|
||||
drop table t1,t2;
|
||||
set global default_storage_engine=default;
|
||||
|
@ -734,8 +734,8 @@ a b
|
||||
7 1
|
||||
35 2
|
||||
3 3
|
||||
2 4
|
||||
30 4
|
||||
2 4
|
||||
4 5
|
||||
6 6
|
||||
select * from t1 force index (b) where b < 10 ORDER BY b;
|
||||
@ -744,16 +744,16 @@ a b
|
||||
7 1
|
||||
35 2
|
||||
3 3
|
||||
2 4
|
||||
30 4
|
||||
2 4
|
||||
4 5
|
||||
6 6
|
||||
select * from t1 force index (b) where b < 10 ORDER BY b DESC;
|
||||
a b
|
||||
6 6
|
||||
4 5
|
||||
30 4
|
||||
2 4
|
||||
30 4
|
||||
3 3
|
||||
35 2
|
||||
7 1
|
||||
|
@ -2331,6 +2331,28 @@ id a2 a3 id a2 a3
|
||||
DROP VIEW v2;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-5686: degenerate disjunct in NOT IN subquery
|
||||
#
|
||||
CREATE TABLE t1 (a int, b int, c varchar(3)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,1,'CAN'),(2,2,'AUS');
|
||||
CREATE TABLE t2 (f int) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (3);
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t2
|
||||
WHERE f NOT IN (SELECT b FROM t1
|
||||
WHERE 0 OR (c IN ('USA') OR c NOT IN ('USA')) AND a = b);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t2 system NULL NULL NULL NULL 1 100.00
|
||||
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select 3 AS `f` from dual where (not(<expr_cache><3>(<in_optimizer>(3,<exists>(select `test`.`t1`.`b` from `test`.`t1` where (((`test`.`t1`.`c` = 'USA') or (`test`.`t1`.`c` <> 'USA')) and trigcond(((<cache>(3) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`))) and (`test`.`t1`.`b` = `test`.`t1`.`a`)) having trigcond(<is_not_null_test>(`test`.`t1`.`b`)))))))
|
||||
SELECT * FROM t2
|
||||
WHERE f NOT IN (SELECT b FROM t1
|
||||
WHERE 0 OR (c IN ('USA') OR c NOT IN ('USA')) AND a = b);
|
||||
f
|
||||
3
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT
|
||||
#
|
||||
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
|
||||
|
@ -2055,6 +2055,20 @@ EXECUTE stmt;
|
||||
a
|
||||
DROP TABLE t1, t2;
|
||||
DROP VIEW v2;
|
||||
#
|
||||
# MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
|
||||
#
|
||||
SET @tmp_mdev5811= @@big_tables;
|
||||
SET big_tables = ON;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (b INT);
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
SELECT * FROM t1 AS t1_1, t1 AS t1_2
|
||||
WHERE ( t1_1.a, t1_2.a ) IN ( SELECT MAX(b), MIN(b) FROM t2 );
|
||||
a a
|
||||
DROP TABLE t1,t2;
|
||||
SET big_tables=@tmp_mdev5811;
|
||||
# End of 5.3 tests
|
||||
#
|
||||
# MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries
|
||||
|
@ -2095,6 +2095,20 @@ EXECUTE stmt;
|
||||
a
|
||||
DROP TABLE t1, t2;
|
||||
DROP VIEW v2;
|
||||
#
|
||||
# MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
|
||||
#
|
||||
SET @tmp_mdev5811= @@big_tables;
|
||||
SET big_tables = ON;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (b INT);
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
SELECT * FROM t1 AS t1_1, t1 AS t1_2
|
||||
WHERE ( t1_1.a, t1_2.a ) IN ( SELECT MAX(b), MIN(b) FROM t2 );
|
||||
a a
|
||||
DROP TABLE t1,t2;
|
||||
SET big_tables=@tmp_mdev5811;
|
||||
# End of 5.3 tests
|
||||
#
|
||||
# MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries
|
||||
|
@ -5000,6 +5000,22 @@ v1_field1
|
||||
deallocate prepare my_stmt;
|
||||
DROP VIEW v1,v2;
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
#
|
||||
#MDEV-5717: Server crash with insert statement containing DEFAULT into
|
||||
#view
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`test` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
CREATE VIEW v1 AS (select t1.id AS id, t1.test AS test from t1);
|
||||
INSERT INTO v1 SET test = DEFAULT;
|
||||
select * from v1;
|
||||
id test
|
||||
1 0
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.3 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
@ -758,6 +758,14 @@ SELECT * from t1;
|
||||
id color ts
|
||||
7 GREEN 2
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (id INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET @@max_heap_table_size = 1024*1024*1024*20;
|
||||
CREATE TEMPORARY TABLE tmp ENGINE=MEMORY
|
||||
SELECT id FROM t1;
|
||||
DROP TEMPORARY TABLE tmp;
|
||||
drop table t1;
|
||||
#
|
||||
# BUG#11825482: Broken key length calculation for btree index
|
||||
#
|
||||
|
@ -510,6 +510,22 @@ DELETE FROM t1 WHERE ts = 1 AND color = 'GREEN';
|
||||
SELECT * from t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
#
|
||||
# MDEV-5905 Creating tmp. memory table kills the server
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (id INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
|
||||
SET @@max_heap_table_size = 1024*1024*1024*20;
|
||||
|
||||
CREATE TEMPORARY TABLE tmp ENGINE=MEMORY
|
||||
SELECT id FROM t1;
|
||||
DROP TEMPORARY TABLE tmp;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#11825482: Broken key length calculation for btree index
|
||||
--echo #
|
||||
|
@ -14,6 +14,7 @@ set global server_audit_logging=on;
|
||||
connect (con1,localhost,root,,mysql);
|
||||
connection default;
|
||||
disconnect con1;
|
||||
--sleep 2
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
--error ER_ACCESS_DENIED_ERROR
|
||||
connect (con1,localhost,no_such_user,,mysql);
|
||||
|
@ -1,20 +1,4 @@
|
||||
--source include/not_embedded.inc
|
||||
# If we run this as root, $USER gets authenticated as the `root' user, and we
|
||||
# get .result differences from CURRENT_USER().
|
||||
--source include/not_as_root.inc
|
||||
|
||||
# The previous check verifies that the user does not have root permissions.
|
||||
# However in some cases tests are run under a user named 'root',
|
||||
# even although this user does not have real root permissions.
|
||||
# This test should be skipped in this case, since it does not expect
|
||||
# that there are records in mysql.user where user=<username>
|
||||
if ($USER=="root") {
|
||||
skip Cannot be run by user named 'root' even if it does not have all privileges;
|
||||
}
|
||||
|
||||
if (!$AUTH_SOCKET_SO) {
|
||||
skip No auth_socket plugin;
|
||||
}
|
||||
--source include/have_unix_socket.inc
|
||||
|
||||
if (!$USER) {
|
||||
skip USER variable is undefined;
|
||||
|
@ -2,7 +2,13 @@ include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (n int);
|
||||
insert into t1 values(1);
|
||||
show global status like 'com_insert';
|
||||
Variable_name Value
|
||||
Com_insert 1
|
||||
stop slave;
|
||||
show global status like 'com_insert';
|
||||
Variable_name Value
|
||||
Com_insert 1
|
||||
include/wait_for_slave_to_stop.inc
|
||||
start slave;
|
||||
include/wait_for_slave_to_start.inc
|
||||
|
1
mysql-test/suite/rpl/t/rpl_000011-slave.opt
Normal file
1
mysql-test/suite/rpl/t/rpl_000011-slave.opt
Normal file
@ -0,0 +1 @@
|
||||
--verbose=1
|
@ -1,9 +1,17 @@
|
||||
#
|
||||
# Test very simply slave replication (to ensure it works at all)
|
||||
# In addition, test also:
|
||||
# MDEV-5829 STOP SLAVE resets global status variables
|
||||
#
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
create table t1 (n int);
|
||||
insert into t1 values(1);
|
||||
sync_slave_with_master;
|
||||
show global status like 'com_insert';
|
||||
stop slave;
|
||||
show global status like 'com_insert';
|
||||
--source include/wait_for_slave_to_stop.inc
|
||||
start slave;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
|
@ -3,8 +3,8 @@
|
||||
# RBR breaks for CHAR() UTF8 fields > 85 chars
|
||||
#############################################################
|
||||
|
||||
source include/master-slave.inc;
|
||||
source include/have_binlog_format_row.inc;
|
||||
source include/master-slave.inc;
|
||||
|
||||
connection master;
|
||||
CREATE TABLE char128_utf8 (i1 INT NOT NULL, c CHAR(128) CHARACTER SET utf8 NOT NULL, i2 INT NOT NULL);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/master-slave.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
#
|
||||
# BUG#13427949: CHANGE MASTER TO USER='' (EMPTY USER) CAUSES ERRORS ON VALGRING
|
||||
|
@ -8,13 +8,14 @@ call mtr.add_suppression("Unsafe statement written to the binary log using state
|
||||
source include/have_debug.inc;
|
||||
# because of pretend_version_50034_in_binlog the test can't run with checksum
|
||||
source include/have_binlog_checksum_off.inc;
|
||||
source include/master-slave.inc;
|
||||
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
|
||||
|
||||
# Currently only statement-based-specific bugs are here
|
||||
-- source include/have_binlog_format_statement.inc
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
|
||||
|
||||
#
|
||||
# This is to test that slave properly detects if
|
||||
# master may suffer from:
|
||||
|
@ -1,5 +1,5 @@
|
||||
source include/master-slave.inc;
|
||||
source include/have_binlog_format_mixed.inc;
|
||||
source include/master-slave.inc;
|
||||
|
||||
# It is not possible to replicate FOUND_ROWS() using statement-based
|
||||
# replication, but there is a workaround that stores the result of
|
||||
|
@ -1,9 +1,9 @@
|
||||
#
|
||||
# Bug#11760927: 53375: RBR + NO PK => HIGH LOAD ON SLAVE (TABLE SCAN/CPU) => SLAVE FAILURE
|
||||
#
|
||||
--source include/master-slave.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
# SETUP
|
||||
# - setup log_warnings and debug
|
||||
|
@ -1,5 +1,5 @@
|
||||
source include/master-slave.inc;
|
||||
source include/have_binlog_format_mixed.inc;
|
||||
source include/master-slave.inc;
|
||||
|
||||
#
|
||||
# Bug #30244: row_count/found_rows does not replicate well
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- source include/master-slave.inc
|
||||
-- source include/have_binlog_format_row.inc
|
||||
-- source include/have_utf32.inc
|
||||
-- source include/master-slave.inc
|
||||
|
||||
#
|
||||
# BUG#51787 Assertion `(n % 4) == 0' on slave upon INSERT into a table with UTF32
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- source include/master-slave.inc
|
||||
-- source include/have_binlog_format_statement.inc
|
||||
-- source include/master-slave.inc
|
||||
|
||||
#
|
||||
# Bug #51055 Replication failure on duplicate key + traditional SQL mode
|
||||
|
@ -2,9 +2,9 @@
|
||||
# Please, check extra/rpl_tests/rpl_stop_middle_group.test.
|
||||
###################################################################################
|
||||
-- source include/have_debug.inc
|
||||
-- source include/master-slave.inc
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_binlog_format_statement.inc
|
||||
-- source include/master-slave.inc
|
||||
|
||||
SET @@session.binlog_direct_non_transactional_updates= FALSE;
|
||||
-- source extra/rpl_tests/rpl_stop_middle_group.test
|
||||
|
@ -5,8 +5,8 @@
|
||||
# does not exist' base on myisam engine.
|
||||
#
|
||||
|
||||
source include/master-slave.inc;
|
||||
source include/have_binlog_format_row.inc;
|
||||
source include/master-slave.inc;
|
||||
|
||||
LET $ENGINE_TYPE= MyISAM;
|
||||
source extra/rpl_tests/rpl_tmp_table_and_DDL.test;
|
||||
|
@ -1703,6 +1703,33 @@ ORDER BY gallery_name ASC
|
||||
|
||||
drop table galleries, pictures;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5740: Assertion
|
||||
--echo #`!derived->first_select()->exclude_from_table_unique_test ||
|
||||
--echo #derived->outer_select()-> exclude_from_table_unique_test'
|
||||
--echo #failed on 2nd execution of PS with derived_merge
|
||||
--echo #
|
||||
|
||||
set @save_optimizer_switch5740=@@optimizer_switch;
|
||||
SET optimizer_switch = 'derived_merge=on';
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (b INT);
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
|
||||
PREPARE stmt FROM '
|
||||
INSERT INTO t1 SELECT * FROM t2 UNION SELECT * FROM (SELECT * FROM t1) AS sq
|
||||
';
|
||||
EXECUTE stmt;
|
||||
select * from t1;
|
||||
EXECUTE stmt;
|
||||
select * from t1;
|
||||
deallocate prepare stmt;
|
||||
|
||||
drop table t1,t2;
|
||||
set optimizer_switch=@save_optimizer_switch5740;
|
||||
|
||||
--echo #
|
||||
--echo # end of 5.3 tests
|
||||
--echo #
|
||||
|
30
mysql-test/t/failed_auth_unixsocket.test
Normal file
30
mysql-test/t/failed_auth_unixsocket.test
Normal file
@ -0,0 +1,30 @@
|
||||
--source include/have_unix_socket.inc
|
||||
|
||||
#
|
||||
# MDEV-3909 remote user enumeration
|
||||
# unix_socket tests
|
||||
#
|
||||
update mysql.user set plugin='unix_socket';
|
||||
flush privileges;
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT $USER USER
|
||||
--error ER_PLUGIN_IS_NOT_LOADED
|
||||
connect (fail,localhost,$USER);
|
||||
|
||||
--error ER_PLUGIN_IS_NOT_LOADED
|
||||
change_user $USER;
|
||||
|
||||
eval install plugin unix_socket soname '$AUTH_SOCKET_SO';
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT $USER USER
|
||||
--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR
|
||||
connect (fail,localhost,$USER);
|
||||
|
||||
--replace_result $USER USER
|
||||
--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR
|
||||
change_user $USER;
|
||||
|
||||
update mysql.user set plugin='';
|
||||
flush privileges;
|
||||
uninstall plugin unix_socket;
|
||||
|
@ -115,3 +115,24 @@ DROP TABLE t1;
|
||||
set @@global.max_allowed_packet=default;
|
||||
--enable_result_log
|
||||
--enable_query_log
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 5.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5783 Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX(UNCOMPRESSED_LENGTH(pk))
|
||||
--echo #
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SELECT UNCOMPRESSED_LENGTH(pk) FROM t1;
|
||||
# ORDER is not strict, so disable results
|
||||
--disable_result_log
|
||||
SELECT * FROM t1 ORDER BY HEX(UNCOMPRESSED_LENGTH(pk));
|
||||
--enable_result_log
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.3 tests
|
||||
--echo #
|
||||
|
@ -308,6 +308,22 @@ SELECT NAME_CONST('a', -(1 AND 2)) AND 1;
|
||||
SELECT NAME_CONST('a', -(1)) OR 1;
|
||||
|
||||
--echo #
|
||||
--echo #MDEV-5446: Assertion `!table || (!table->read_set ||
|
||||
--echo #bitmap_is_set(table->read_set, field_index))' fails on
|
||||
--echo #EXPLAIN EXTENDED with VALUES function
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,10);
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
|
||||
EXPLAIN EXTENDED SELECT VALUES(b) FROM v1;
|
||||
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.3 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #52165: Assertion failed: file .\dtoa.c, line 465
|
||||
--echo #
|
||||
|
||||
@ -556,4 +572,3 @@ select release_lock(repeat('a', 193));
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
||||
|
10
mysql-test/t/locked_temporary-5955.test
Normal file
10
mysql-test/t/locked_temporary-5955.test
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# MDEV-5955 Server crashes in handler::ha_external_lock or assertion `m_lock_type == 2' fails in handler::ha_close on disconnect with a locked temporary table
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--connect (con1,localhost,root,,)
|
||||
CREATE TEMPORARY TABLE tmp (i INT) ENGINE=InnoDB;
|
||||
LOCK TABLES tmp AS p WRITE;
|
||||
--disconnect con1
|
||||
|
@ -2530,52 +2530,6 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
|
||||
SELECT * from t1 order by i;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5177: ha_partition and innodb index intersection produce fewer rows (MySQL Bug#70703)
|
||||
--echo #
|
||||
create table t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
pk int not null,
|
||||
primary key (pk),
|
||||
key(a),
|
||||
key(b)
|
||||
) partition by hash(pk) partitions 10;
|
||||
|
||||
insert into t1 values (1,2,4); # both
|
||||
insert into t1 values (1,0,17); # left
|
||||
insert into t1 values (1,2,25); # both
|
||||
|
||||
insert into t1 values (10,20,122);
|
||||
insert into t1 values (10,20,123);
|
||||
|
||||
# Now, fill in some data so that the optimizer choses index_merge
|
||||
create table t2 (a int);
|
||||
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
||||
insert into t1 select 1,2, 200 + A.a + 10*B.a + 100*C.a from t2 A, t2 B, t2 C;
|
||||
|
||||
insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a,
|
||||
10+A.a + 10*B.a + 100*C.a + 1000*D.a,
|
||||
2000 + A.a + 10*B.a + 100*C.a + 1000*D.a
|
||||
from t2 A, t2 B, t2 C ,t2 D;
|
||||
|
||||
# This should show index_merge, using intersect
|
||||
explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ;
|
||||
# 794 rows in output
|
||||
create temporary table t3 as
|
||||
select * from t1 where a=1 and b=2 and pk between 1 and 999 ;
|
||||
select count(*) from t3;
|
||||
drop table t3;
|
||||
|
||||
# 802 rows in output
|
||||
create temporary table t3 as
|
||||
select * from t1 ignore index(a,b) where a=1 and b=2 and pk between 1 and 999 ;
|
||||
select count(*) from t3;
|
||||
drop table t3;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5555: Incorrect index_merge on BTREE indices
|
||||
--echo #
|
||||
|
@ -729,5 +729,52 @@ GROUP BY 1, 2, 3;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5177: ha_partition and innodb index intersection produce fewer rows (MySQL Bug#70703)
|
||||
--echo #
|
||||
create table t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
pk int not null,
|
||||
primary key (pk),
|
||||
key(a),
|
||||
key(b)
|
||||
) engine=innodb partition by hash(pk) partitions 10;
|
||||
|
||||
insert into t1 values (1,2,4); # both
|
||||
insert into t1 values (1,0,17); # left
|
||||
insert into t1 values (1,2,25); # both
|
||||
|
||||
insert into t1 values (10,20,122);
|
||||
insert into t1 values (10,20,123);
|
||||
|
||||
# Now, fill in some data so that the optimizer choses index_merge
|
||||
create table t2 (a int);
|
||||
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
||||
insert into t1 select 1,2, 200 + A.a + 10*B.a + 100*C.a from t2 A, t2 B, t2 C;
|
||||
|
||||
insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a,
|
||||
10+A.a + 10*B.a + 100*C.a + 1000*D.a,
|
||||
2000 + A.a + 10*B.a + 100*C.a + 1000*D.a
|
||||
from t2 A, t2 B, t2 C ,t2 D;
|
||||
|
||||
# This should show index_merge, using intersect
|
||||
--replace_column 9 #
|
||||
explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ;
|
||||
# 794 rows in output
|
||||
create temporary table t3 as
|
||||
select * from t1 where a=1 and b=2 and pk between 1 and 999 ;
|
||||
select count(*) from t3;
|
||||
drop table t3;
|
||||
|
||||
# 802 rows in output
|
||||
create temporary table t3 as
|
||||
select * from t1 ignore index(a,b) where a=1 and b=2 and pk between 1 and 999 ;
|
||||
select count(*) from t3;
|
||||
drop table t3;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
|
||||
set global default_storage_engine=default;
|
||||
|
@ -1885,6 +1885,27 @@ ORDER BY v2.id;
|
||||
DROP VIEW v2;
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5686: degenerate disjunct in NOT IN subquery
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int, b int, c varchar(3)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,1,'CAN'),(2,2,'AUS');
|
||||
|
||||
CREATE TABLE t2 (f int) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (3);
|
||||
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t2
|
||||
WHERE f NOT IN (SELECT b FROM t1
|
||||
WHERE 0 OR (c IN ('USA') OR c NOT IN ('USA')) AND a = b);
|
||||
|
||||
SELECT * FROM t2
|
||||
WHERE f NOT IN (SELECT b FROM t1
|
||||
WHERE 0 OR (c IN ('USA') OR c NOT IN ('USA')) AND a = b);
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT
|
||||
--echo #
|
||||
|
@ -1745,6 +1745,24 @@ EXECUTE stmt;
|
||||
DROP TABLE t1, t2;
|
||||
DROP VIEW v2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
|
||||
--echo #
|
||||
SET @tmp_mdev5811= @@big_tables;
|
||||
SET big_tables = ON;
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
|
||||
CREATE TABLE t2 (b INT);
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
|
||||
SELECT * FROM t1 AS t1_1, t1 AS t1_2
|
||||
WHERE ( t1_1.a, t1_2.a ) IN ( SELECT MAX(b), MIN(b) FROM t2 );
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
SET big_tables=@tmp_mdev5811;
|
||||
|
||||
--echo # End of 5.3 tests
|
||||
|
||||
|
||||
|
@ -4918,6 +4918,25 @@ deallocate prepare my_stmt;
|
||||
DROP VIEW v1,v2;
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
|
||||
--echo #
|
||||
--echo #MDEV-5717: Server crash with insert statement containing DEFAULT into
|
||||
--echo #view
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`test` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
CREATE VIEW v1 AS (select t1.id AS id, t1.test AS test from t1);
|
||||
|
||||
INSERT INTO v1 SET test = DEFAULT;
|
||||
|
||||
select * from v1;
|
||||
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
--echo # -----------------------------------------------------------------
|
||||
--echo # -- End of 5.3 tests.
|
||||
--echo # -----------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user