[MDEV-32514] Slow log entries causing main.subselect mtr failures. Created: 2023-10-18  Updated: 2023-11-06  Resolved: 2023-11-06

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.4.31
Fix Version/s: 10.4.32

Type: Bug Priority: Minor
Reporter: Rex Johnston Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-32518 Test failure: ./mtr --no-reorder main... Closed

 Description   

In MDEV-7445, a test required an empty table as a data source. mysql.slow_log was chosen as this table, but some CI testers enable this in a worker as a command line option, meaning that this table may no longer be empty. If the table returns more than 1 row, the query fails, causing test failure.

This will clearly be a random failure, depending on OS workload.



 Comments   
Comment by Kristian Nielsen [ 2023-10-28 ]

I assume this is the failure that's being referred to?

CURRENT_TEST: main.subselect
/mnt/buildbot/build/mariadb-10.4.32/client//mysqltest: Error on delete of '/mnt/buildbot/build/mariadb-10.4.32/mysql-test/var/1/tmp/subselect.out.file.1' (Errcode: 2 "No such file or directory")
mysqltest: At line 5993: query 'Select 
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E           
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
) As `ControlRev`
From 
(Select  3 as Revenue, 4 as TemplateID) As `TestCase` 
Group By  TestCase.Revenue, TestCase.TemplateID' failed: 1242: Subquery returns more than 1 row

Comment by Elena Stepanova [ 2023-11-06 ]

If it's about the failure above, it happens upon executing

main.log_slow main.subselect

or

main.log_slow main.subselect_no_exists_to_in

without any special command-line options.

Comment by Rex Johnston [ 2023-11-06 ]

Yes knielsen elenst, this is the offending error.

Comment by Oleksandr Byelkin [ 2023-11-06 ]

1. See Monty's fix (and it is already pushed)
2. Did you removed the original fix and checked that it fails in your variant?
3. I think that slow_log should be controlled after other tests run to be clear

Generated at Thu Feb 08 10:31:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.