Skip to content
Permalink
Browse files

Merge branch '10.3' into 10.4

  • Loading branch information...
Oleksandr Byelkin
Oleksandr Byelkin committed Jul 28, 2019
2 parents c0743e4 + 4b5a14d commit 2792c6e7b057b18c19b506f37c35716529f80979
Showing with 3,655 additions and 218 deletions.
  1. +1 −1 libmariadb
  2. +5 −0 mysql-test/main/connect_debug.result
  3. +11 −0 mysql-test/main/connect_debug.test
  4. +11 −0 mysql-test/main/derived.result
  5. +4 −0 mysql-test/main/derived.test
  6. +58 −1 mysql-test/main/derived_view.result
  7. +34 −0 mysql-test/main/derived_view.test
  8. +2 −0 mysql-test/main/func_group.result
  9. +1 −1 mysql-test/main/group_min_max.result
  10. +2 −2 mysql-test/main/information_schema_parameters.result
  11. +1 −1 mysql-test/main/information_schema_parameters.test
  12. +1,384 −0 mysql-test/main/join.result
  13. +404 −0 mysql-test/main/join.test
  14. +1 −1 mysql-test/main/join_outer_innodb.result
  15. +1 −1 mysql-test/main/join_outer_innodb.test
  16. +10 −0 mysql-test/main/plugin.result
  17. +11 −0 mysql-test/main/plugin.test
  18. +4 −0 mysql-test/main/plugin_not_embedded.result
  19. +9 −0 mysql-test/main/plugin_not_embedded.test
  20. +63 −0 mysql-test/main/ps.result
  21. +77 −0 mysql-test/main/ps.test
  22. +64 −0 mysql-test/main/ps_innodb.result
  23. +80 −0 mysql-test/main/ps_innodb.test
  24. +3 −3 mysql-test/main/selectivity.result
  25. +3 −3 mysql-test/main/selectivity_innodb.result
  26. +33 −2 mysql-test/main/subselect.result
  27. +24 −0 mysql-test/main/subselect.test
  28. +2 −3 mysql-test/main/subselect4.result
  29. +2 −0 mysql-test/main/subselect_cache.result
  30. +4 −4 mysql-test/main/subselect_exists2in.result
  31. +1 −1 mysql-test/main/subselect_innodb.result
  32. +1 −1 mysql-test/main/subselect_mat.result
  33. +36 −5 mysql-test/main/subselect_no_exists_to_in.result
  34. +33 −2 mysql-test/main/subselect_no_mat.result
  35. +33 −2 mysql-test/main/subselect_no_opts.result
  36. +33 −2 mysql-test/main/subselect_no_scache.result
  37. +33 −2 mysql-test/main/subselect_no_semijoin.result
  38. +1 −1 mysql-test/main/subselect_sj_mat.result
  39. +15 −0 mysql-test/main/view.result
  40. +20 −0 mysql-test/main/view.test
  41. +5 −5 mysql-test/main/view_alias.result
  42. +70 −0 mysql-test/suite/binlog/include/drop_temp_table.test
  43. +41 −0 mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result
  44. +41 −0 mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
  45. +129 −0 mysql-test/suite/innodb/r/innodb-autoinc.result
  46. +60 −0 mysql-test/suite/innodb/t/innodb-autoinc.test
  47. +0 −1 mysql-test/suite/plugins/disabled.def
  48. +1 −1 plugin/win_auth_client/common.cc
  49. +8 −1 scripts/mysql_install_db.sh
  50. +7 −1 sql-common/client_plugin.c
  51. +8 −5 sql/item.cc
  52. +1 −0 sql/item.h
  53. +1 −0 sql/item_func.cc
  54. +17 −10 sql/item_subselect.cc
  55. +2 −2 sql/item_xmlfunc.cc
  56. +1 −2 sql/item_xmlfunc.h
  57. +1 −0 sql/sql_acl.cc
  58. +2 −1 sql/sql_delete.cc
  59. +5 −1 sql/sql_insert.cc
  60. +15 −3 sql/sql_lex.cc
  61. +13 −23 sql/sql_lex.h
  62. +235 −1 sql/sql_parse.cc
  63. +5 −2 sql/sql_plugin.cc
  64. +8 −1 sql/sql_select.cc
  65. +2 −3 sql/sql_table.cc
  66. +28 −32 sql/sql_yacc.yy
  67. +28 −32 sql/sql_yacc_ora.yy
  68. +24 −0 sql/table.h
  69. +9 −0 storage/connect/CMakeLists.txt
  70. +1 −1 storage/connect/ha_connect.cc
  71. +12 −12 storage/connect/mysql-test/connect/disabled.def
  72. +14 −0 storage/tokudb/PerconaFT/ft/comparator.h
  73. +2 −0 storage/tokudb/PerconaFT/ft/ft-ops.cc
  74. +14 −0 storage/tokudb/PerconaFT/ft/ft-status.cc
  75. +14 −0 storage/tokudb/PerconaFT/ft/ft-status.h
  76. +1 −0 storage/tokudb/PerconaFT/locktree/keyrange.cc
  77. +1 −0 storage/tokudb/PerconaFT/locktree/keyrange.h
  78. +1 −0 storage/tokudb/PerconaFT/locktree/lock_request.cc
  79. +1 −0 storage/tokudb/PerconaFT/locktree/lock_request.h
  80. +1 −0 storage/tokudb/PerconaFT/locktree/locktree.cc
  81. +1 −0 storage/tokudb/PerconaFT/locktree/locktree.h
  82. +1 −0 storage/tokudb/PerconaFT/locktree/manager.cc
  83. +1 −0 storage/tokudb/PerconaFT/locktree/range_buffer.cc
  84. +1 −0 storage/tokudb/PerconaFT/locktree/range_buffer.h
  85. +1 −0 storage/tokudb/PerconaFT/locktree/treenode.cc
  86. +1 −0 storage/tokudb/PerconaFT/locktree/treenode.h
  87. +1 −0 storage/tokudb/PerconaFT/locktree/txnid_set.cc
  88. +1 −0 storage/tokudb/PerconaFT/locktree/txnid_set.h
  89. +1 −0 storage/tokudb/PerconaFT/locktree/wfg.cc
  90. +1 −0 storage/tokudb/PerconaFT/locktree/wfg.h
  91. +23 −8 storage/tokudb/PerconaFT/portability/memory.cc
  92. +14 −0 storage/tokudb/PerconaFT/portability/memory.h
  93. +2 −0 storage/tokudb/PerconaFT/portability/portability.cc
  94. +14 −0 storage/tokudb/PerconaFT/portability/toku_atomic.h
  95. +46 −0 storage/tokudb/PerconaFT/portability/toku_instrumentation.h
  96. +14 −0 storage/tokudb/PerconaFT/portability/toku_portability.h
  97. +14 −0 storage/tokudb/PerconaFT/portability/toku_pthread.cc
  98. +14 −0 storage/tokudb/PerconaFT/portability/toku_pthread.h
  99. +14 −0 storage/tokudb/PerconaFT/portability/toku_race_tools.h
  100. +14 −0 storage/tokudb/PerconaFT/portability/toku_time.cc
  101. +14 −0 storage/tokudb/PerconaFT/portability/toku_time.h
  102. +14 −0 storage/tokudb/PerconaFT/util/dbt.h
  103. +1 −0 storage/tokudb/PerconaFT/util/growable_array.h
  104. +14 −0 storage/tokudb/PerconaFT/util/memarena.cc
  105. +14 −0 storage/tokudb/PerconaFT/util/memarena.h
  106. +1 −0 storage/tokudb/PerconaFT/util/omt.cc
  107. +1 −0 storage/tokudb/PerconaFT/util/omt.h
  108. +14 −0 storage/tokudb/PerconaFT/util/partitioned_counter.cc
  109. +14 −0 storage/tokudb/PerconaFT/util/partitioned_counter.h
  110. +14 −0 storage/tokudb/PerconaFT/util/status.h
  111. +5 −5 storage/tokudb/mysql-test/tokudb/t/change_column_Makefile
  112. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_bin.py
  113. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_bin_rename.py
  114. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_char.py
  115. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_char_binary.py
  116. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_char_charbinary.py
  117. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_char_rename.py
  118. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_int.py
  119. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_int_key.py
  120. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_int_not_supported.py
  121. +1 −1 storage/tokudb/mysql-test/tokudb/t/change_column_int_rename.py
  122. +2 −2 storage/tokudb/mysql-test/tokudb/t/fast_update_Makefile
  123. +0 −1 storage/tokudb/mysql-test/tokudb_parts/t/partition_debug_sync_tokudb-master.opt
  124. +0 −1 storage/tokudb/mysql-test/tokudb_parts/t/partition_debug_tokudb-master.opt
  125. +0 −1 storage/tokudb/mysql-test/tokudb_parts/t/partition_special_tokudb-master.opt
  126. +1 −1 support-files/mysql.server.sh
  127. +1 −2 win/packaging/heidisql.cmake
  128. +12 −8 win/packaging/heidisql.wxi.in
@@ -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;
@@ -1,3 +1,4 @@
source include/not_embedded.inc;
source include/have_debug.inc;
set @old_dbug=@@global.debug_dbug;

@@ -10,3 +11,13 @@ create user 'bad' identified by 'worse';
--exec $MYSQL --default-auth=mysql_old_password --user=bad --password=worse
set global debug_dbug=@old_dbug;
drop user bad;

#
# malicious server, invalid plugin name
#
set global debug_dbug='+d,auth_invalid_plugin';
create user 'bad' identified by 'worse';
--error 1
--exec $MYSQL --default-auth=mysql_old_password --user=bad --password=worse 2>&1
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#1 */ select `x`.`id` AS `id`,`y`.`message` AS `message` from (/* select#2 */ select `test`.`t1`.`id` AS `id` from `test`.`t1`) `x` join (/* select#3 */ 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 ||
@@ -533,6 +533,10 @@ insert into t2 values(4),(5),(6);
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;
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;
drop table t1,t2;

--echo #
@@ -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#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <in_optimizer>(1,<expr_cache><`test`.`t1`.`a`>(exists(/* select#3 */ select 28 from `test`.`t3` where 'j' < `test`.`t1`.`a`)))
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <in_optimizer>(1,<expr_cache><`test`.`t1`.`a`>(exists(/* select#3 */ 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);
@@ -3422,3 +3422,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;
@@ -2236,3 +2236,37 @@ JOIN
) gp_20 ON gp_20.id=t2.id ;

DROP TABLE t1, t2;

--echo #
--echo # MDEV-19778: equality condition for mergeable view returning constants
--echo # in its columns and used as inner table of outer join
--echo #

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;

let $q=
select * from t1 left join v1 on t1.pk <= 2 where t1.a=v1.d;
eval $q;
eval explain extended $q;

let $q=
select * from t1 left join (select 3 as d, t2.b from t2) dt on t1.pk <= 2
where t1.a=dt.d;
eval $q;
eval explain extended $q;

let $q=
select * from t1 left join (v1,t3) on t1.pk <= 2 where t1.a=v1.d;
eval $q;
eval explain extended $q;

drop view v1;
drop table t1,t2,t3;
@@ -1982,6 +1982,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)
@@ -1996,6 +1997,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
@@ -2449,7 +2449,7 @@ EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXISTS
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
2 SUBQUERY t1 range a a 5 NULL 2 Using where; Using index for group-by
2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
id select_type table type possible_keys key key_len ref rows Extra
@@ -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;
@@ -92,7 +92,7 @@ CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test;

delimiter //;
CREATE PROCEDURE testproc (OUT param1 INT)
CREATE PROCEDURE testproc (IN param1 INT)
BEGIN
SELECT 2+2 as param1;
END;

0 comments on commit 2792c6e

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