1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2019-01-17 13:21:27 +02:00
50 changed files with 1188 additions and 594 deletions

View File

@ -1495,6 +1495,41 @@ eval SET NAMES $old_charset;
SET @advertAcctId = 1000003;
select @advertAcctId as a from dual union all select 1.0 from dual;
--echo #
--echo # MDEV-13784: query causes seg fault
--echo #
CREATE TABLE t1 (`bug_id` int NOT NULL PRIMARY KEY, `product_id` int NOT NULL);
INSERT INTO t1 VALUES (45199,1184);
CREATE TABLE t2 (`product_id` int NOT NULL,`userid` int NOT NULL, PRIMARY KEY (`product_id`,`userid`));
INSERT INTO t2 VALUES (1184,103),(1184,624),(1184,1577),(1184,1582);
CREATE TABLE t3 (`id` int NOT NULL PRIMARY KEY,`name` varchar(64));
CREATE TABLE t4 ( `userid` int NOT NULL PRIMARY KEY, `login_name` varchar(255));
INSERT INTO t4 VALUES (103,'foo'),(624,'foo'),(1577,'foo'),(1582,'foo');
CREATE TABLE t5 (`id` int NOT NULL PRIMARY KEY, `name` varchar(64));
explain select
(
select login_name from t4 where userId = (
select userid from t2 where product_id = t1.product_id
union
select userid from t2 where product_id = (
select id from t5 where name = (select name from t3 where id = t1.product_id)) limit 1 )
) as x from t1 where (t1.bug_id=45199);
select
(
select login_name from t4 where userId = (
select userid from t2 where product_id = t1.product_id
union
select userid from t2 where product_id = (
select id from t5 where name = (select name from t3 where id = t1.product_id)) limit 1 )
) as x from t1 where (t1.bug_id=45199);
drop table t1, t2, t3, t4, t5;
--echo End of 5.5 tests
--echo #