summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2022-01-20 15:40:11 +0200
committerMonty <monty@mariadb.org>2022-01-20 16:46:39 +0200
commitdb574173d19731f1e5dc75d325f72398afac8d59 (patch)
tree6a25163e941c3d3e42aa5e70fe86e8a6ae3a5893
parent47463e5796709155f4168bc6132feae451238ebd (diff)
downloadmariadb-git-db574173d19731f1e5dc75d325f72398afac8d59.tar.gz
Fixed test case for MDEV-25830
-rw-r--r--mysql-test/main/mdev-25830.result9
-rw-r--r--mysql-test/main/mdev-25830.test15
2 files changed, 9 insertions, 15 deletions
diff --git a/mysql-test/main/mdev-25830.result b/mysql-test/main/mdev-25830.result
index d9840d20474..e62d1ff3f55 100644
--- a/mysql-test/main/mdev-25830.result
+++ b/mysql-test/main/mdev-25830.result
@@ -25,8 +25,8 @@ ORDER BY sysapproval_approver0.`order`
LIMIT 0, 50 ;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
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
-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
-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
+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
+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
set optimizer_use_condition_selectivity=4;
analyze SELECT sysapproval_approver0.`sys_id`
FROM ((sysapproval_approver sysapproval_approver0
@@ -48,8 +48,9 @@ ORDER BY sysapproval_approver0.`order`
LIMIT 0, 50 ;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
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
-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
-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
+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
+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
+drop table sysapproval_approver,task;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/mdev-25830.test b/mysql-test/main/mdev-25830.test
index 3aa66c3ee1d..5521d1fad85 100644
--- a/mysql-test/main/mdev-25830.test
+++ b/mysql-test/main/mdev-25830.test
@@ -17,8 +17,6 @@ set global innodb_stats_persistent_sample_pages=100;
--disable_result_log
--disable_warnings
-create database if not exists mdev25830;
-use mdev25830;
DROP TABLE IF EXISTS `sysapproval_approver`;
CREATE TABLE `sysapproval_approver` (
`order` int(11) DEFAULT NULL,
@@ -53,6 +51,9 @@ ANALYZE TABLE task PERSISTENT FOR COLUMNS() INDEXES();
--enable_result_log
--enable_query_log
+# The following explain is left here from the original bug report.
+# Can be useful if one gets this issue again in a future MariaDB version
+
#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;
@@ -96,15 +97,7 @@ WHERE task2.`sys_id` LIKE '8e7792a7dbfffb00fff8a345ca961934%'
ORDER BY sysapproval_approver0.`order`
LIMIT 0, 50 ;
---disable_query_log
---disable_result_log
---disable_warnings
-
-drop database mdev25830;
-
---enable_warnings
---enable_result_log
---enable_query_log
+drop table sysapproval_approver,task;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=