Skip to content
Permalink
Browse files

Merge branch '10.1' into 10.2

  • Loading branch information...
Oleksandr Byelkin
Oleksandr Byelkin committed Jul 26, 2019
2 parents fc77a66 + 584d213 commit cf8c2a3c3b2eb05df419ce014b98a71b1e75ad6b
Showing with 3,227 additions and 117 deletions.
  1. +1 −1 libmariadb
  2. +70 −0 mysql-test/extra/binlog_tests/drop_temp_table.test
  3. +5 −0 mysql-test/r/connect_debug.result
  4. +11 −0 mysql-test/r/derived.result
  5. +58 −1 mysql-test/r/derived_view.result
  6. +2 −0 mysql-test/r/func_group.result
  7. +2 −2 mysql-test/r/information_schema_parameters.result
  8. +1,384 −0 mysql-test/r/join.result
  9. +1 −1 mysql-test/r/join_outer_innodb.result
  10. +10 −0 mysql-test/r/plugin.result
  11. +63 −0 mysql-test/r/ps.result
  12. +64 −0 mysql-test/r/ps_innodb.result
  13. +3 −3 mysql-test/r/selectivity.result
  14. +3 −3 mysql-test/r/selectivity_innodb.result
  15. +33 −2 mysql-test/r/subselect.result
  16. +2 −0 mysql-test/r/subselect_cache.result
  17. +4 −4 mysql-test/r/subselect_exists2in.result
  18. +1 −1 mysql-test/r/subselect_mat.result
  19. +36 −5 mysql-test/r/subselect_no_exists_to_in.result
  20. +33 −2 mysql-test/r/subselect_no_mat.result
  21. +33 −2 mysql-test/r/subselect_no_opts.result
  22. +33 −2 mysql-test/r/subselect_no_scache.result
  23. +33 −2 mysql-test/r/subselect_no_semijoin.result
  24. +1 −1 mysql-test/r/subselect_sj_mat.result
  25. +15 −0 mysql-test/r/view.result
  26. +5 −5 mysql-test/r/view_alias.result
  27. +41 −0 mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result
  28. +41 −0 mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
  29. +129 −0 mysql-test/suite/innodb/r/innodb-autoinc.result
  30. +60 −0 mysql-test/suite/innodb/t/innodb-autoinc.test
  31. +0 −1 mysql-test/suite/plugins/disabled.def
  32. +11 −0 mysql-test/t/connect_debug.test
  33. +4 −0 mysql-test/t/derived.test
  34. +34 −0 mysql-test/t/derived_view.test
  35. +1 −1 mysql-test/t/information_schema_parameters.test
  36. +404 −0 mysql-test/t/join.test
  37. +1 −1 mysql-test/t/join_outer_innodb.test
  38. +15 −0 mysql-test/t/plugin.test
  39. +77 −0 mysql-test/t/ps.test
  40. +80 −0 mysql-test/t/ps_innodb.test
  41. +24 −0 mysql-test/t/subselect.test
  42. +20 −0 mysql-test/t/view.test
  43. +2 −2 plugin/win_auth_client/common.cc
  44. +8 −1 scripts/mysql_install_db.sh
  45. +7 −1 sql-common/client_plugin.c
  46. +8 −5 sql/item.cc
  47. +1 −0 sql/item.h
  48. +1 −0 sql/item_func.cc
  49. +17 −10 sql/item_subselect.cc
  50. +2 −2 sql/item_xmlfunc.cc
  51. +1 −2 sql/item_xmlfunc.h
  52. +1 −0 sql/sql_acl.cc
  53. +2 −1 sql/sql_delete.cc
  54. +5 −1 sql/sql_insert.cc
  55. +2 −3 sql/sql_lex.cc
  56. +15 −10 sql/sql_lex.h
  57. +235 −0 sql/sql_parse.cc
  58. +5 −2 sql/sql_plugin.cc
  59. +8 −1 sql/sql_select.cc
  60. +2 −3 sql/sql_table.cc
  61. +19 −16 sql/sql_yacc.yy
  62. +24 −0 sql/table.h
  63. +1 −1 support-files/mysql.server.sh
  64. +1 −8 win/packaging/heidisql.cmake
  65. +12 −8 win/packaging/heidisql.wxi.in
@@ -1,3 +1,4 @@
--source include/have_innodb.inc

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

# End of 4.1 tests


--echo #
--echo # BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
--echo # WITH TEMPORARY TABLE -> ERRORS

--echo # Test case for DELETE query.

RESET MASTER;
connect (con1,localhost,root,,);

--echo # Set up.
--connection default
--disable_warnings
SET @save_binlog_format= @@session.binlog_format;
SET @@session.binlog_format=STATEMENT;
let $MYSQLD_DATADIR= `select @@datadir`;
CREATE TABLE t1 (a INT) ENGINE=INNODB;

--connection con1
SET @@session.binlog_format=STATEMENT;
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;

--connection default
DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;

--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug28642318.sql

--connection default
DROP TABLE t1;

--echo # DELETE query fails with table re-open error without patch.
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug28642318.sql

--echo # Clean up.
--connection con1
DROP TABLE IF EXISTS t1;

--connection default
DROP TABLE IF EXISTS t1;
RESET MASTER;

--echo # Test case for DROP query.

--connection default
CREATE TABLE t1 (a INT) ENGINE=INNODB;

--connection con1
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;

--connection default
DROP TABLE t1;

--connection con1
DROP TABLE t1;

--connection default
--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug28642318.sql

--echo # DROP table query fails with unknown table error without patch.
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug28642318.sql

--echo # Clean up
--connection default
SET @@session.binlog_format= @save_binlog_format;
RESET MASTER;

--disconnect con1
--enable_warnings
@@ -3,3 +3,8 @@ set global debug_dbug='+d,auth_disconnect';
create user 'bad' identified by 'worse';
set global debug_dbug=@old_dbug;
drop user bad;
set global debug_dbug='+d,auth_invalid_plugin';
create user 'bad' identified by 'worse';
ERROR 1045 (28000): Plugin foo/bar could not be loaded: invalid plugin name
set global debug_dbug=@old_dbug;
drop user bad;
@@ -606,6 +606,17 @@ select x.id, message from (select id from t1) x left join
(select id, 1 as message from t2) y on x.id=y.id
where coalesce(message,0) <> 0;
id message
explain extended
select x.id, message from (select id from t1) x left join
(select id, 1 as message from t2) y on x.id=y.id
where message <> 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 100.00
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
2 DERIVED t1 ALL NULL NULL NULL NULL 3 100.00
Warnings:
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
drop table t1,t2;
#
# MDEV-7827: Assertion `!table || (!table->read_set ||
@@ -1624,7 +1624,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1276 Field or reference 't.a' of SELECT #3 was resolved in SELECT #1
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`)))
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)))
SELECT * FROM (SELECT * FROM t1) AS t
WHERE EXISTS (SELECT t2.a FROM t3 RIGHT JOIN t2 ON (t3.a = t2.a)
WHERE t2.b < t.a);
@@ -3378,3 +3378,60 @@ id select_type table type possible_keys key key_len ref rows Extra
7 DERIVED p9 ALL NULL NULL NULL NULL 550 Using where; Using join buffer (incremental, BNL join)
7 DERIVED p10 ALL NULL NULL NULL NULL 550 Using where; Using join buffer (incremental, BNL join)
DROP TABLE t1, t2;
#
# MDEV-19778: equality condition for mergeable view returning constants
# in its columns and used as inner table of outer join
#
create table t1 (pk int, a int);
insert into t1 values (1,7), (2,3), (3,2), (4,3);
create table t2 (b int);
insert into t2 values (5), (1), (NULL), (3);
create table t3 (c int);
insert into t3 values (1), (8);
create view v1 as
select 3 as d, t2.b from t2;
select * from t1 left join v1 on t1.pk <= 2 where t1.a=v1.d;
pk a d b
2 3 3 5
2 3 3 1
2 3 3 NULL
2 3 3 3
explain extended select * from t1 left join v1 on t1.pk <= 2 where t1.a=v1.d;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using join buffer (flat, BNL join)
Warnings:
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
select * from t1 left join (select 3 as d, t2.b from t2) dt on t1.pk <= 2
where t1.a=dt.d;
pk a d b
2 3 3 5
2 3 3 1
2 3 3 NULL
2 3 3 3
explain extended select * from t1 left join (select 3 as d, t2.b from t2) dt on t1.pk <= 2
where t1.a=dt.d;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using join buffer (flat, BNL join)
Warnings:
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
select * from t1 left join (v1,t3) on t1.pk <= 2 where t1.a=v1.d;
pk a d b c
2 3 3 5 1
2 3 3 5 8
2 3 3 1 1
2 3 3 1 8
2 3 3 NULL 1
2 3 3 NULL 8
2 3 3 3 1
2 3 3 3 8
explain extended select * from t1 left join (v1,t3) on t1.pk <= 2 where t1.a=v1.d;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using join buffer (incremental, BNL join)
Warnings:
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
drop view v1;
drop table t1,t2,t3;
@@ -1981,6 +1981,7 @@ NULL
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'j'

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

#
# 2) Test that subquery materialization is setup for query with
@@ -424,15 +424,15 @@ SPECIFIC_CATALOG SPECIFIC_SCHEMA SPECIFIC_NAME ORDINAL_POSITION PARAMETER_MODE P
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test;
CREATE PROCEDURE testproc (OUT param1 INT)
CREATE PROCEDURE testproc (IN param1 INT)
BEGIN
SELECT 2+2 as param1;
END;
//
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'testproc';
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
def i_s_parameters_test testproc 1 OUT param1 int NULL NULL 10 0 NULL NULL NULL int(11) PROCEDURE
def i_s_parameters_test testproc 1 IN param1 int NULL NULL 10 0 NULL NULL NULL int(11) PROCEDURE
# ========== parameters.5 ==========
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test;

0 comments on commit cf8c2a3

Please sign in to comment.
You can’t perform that action at this time.