Commit 2fe3e033 authored by Daniel Black's avatar Daniel Black

main.subselect* often fails on CI with ER_SUBQUERY_NO_1_ROW

Using mysql.slow_log was a test table would generate more than
one row if there was more than one row in the table.

Replace this table with a empty table with PK.

Reviewer: Rex Johnston
parent cd79f102
......@@ -7163,24 +7163,26 @@ drop table t1;
#
# MDEV-7565: Server crash with Signal 6 (part 2)
#
truncate table mysql.slow_log;
create table t1 (id int not null primary key);
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
Group By TestCase.Revenue, TestCase.TemplateID;
ControlRev
NULL
drop table t1;
#
# MDEV-7445:Server crash with Signal 6
#
create table t1 (id int not null primary key);
CREATE PROCEDURE procedure2()
BEGIN
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
......@@ -7193,6 +7195,7 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
drop table t1;
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
......
......@@ -5995,25 +5995,27 @@ drop table t1;
--echo # MDEV-7565: Server crash with Signal 6 (part 2)
--echo #
truncate table mysql.slow_log;
create table t1 (id int not null primary key);
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
Group By TestCase.Revenue, TestCase.TemplateID;
drop table t1;
--echo #
--echo # MDEV-7445:Server crash with Signal 6
--echo #
create table t1 (id int not null primary key);
--delimiter |
CREATE PROCEDURE procedure2()
BEGIN
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
......@@ -6025,6 +6027,7 @@ call procedure2();
call procedure2();
drop procedure procedure2;
drop table t1;
--echo #
......
......@@ -7163,24 +7163,26 @@ drop table t1;
#
# MDEV-7565: Server crash with Signal 6 (part 2)
#
truncate table mysql.slow_log;
create table t1 (id int not null primary key);
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
Group By TestCase.Revenue, TestCase.TemplateID;
ControlRev
NULL
drop table t1;
#
# MDEV-7445:Server crash with Signal 6
#
create table t1 (id int not null primary key);
CREATE PROCEDURE procedure2()
BEGIN
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
......@@ -7193,6 +7195,7 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
drop table t1;
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
......
......@@ -7156,24 +7156,26 @@ drop table t1;
#
# MDEV-7565: Server crash with Signal 6 (part 2)
#
truncate table mysql.slow_log;
create table t1 (id int not null primary key);
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
Group By TestCase.Revenue, TestCase.TemplateID;
ControlRev
NULL
drop table t1;
#
# MDEV-7445:Server crash with Signal 6
#
create table t1 (id int not null primary key);
CREATE PROCEDURE procedure2()
BEGIN
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
......@@ -7186,6 +7188,7 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
drop table t1;
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
......
......@@ -7154,24 +7154,26 @@ drop table t1;
#
# MDEV-7565: Server crash with Signal 6 (part 2)
#
truncate table mysql.slow_log;
create table t1 (id int not null primary key);
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
Group By TestCase.Revenue, TestCase.TemplateID;
ControlRev
NULL
drop table t1;
#
# MDEV-7445:Server crash with Signal 6
#
create table t1 (id int not null primary key);
CREATE PROCEDURE procedure2()
BEGIN
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
......@@ -7184,6 +7186,7 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
drop table t1;
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
......
......@@ -7169,24 +7169,26 @@ drop table t1;
#
# MDEV-7565: Server crash with Signal 6 (part 2)
#
truncate table mysql.slow_log;
create table t1 (id int not null primary key);
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
Group By TestCase.Revenue, TestCase.TemplateID;
ControlRev
NULL
drop table t1;
#
# MDEV-7445:Server crash with Signal 6
#
create table t1 (id int not null primary key);
CREATE PROCEDURE procedure2()
BEGIN
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
......@@ -7199,6 +7201,7 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
drop table t1;
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
......
......@@ -7154,24 +7154,26 @@ drop table t1;
#
# MDEV-7565: Server crash with Signal 6 (part 2)
#
truncate table mysql.slow_log;
create table t1 (id int not null primary key);
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
Group By TestCase.Revenue, TestCase.TemplateID;
ControlRev
NULL
drop table t1;
#
# MDEV-7445:Server crash with Signal 6
#
create table t1 (id int not null primary key);
CREATE PROCEDURE procedure2()
BEGIN
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
......@@ -7184,6 +7186,7 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
drop table t1;
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment