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

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
This commit is contained in:
Daniel Black
2023-11-30 14:14:10 +11:00
parent cd79f10211
commit 2fe3e033e6
7 changed files with 56 additions and 35 deletions

View File

@ -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