Skip to content

Commit db57417

Browse files
committed
Fixed test case for MDEV-25830
1 parent 47463e5 commit db57417

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

mysql-test/main/mdev-25830.result

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ ORDER BY sysapproval_approver0.`order`
2525
LIMIT 0, 50 ;
2626
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
2727
1 SIMPLE task2 range PRIMARY,sys_class_name_2,sys_domain_path PRIMARY 96 NULL 1 0.00 100.00 100.00 Using where; Using temporary; Using filesort
28-
1 SIMPLE task1 ref PRIMARY,task_parent,sys_class_name_2,sys_domain_path task_parent 99 mdev25830.task2.sys_id 1 NULL 100.00 NULL Using index condition; Using where
29-
1 SIMPLE sysapproval_approver0 ref sysapproval_approver_ref5,sys_domain_path,sysapproval_approver_CHG1975376 sysapproval_approver_ref5 99 mdev25830.task1.sys_id 1 NULL 100.00 NULL Using index condition; Using where
28+
1 SIMPLE task1 ref PRIMARY,task_parent,sys_class_name_2,sys_domain_path task_parent 99 test.task2.sys_id 1 NULL 100.00 NULL Using index condition; Using where
29+
1 SIMPLE sysapproval_approver0 ref sysapproval_approver_ref5,sys_domain_path,sysapproval_approver_CHG1975376 sysapproval_approver_ref5 99 test.task1.sys_id 1 NULL 100.00 NULL Using index condition; Using where
3030
set optimizer_use_condition_selectivity=4;
3131
analyze SELECT sysapproval_approver0.`sys_id`
3232
FROM ((sysapproval_approver sysapproval_approver0
@@ -48,8 +48,9 @@ ORDER BY sysapproval_approver0.`order`
4848
LIMIT 0, 50 ;
4949
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
5050
1 SIMPLE task2 range PRIMARY,sys_class_name_2,sys_domain_path PRIMARY 96 NULL 1 0.00 98.00 100.00 Using where; Using temporary; Using filesort
51-
1 SIMPLE task1 ref PRIMARY,task_parent,sys_class_name_2,sys_domain_path task_parent 99 mdev25830.task2.sys_id 1 NULL 100.00 NULL Using index condition; Using where
52-
1 SIMPLE sysapproval_approver0 ref sysapproval_approver_ref5,sys_domain_path,sysapproval_approver_CHG1975376 sysapproval_approver_ref5 99 mdev25830.task1.sys_id 1 NULL 100.00 NULL Using index condition; Using where
51+
1 SIMPLE task1 ref PRIMARY,task_parent,sys_class_name_2,sys_domain_path task_parent 99 test.task2.sys_id 1 NULL 100.00 NULL Using index condition; Using where
52+
1 SIMPLE sysapproval_approver0 ref sysapproval_approver_ref5,sys_domain_path,sysapproval_approver_CHG1975376 sysapproval_approver_ref5 99 test.task1.sys_id 1 NULL 100.00 NULL Using index condition; Using where
53+
drop table sysapproval_approver,task;
5354
set global innodb_stats_persistent= @innodb_stats_persistent_save;
5455
set global innodb_stats_persistent_sample_pages=
5556
@innodb_stats_persistent_sample_pages_save;

mysql-test/main/mdev-25830.test

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ set global innodb_stats_persistent_sample_pages=100;
1717
--disable_result_log
1818
--disable_warnings
1919

20-
create database if not exists mdev25830;
21-
use mdev25830;
2220
DROP TABLE IF EXISTS `sysapproval_approver`;
2321
CREATE TABLE `sysapproval_approver` (
2422
`order` int(11) DEFAULT NULL,
@@ -53,6 +51,9 @@ ANALYZE TABLE task PERSISTENT FOR COLUMNS() INDEXES();
5351
--enable_result_log
5452
--enable_query_log
5553

54+
# The following explain is left here from the original bug report.
55+
# Can be useful if one gets this issue again in a future MariaDB version
56+
5657
#explain format= json SELECT sysapproval_approver0.`sys_id` FROM ((sysapproval_approver sysapproval_approver0 INNER JOIN task task1 ON sysapproval_approver0.`sysapproval` = task1.`sys_id` AND ((task1.`sys_domain_path` = '/' OR task1.`sys_domain_path` LIKE '!!!/!!#/!!$/%' OR task1.`sys_domain_path` LIKE '!!!/!!!/%'))) INNER JOIN task task2 ON task1.`parent` = task2.`sys_id` AND ((task2.`sys_domain_path` = '/' OR task2.`sys_domain_path` LIKE '!!!/!!#/!!$/%' OR task2.`sys_domain_path` LIKE '!!!/!!!/%'))) WHERE task2.`sys_id` LIKE '8e7792a7dbfffb00fff8a345ca961934%' AND (sysapproval_approver0.`sys_domain_path` = '/' OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!#/!!$/%' OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!!/%') ORDER BY sysapproval_approver0.`order` LIMIT 0, 50;
5758

5859

@@ -96,15 +97,7 @@ WHERE task2.`sys_id` LIKE '8e7792a7dbfffb00fff8a345ca961934%'
9697
ORDER BY sysapproval_approver0.`order`
9798
LIMIT 0, 50 ;
9899

99-
--disable_query_log
100-
--disable_result_log
101-
--disable_warnings
102-
103-
drop database mdev25830;
104-
105-
--enable_warnings
106-
--enable_result_log
107-
--enable_query_log
100+
drop table sysapproval_approver,task;
108101

109102
set global innodb_stats_persistent= @innodb_stats_persistent_save;
110103
set global innodb_stats_persistent_sample_pages=

0 commit comments

Comments
 (0)