Skip to content

Commit 5ece215

Browse files
committed
Merge 10.4 into 10.5
2 parents db6e5bd + b8e694a commit 5ece215

37 files changed

+470
-316
lines changed

extra/mariabackup/xtrabackup.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5535,7 +5535,7 @@ static bool xtrabackup_prepare_func(char** argv)
55355535

55365536
error_cleanup:
55375537
xb_filters_free();
5538-
return ok;
5538+
return ok && !ib::error::was_logged();
55395539
}
55405540

55415541
/**************************************************************************

mysql-test/lib/mtr_report.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ sub mtr_report_stats ($$$$) {
483483
$comment =~ s/[\"]//g;
484484

485485
# if a test case has to be retried it should have the result MTR_RES_FAILED in jUnit XML
486-
if ($test->{'result'} eq "MTR_RES_FAILED" || $test->{'retries'}) {
486+
if ($test->{'result'} eq "MTR_RES_FAILED" || $test->{'retries'} > 0) {
487487
my $logcontents = $test->{'logfile-failed'} || $test->{'logfile'};
488488

489489
$xml_report .= qq(>\n\t\t\t<failure message="" type="MTR_RES_FAILED">\n<![CDATA[$logcontents]]>\n\t\t\t</failure>\n\t\t</testcase>\n);
@@ -649,6 +649,8 @@ sub mtr_error (@) {
649649
}
650650
else
651651
{
652+
use Carp qw(cluck);
653+
cluck "Error happened" if $verbose > 0;
652654
exit(1);
653655
}
654656
}

mysql-test/main/ctype_utf16.result

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2815,6 +2815,31 @@ SET DEFAULT_STORAGE_ENGINE=Default;
28152815
# End of 10.2 tests
28162816
#
28172817
#
2818+
# Start of 10.3 tests
2819+
#
2820+
#
2821+
# MDEV-22391 Assertion `0' failed in Item_type_holder::val_str on utf16 charset table query
2822+
#
2823+
SET NAMES utf8;
2824+
CREATE TABLE t1 (a TEXT CHARACTER SET utf16);
2825+
SELECT * FROM (VALUES (1) UNION SELECT * FROM t1) AS t;
2826+
1
2827+
1
2828+
DROP TABLE t1;
2829+
VALUES (1) UNION SELECT _utf16 0x0020;
2830+
1
2831+
1
2832+
2833+
VALUES ('') UNION SELECT _utf16 0x0020 COLLATE utf16_bin;
2834+
2835+
2836+
VALUES ('') UNION VALUES ( _utf16 0x0020 COLLATE utf16_bin);
2837+
2838+
2839+
#
2840+
# End of 10.3 tests
2841+
#
2842+
#
28182843
# Start of 10.5 tests
28192844
#
28202845
#

mysql-test/main/ctype_utf16.test

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,27 @@ let $coll_pad='utf16_bin';
935935
--echo # End of 10.2 tests
936936
--echo #
937937

938+
--echo #
939+
--echo # Start of 10.3 tests
940+
--echo #
941+
942+
--echo #
943+
--echo # MDEV-22391 Assertion `0' failed in Item_type_holder::val_str on utf16 charset table query
944+
--echo #
945+
946+
SET NAMES utf8;
947+
CREATE TABLE t1 (a TEXT CHARACTER SET utf16);
948+
SELECT * FROM (VALUES (1) UNION SELECT * FROM t1) AS t;
949+
DROP TABLE t1;
950+
VALUES (1) UNION SELECT _utf16 0x0020;
951+
VALUES ('') UNION SELECT _utf16 0x0020 COLLATE utf16_bin;
952+
VALUES ('') UNION VALUES ( _utf16 0x0020 COLLATE utf16_bin);
953+
954+
955+
--echo #
956+
--echo # End of 10.3 tests
957+
--echo #
958+
938959

939960
--echo #
940961
--echo # Start of 10.5 tests

mysql-test/main/ctype_utf8.result

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11324,6 +11324,18 @@ SELECT x AS 5天内最近一次登录时间 FROM t1;
1132411324
1
1132511325
DROP TABLE t1;
1132611326
#
11327+
# MDEV-22391 Assertion `0' failed in Item_type_holder::val_str on utf16 charset table query
11328+
#
11329+
SET NAMES utf8;
11330+
VALUES (_latin1 0xDF) UNION SELECT _utf8'a' COLLATE utf8_bin;
11331+
_latin1 0xDF
11332+
ß
11333+
a
11334+
VALUES (_latin1 0xDF) UNION VALUES(_utf8'a' COLLATE utf8_bin);
11335+
_latin1 0xDF
11336+
ß
11337+
a
11338+
#
1132711339
# End of 10.3 tests
1132811340
#
1132911341
#

mysql-test/main/ctype_utf8.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,6 +2257,13 @@ INSERT INTO t1 VALUES (1);
22572257
SELECT x AS 5天内最近一次登录时间 FROM t1;
22582258
DROP TABLE t1;
22592259

2260+
--echo #
2261+
--echo # MDEV-22391 Assertion `0' failed in Item_type_holder::val_str on utf16 charset table query
2262+
--echo #
2263+
2264+
SET NAMES utf8;
2265+
VALUES (_latin1 0xDF) UNION SELECT _utf8'a' COLLATE utf8_bin;
2266+
VALUES (_latin1 0xDF) UNION VALUES(_utf8'a' COLLATE utf8_bin);
22602267

22612268
--echo #
22622269
--echo # End of 10.3 tests

mysql-test/main/ps.result

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5472,6 +5472,23 @@ drop procedure p;
54725472
drop view v1;
54735473
drop table t1;
54745474
#
5475+
# MDEV-22591 Debug build crashes on EXECUTE IMMEDIATE '... WHERE ?' USING IGNORE
5476+
#
5477+
CREATE TABLE t1 (a INT);
5478+
EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE ?' USING IGNORE;
5479+
ERROR HY000: Default/ignore value is not supported for such parameter usage
5480+
EXECUTE IMMEDIATE 'SELECT * FROM t1 HAVING ?' USING IGNORE;
5481+
ERROR HY000: Default/ignore value is not supported for such parameter usage
5482+
EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE ?' USING 0;
5483+
a
5484+
EXECUTE IMMEDIATE 'SELECT * FROM t1 HAVING ?' USING 0;
5485+
a
5486+
DROP TABLE t1;
5487+
EXECUTE IMMEDIATE 'SHOW DATABASES WHERE ?' USING DEFAULT;
5488+
ERROR HY000: Default/ignore value is not supported for such parameter usage
5489+
EXECUTE IMMEDIATE 'SHOW DATABASES WHERE ?' USING 0;
5490+
Database
5491+
#
54755492
# End of 10.2 tests
54765493
#
54775494
#

mysql-test/main/ps.test

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4914,6 +4914,23 @@ drop procedure p;
49144914
drop view v1;
49154915
drop table t1;
49164916

4917+
4918+
--echo #
4919+
--echo # MDEV-22591 Debug build crashes on EXECUTE IMMEDIATE '... WHERE ?' USING IGNORE
4920+
--echo #
4921+
4922+
CREATE TABLE t1 (a INT);
4923+
--error ER_INVALID_DEFAULT_PARAM
4924+
EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE ?' USING IGNORE;
4925+
--error ER_INVALID_DEFAULT_PARAM
4926+
EXECUTE IMMEDIATE 'SELECT * FROM t1 HAVING ?' USING IGNORE;
4927+
EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE ?' USING 0;
4928+
EXECUTE IMMEDIATE 'SELECT * FROM t1 HAVING ?' USING 0;
4929+
DROP TABLE t1;
4930+
--error ER_INVALID_DEFAULT_PARAM
4931+
EXECUTE IMMEDIATE 'SHOW DATABASES WHERE ?' USING DEFAULT;
4932+
EXECUTE IMMEDIATE 'SHOW DATABASES WHERE ?' USING 0;
4933+
49174934
--echo #
49184935
--echo # End of 10.2 tests
49194936
--echo #

mysql-test/main/sp2.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
CREATE DATABASE test1;
2+
CREATE PROCEDURE test1.sp3() BEGIN END;
3+
SHOW PROCEDURE STATUS;
4+
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
5+
mtr add_suppression PROCEDURE root@localhost # # DEFINER utf8 utf8_general_ci latin1_swedish_ci
6+
mtr check_testcase PROCEDURE root@localhost # # DEFINER utf8 utf8_general_ci latin1_swedish_ci
7+
mtr check_warnings PROCEDURE root@localhost # # DEFINER utf8 utf8_general_ci latin1_swedish_ci
8+
mysql AddGeometryColumn PROCEDURE mariadb.sys@localhost # # INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
9+
mysql DropGeometryColumn PROCEDURE mariadb.sys@localhost # # INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
10+
test sp2 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
11+
test1 sp1 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
12+
test1 sp3 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
13+
DROP PROCEDURE sp2;
14+
DROP DATABASE test1;
15+
select count(*) from mysql.event;
16+
count(*)
17+
416
18+
flush tables;
19+
show events;
20+
truncate table mysql.event;

mysql-test/main/sp2.test

Lines changed: 37 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)