Skip to content

Commit ae47686

Browse files
committed
Merge branch '5.5' into 10.1
2 parents 8d0dabc + 2536c0b commit ae47686

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3192
-114
lines changed

mysql-test/extra/binlog_tests/drop_temp_table.test

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
--source include/have_innodb.inc
12

23
--disable_warnings
34
DROP DATABASE IF EXISTS `drop-temp+table-test`;
@@ -104,3 +105,72 @@ RESET MASTER;
104105
DROP TABLE t1;
105106

106107
# End of 4.1 tests
108+
109+
110+
--echo #
111+
--echo # BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
112+
--echo # WITH TEMPORARY TABLE -> ERRORS
113+
114+
--echo # Test case for DELETE query.
115+
116+
RESET MASTER;
117+
connect (con1,localhost,root,,);
118+
119+
--echo # Set up.
120+
--connection default
121+
--disable_warnings
122+
SET @save_binlog_format= @@session.binlog_format;
123+
SET @@session.binlog_format=STATEMENT;
124+
let $MYSQLD_DATADIR= `select @@datadir`;
125+
CREATE TABLE t1 (a INT) ENGINE=INNODB;
126+
127+
--connection con1
128+
SET @@session.binlog_format=STATEMENT;
129+
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
130+
131+
--connection default
132+
DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
133+
134+
--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug28642318.sql
135+
136+
--connection default
137+
DROP TABLE t1;
138+
139+
--echo # DELETE query fails with table re-open error without patch.
140+
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug28642318.sql
141+
142+
--echo # Clean up.
143+
--connection con1
144+
DROP TABLE IF EXISTS t1;
145+
146+
--connection default
147+
DROP TABLE IF EXISTS t1;
148+
RESET MASTER;
149+
150+
--echo # Test case for DROP query.
151+
152+
--connection default
153+
CREATE TABLE t1 (a INT) ENGINE=INNODB;
154+
155+
--connection con1
156+
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
157+
158+
--connection default
159+
DROP TABLE t1;
160+
161+
--connection con1
162+
DROP TABLE t1;
163+
164+
--connection default
165+
--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug28642318.sql
166+
167+
--echo # DROP table query fails with unknown table error without patch.
168+
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug28642318.sql
169+
170+
--echo # Clean up
171+
--connection default
172+
SET @@session.binlog_format= @save_binlog_format;
173+
RESET MASTER;
174+
175+
--disconnect con1
176+
--enable_warnings

mysql-test/r/connect_debug.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ set global debug_dbug='+d,auth_disconnect';
33
create user 'bad' identified by 'worse';
44
set global debug_dbug=@old_dbug;
55
drop user bad;
6+
set global debug_dbug='+d,auth_invalid_plugin';
7+
create user 'bad' identified by 'worse';
8+
ERROR 2059 (HY000): Authentication plugin 'foo/bar' cannot be loaded: invalid plugin name
9+
set global debug_dbug=@old_dbug;
10+
drop user bad;

mysql-test/r/derived.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,17 @@ select x.id, message from (select id from t1) x left join
601601
(select id, 1 as message from t2) y on x.id=y.id
602602
where coalesce(message,0) <> 0;
603603
id message
604+
explain extended
605+
select x.id, message from (select id from t1) x left join
606+
(select id, 1 as message from t2) y on x.id=y.id
607+
where message <> 0;
608+
id select_type table type possible_keys key key_len ref rows filtered Extra
609+
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 100.00
610+
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
611+
3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
612+
2 DERIVED t1 ALL NULL NULL NULL NULL 3 100.00
613+
Warnings:
614+
Note 1003 select `x`.`id` AS `id`,`y`.`message` AS `message` from (select `test`.`t1`.`id` AS `id` from `test`.`t1`) `x` join (select `test`.`t2`.`id` AS `id`,1 AS `message` from `test`.`t2`) `y` where ((`y`.`id` = `x`.`id`) and (`y`.`message` <> 0))
604615
drop table t1,t2;
605616
#
606617
# MDEV-7827: Assertion `!table || (!table->read_set ||

mysql-test/r/derived_view.result

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
12981298
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where
12991299
Warnings:
13001300
Note 1276 Field or reference 't.a' of SELECT #3 was resolved in SELECT #1
1301-
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <in_optimizer>(1,<expr_cache><`test`.`t1`.`a`>(exists(select 28 from `test`.`t3` where ('j' < `test`.`t1`.`a`))))
1301+
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <in_optimizer>(1,<expr_cache><`test`.`t1`.`a`>(exists(select 28 from `test`.`t3` where ('j' < `test`.`t1`.`a`) limit 1)))
13021302
SELECT * FROM (SELECT * FROM t1) AS t
13031303
WHERE EXISTS (SELECT t2.a FROM t3 RIGHT JOIN t2 ON (t3.a = t2.a)
13041304
WHERE t2.b < t.a);
@@ -3052,3 +3052,60 @@ id select_type table type possible_keys key key_len ref rows Extra
30523052
7 DERIVED p9 ALL NULL NULL NULL NULL 550 Using where; Using join buffer (incremental, BNL join)
30533053
7 DERIVED p10 ALL NULL NULL NULL NULL 550 Using where; Using join buffer (incremental, BNL join)
30543054
DROP TABLE t1, t2;
3055+
#
3056+
# MDEV-19778: equality condition for mergeable view returning constants
3057+
# in its columns and used as inner table of outer join
3058+
#
3059+
create table t1 (pk int, a int);
3060+
insert into t1 values (1,7), (2,3), (3,2), (4,3);
3061+
create table t2 (b int);
3062+
insert into t2 values (5), (1), (NULL), (3);
3063+
create table t3 (c int);
3064+
insert into t3 values (1), (8);
3065+
create view v1 as
3066+
select 3 as d, t2.b from t2;
3067+
select * from t1 left join v1 on t1.pk <= 2 where t1.a=v1.d;
3068+
pk a d b
3069+
2 3 3 5
3070+
2 3 3 1
3071+
2 3 3 NULL
3072+
2 3 3 3
3073+
explain extended select * from t1 left join v1 on t1.pk <= 2 where t1.a=v1.d;
3074+
id select_type table type possible_keys key key_len ref rows filtered Extra
3075+
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using where
3076+
1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using join buffer (flat, BNL join)
3077+
Warnings:
3078+
Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`a` AS `a`,3 AS `d`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` = 3) and (`test`.`t1`.`pk` <= 2))
3079+
select * from t1 left join (select 3 as d, t2.b from t2) dt on t1.pk <= 2
3080+
where t1.a=dt.d;
3081+
pk a d b
3082+
2 3 3 5
3083+
2 3 3 1
3084+
2 3 3 NULL
3085+
2 3 3 3
3086+
explain extended select * from t1 left join (select 3 as d, t2.b from t2) dt on t1.pk <= 2
3087+
where t1.a=dt.d;
3088+
id select_type table type possible_keys key key_len ref rows filtered Extra
3089+
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using where
3090+
1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using join buffer (flat, BNL join)
3091+
Warnings:
3092+
Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`a` AS `a`,3 AS `d`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` = 3) and (`test`.`t1`.`pk` <= 2))
3093+
select * from t1 left join (v1,t3) on t1.pk <= 2 where t1.a=v1.d;
3094+
pk a d b c
3095+
2 3 3 5 1
3096+
2 3 3 5 8
3097+
2 3 3 1 1
3098+
2 3 3 1 8
3099+
2 3 3 NULL 1
3100+
2 3 3 NULL 8
3101+
2 3 3 3 1
3102+
2 3 3 3 8
3103+
explain extended select * from t1 left join (v1,t3) on t1.pk <= 2 where t1.a=v1.d;
3104+
id select_type table type possible_keys key key_len ref rows filtered Extra
3105+
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
3106+
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
3107+
1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using join buffer (incremental, BNL join)
3108+
Warnings:
3109+
Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`a` AS `a`,3 AS `d`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`c` AS `c` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t1`.`a` = 3) and (`test`.`t1`.`pk` <= 2))
3110+
drop view v1;
3111+
drop table t1,t2,t3;

mysql-test/r/func_group.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,7 @@ NULL
19811981
Warnings:
19821982
Warning 1292 Truncated incorrect DOUBLE value: 'j'
19831983
Warning 1292 Truncated incorrect DOUBLE value: 'j'
1984+
Warning 1292 Truncated incorrect DOUBLE value: 'j'
19841985

19851986
EXPLAIN
19861987
SELECT MIN(t2.pk)
@@ -1995,6 +1996,7 @@ id select_type table type possible_keys key key_len ref rows Extra
19951996
Warnings:
19961997
Warning 1292 Truncated incorrect DOUBLE value: 'j'
19971998
Warning 1292 Truncated incorrect DOUBLE value: 'j'
1999+
Warning 1292 Truncated incorrect DOUBLE value: 'j'
19982000

19992001
#
20002002
# 2) Test that subquery materialization is setup for query with

mysql-test/r/information_schema_parameters.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,15 +392,15 @@ SPECIFIC_CATALOG SPECIFIC_SCHEMA SPECIFIC_NAME ORDINAL_POSITION PARAMETER_MODE P
392392
DROP DATABASE IF EXISTS i_s_parameters_test;
393393
CREATE DATABASE i_s_parameters_test;
394394
USE i_s_parameters_test;
395-
CREATE PROCEDURE testproc (OUT param1 INT)
395+
CREATE PROCEDURE testproc (IN param1 INT)
396396
BEGIN
397397
SELECT 2+2 as param1;
398398
END;
399399
//
400400
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
401401
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'testproc';
402402
SPECIFIC_CATALOG SPECIFIC_SCHEMA SPECIFIC_NAME ORDINAL_POSITION PARAMETER_MODE PARAMETER_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_TYPE
403-
def i_s_parameters_test testproc 1 OUT param1 int NULL NULL 10 0 NULL NULL NULL int(11) PROCEDURE
403+
def i_s_parameters_test testproc 1 IN param1 int NULL NULL 10 0 NULL NULL NULL int(11) PROCEDURE
404404
# ========== parameters.5 ==========
405405
DROP DATABASE IF EXISTS i_s_parameters_test;
406406
CREATE DATABASE i_s_parameters_test;

0 commit comments

Comments
 (0)