Skip to content

Commit 9258097

Browse files
committed
Merge 10.1 into 10.2
2 parents cdc8deb + dc7c080 commit 9258097

Some content is hidden

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

52 files changed

+1070
-147
lines changed

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ Section: database
571571
Architecture: any
572572
Breaks: mariadb-backup-10.1
573573
Replaces: mariadb-backup-10.1
574-
Depends: mariadb-server-10.2,
574+
Depends: mariadb-client-core-10.2 (= ${binary:Version}),
575575
${misc:Depends},
576576
${shlibs:Depends}
577577
Description: Backup tool for MariaDB server

mysql-test/r/func_isnull.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,25 @@ Note 1003 select `test`.`t2`.`d1` AS `d1`,`test`.`t1`.`d1` AS `d1` from `test`.`
106106
DROP VIEW v1;
107107
DROP TABLE t1,t2;
108108
#
109+
# MDEV-15475: Assertion `!table || (!table->read_set ||
110+
# bitmap_is_set(table->read_set, field_index))'
111+
# failed on EXPLAIN EXTENDED with constant table and view
112+
#
113+
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
114+
CREATE VIEW v1 AS SELECT * FROM t1;
115+
INSERT INTO t1 VALUES (1);
116+
EXPLAIN EXTENDED SELECT ISNULL(pk) FROM v1;
117+
id select_type table type possible_keys key key_len ref rows filtered Extra
118+
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
119+
Warnings:
120+
Note 1003 select /*always not null*/ 1 is null AS `ISNULL(pk)` from dual
121+
EXPLAIN EXTENDED SELECT IFNULL(pk,0) FROM v1;
122+
id select_type table type possible_keys key key_len ref rows filtered Extra
123+
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
124+
Warnings:
125+
Note 1003 select ifnull(1,0) AS `IFNULL(pk,0)` from dual
126+
DROP VIEW v1;
127+
DROP TABLE t1;
128+
#
109129
# End of 5.5 tests
110130
#

mysql-test/r/func_time.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2797,6 +2797,11 @@ SEC_TO_TIME(MAKEDATE(0,RAND(~0)))
27972797
838:59:59
27982798
Warnings:
27992799
Warning 1292 Truncated incorrect time value: '20000101'
2800+
SELECT PERIOD_DIFF(2018, AES_ENCRYPT('Rae Bareli', 'Rae Bareli'));
2801+
PERIOD_DIFF(2018, AES_ENCRYPT('Rae Bareli', 'Rae Bareli'))
2802+
24257
2803+
Warnings:
2804+
Warning 1292 Truncated incorrect INTEGER value: '-3S\xFA\xDE?\x00\x00\xCA\xB3\xEEE\xA4\xD1\xC1\xA8'
28002805
#
28012806
# End of 5.5 tests
28022807
#

mysql-test/r/group_min_max.result

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3893,5 +3893,22 @@ id select_type table type possible_keys key key_len ref rows Extra
38933893
1 SIMPLE t1 index a a 13 NULL 2 Using where; Using index
38943894
drop table t1;
38953895
#
3896+
# MDEV-15433: Optimizer does not use group by optimization with distinct
3897+
#
3898+
CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a INT NOT NULL, KEY(a));
3899+
OPTIMIZE TABLE t1;
3900+
Table Op Msg_type Msg_text
3901+
test.t1 optimize status OK
3902+
EXPLAIN SELECT DISTINCT a FROM t1;
3903+
id select_type table type possible_keys key key_len ref rows Extra
3904+
1 SIMPLE t1 range NULL a 4 NULL 5 Using index for group-by
3905+
SELECT DISTINCT a FROM t1;
3906+
a
3907+
1
3908+
2
3909+
3
3910+
4
3911+
drop table t1;
3912+
#
38963913
# End of 10.1 tests
38973914
#

mysql-test/r/mysql.result

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,6 @@ a
538538
#
539539
# End of 10.1 tests
540540
#
541-
ERROR 1300 (HY000): Invalid utf8 character string: 'test\xF0\x9F\x98\x81 '
542-
ERROR 1300 (HY000): Invalid binary character string: 'test\xF0\x9F\x98\x81 '
543541
ERROR 1300 (HY000) at line 2: Invalid utf8 character string: 'test\xF0\x9F\x98\x81'
544542
set GLOBAL sql_mode=default;
545543

mysql-test/r/mysql_not_windows.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ End of tests
99
2
1010
X
1111
3
12+
ERROR 1300 (HY000): Invalid utf8 character string: 'test\xF0\x9F\x98\x81 '
13+
ERROR 1300 (HY000): Invalid binary character string: 'test\xF0\x9F\x98\x81 '

mysql-test/r/subselect_extra_no_semijoin.result

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,3 +482,25 @@ DROP TABLE t1,t2;
482482
set optimizer_switch= @tmp_subselect_extra_derived;
483483
set optimizer_switch= @subselect_extra_no_sj_tmp;
484484
set @optimizer_switch_for_subselect_extra_test=null;
485+
#
486+
# MDEV-6439: Server crashes in Explain_union::print_explain with explain in slow log, tis620 charset
487+
#
488+
connect con1,localhost,root,,;
489+
SET NAMES tis620;
490+
set @tmp= @@global.slow_query_log;
491+
SET GLOBAL slow_query_log = 1;
492+
SET long_query_time = 0.000001;
493+
SET log_slow_verbosity = 'explain';
494+
CREATE TABLE t1 (a VARCHAR(3)) ENGINE=MyISAM;
495+
SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo');
496+
a
497+
SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' UNION SELECT 'bar' );
498+
ERROR HY000: Illegal mix of collations (tis620_thai_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '<='
499+
create table t2 (b int);
500+
insert into t2 values (1),(2),(3);
501+
SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' FROM t2);
502+
ERROR HY000: Illegal mix of collations (tis620_thai_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '<='
503+
drop table t1,t2;
504+
SET GLOBAL slow_query_log=@tmp;
505+
disconnect con1;
506+
connection default;

mysql-test/r/subselect_mat.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
499499
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
500500
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
501501
Warnings:
502-
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or '1 - 01' is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or '2 - 01' is null) and '1 - 01' is null and '2 - 01' is null)))
502+
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or /*always not null*/ 1 is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or /*always not null*/ 1 is null) and '1 - 01' is null and '2 - 01' is null)))
503503
select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01');
504504
a1 a2
505505
1 - 01 2 - 01
@@ -509,7 +509,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
509509
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
510510
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
511511
Warnings:
512-
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or '1 - 01' is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or '2 - 01' is null) and '1 - 01' is null and '2 - 01' is null)))
512+
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or /*always not null*/ 1 is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or /*always not null*/ 1 is null) and '1 - 01' is null and '2 - 01' is null)))
513513
select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01' from dual);
514514
a1 a2
515515
1 - 01 2 - 01
@@ -1925,7 +1925,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
19251925
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
19261926
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00
19271927
Warnings:
1928-
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (select max(`test`.`t2`.`c`) from `test`.`t2`) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(`<subquery2>`.`MAX(c)` is null) or `<subquery2>`.`MAX(c)` = 7)
1928+
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (select max(`test`.`t2`.`c`) from `test`.`t2`) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(/*always not null*/ 1 is null) or `<subquery2>`.`MAX(c)` = 7)
19291929
SELECT * FROM t1
19301930
WHERE a IN (SELECT MAX(c) FROM t2) AND b=7 AND (a IS NULL OR a=b);
19311931
a b

mysql-test/r/subselect_sj_mat.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
520520
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
521521
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
522522
Warnings:
523-
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or '1 - 01' is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or '2 - 01' is null) and '1 - 01' is null and '2 - 01' is null)))
523+
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or /*always not null*/ 1 is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or /*always not null*/ 1 is null) and '1 - 01' is null and '2 - 01' is null)))
524524
select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01');
525525
a1 a2
526526
1 - 01 2 - 01
@@ -530,7 +530,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
530530
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
531531
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
532532
Warnings:
533-
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or '1 - 01' is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or '2 - 01' is null) and '1 - 01' is null and '2 - 01' is null)))
533+
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or /*always not null*/ 1 is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or /*always not null*/ 1 is null) and '1 - 01' is null and '2 - 01' is null)))
534534
select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01' from dual);
535535
a1 a2
536536
1 - 01 2 - 01
@@ -1963,7 +1963,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
19631963
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
19641964
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00
19651965
Warnings:
1966-
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (select max(`test`.`t2`.`c`) from `test`.`t2`) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(`<subquery2>`.`MAX(c)` is null) or `<subquery2>`.`MAX(c)` = 7)
1966+
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (select max(`test`.`t2`.`c`) from `test`.`t2`) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(/*always not null*/ 1 is null) or `<subquery2>`.`MAX(c)` = 7)
19671967
SELECT * FROM t1
19681968
WHERE a IN (SELECT MAX(c) FROM t2) AND b=7 AND (a IS NULL OR a=b);
19691969
a b

mysql-test/suite/galera/r/MW-44.result

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
SET GLOBAL general_log='OFF';
22
TRUNCATE TABLE mysql.general_log;
3-
SELECT COUNT(*) from mysql.general_log;
4-
COUNT(*)
5-
0
6-
SELECT * FROM mysql.general_log;
7-
event_time user_host thread_id server_id command_type argument
83
SET GLOBAL general_log='OFF';
94
TRUNCATE TABLE mysql.general_log;
10-
SELECT COUNT(*) from mysql.general_log;
11-
COUNT(*)
12-
0
13-
SELECT * FROM mysql.general_log;
14-
event_time user_host thread_id server_id command_type argument
155
SET GLOBAL general_log='ON';
16-
SELECT COUNT(*) from mysql.general_log;
17-
COUNT(*)
18-
1
6+
SELECT argument from mysql.general_log WHERE argument NOT LIKE 'SELECT%';
7+
argument
198
SET SESSION wsrep_osu_method=TOI;
209
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
2110
SET SESSION wsrep_osu_method=RSU;

0 commit comments

Comments
 (0)