Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
77cbad4b
Commit
77cbad4b
authored
Dec 29, 2010
by
Igor Babaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected the test case for bug 695304.
Added a test case for bug #695442 - a duplicate of bug 694092.
parent
a2a09f06
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
1 deletion
+69
-1
mysql-test/r/join_cache.result
mysql-test/r/join_cache.result
+32
-0
mysql-test/r/optimizer_switch.result
mysql-test/r/optimizer_switch.result
+1
-1
mysql-test/t/join_cache.test
mysql-test/t/join_cache.test
+34
-0
mysql-test/t/optimizer_switch.test
mysql-test/t/optimizer_switch.test
+2
-0
No files found.
mysql-test/r/join_cache.result
View file @
77cbad4b
...
...
@@ -6122,6 +6122,38 @@ f1 f3 f3 f2 f4
SET SESSION join_cache_level = DEFAULT;
SET SESSION optimizer_switch = DEFAULT;
DROP TABLE t1,t2;
CREATE TABLE t1 (f1 int, f2 varchar(10), KEY (f1), KEY (f2)) ;
INSERT INTO t1 VALUES
(4,'e'), (891879424,'l'), (-243400704,'ectlyqupbk'), (1851981824,'of'),
(-1495203840,'you'), (4,'no'), (-1436942336,'c'), (891420672,'DQQYO'),
(608698368,'qergldqmec'), (1,'x');
CREATE TABLE t2 (f3 varchar(64), KEY (f3));
INSERT INTO t2 VALUES
('d'), ('UALLN'), ('d'), ('z'), ('r'), ('YVAKV'), ('d'), ('TNGZK'), ('e'),
('xucupaxdyythsgiw'), ('why'), ('ttugkxucupaxdyyt'), ('l'), ('LHTKN'),
('d'), ('o'), ('v'), ('KGLCJ'), ('your');
SET SESSION optimizer_switch='index_merge_sort_intersection=off';
SET SESSION optimizer_switch = 'index_condition_pushdown=off';
EXPLAIN SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0, 100) ORDER BY t1.f2 LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range f1,f2 f2 13 NULL 10 Using where
1 SIMPLE t2 ref f3 f3 67 test.t1.f2 2 Using where; Using index
SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0 ,100) ORDER BY t1.f2 LIMIT 1;
f1 f2 f3
SET SESSION optimizer_switch = DEFAULT;
SET SESSION optimizer_switch = 'index_condition_pushdown=on';
EXPLAIN SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0 ,100) ORDER BY t1.f2 LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range f1,f2 f2 13 NULL 10 Using where
1 SIMPLE t2 ref f3 f3 67 test.t1.f2 2 Using where; Using index
SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0 ,100) ORDER BY t1.f2 LIMIT 1;
f1 f2 f3
SET SESSION optimizer_switch = DEFAULT;
DROP TABLE t1,t2;
#
# Bug #694443: hash join using IS NULL the an equi-join condition
#
...
...
mysql-test/r/optimizer_switch.result
View file @
77cbad4b
...
...
@@ -99,4 +99,4 @@ index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_inters
set optimizer_switch=default;
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on
,table_elimination=on
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on
mysql-test/t/join_cache.test
View file @
77cbad4b
...
...
@@ -2759,6 +2759,40 @@ SET SESSION optimizer_switch = DEFAULT;
DROP
TABLE
t1
,
t2
;
# The same cause of the problem but no join buffer is used (see bug #695442)
CREATE
TABLE
t1
(
f1
int
,
f2
varchar
(
10
),
KEY
(
f1
),
KEY
(
f2
))
;
INSERT
INTO
t1
VALUES
(
4
,
'e'
),
(
891879424
,
'l'
),
(
-
243400704
,
'ectlyqupbk'
),
(
1851981824
,
'of'
),
(
-
1495203840
,
'you'
),
(
4
,
'no'
),
(
-
1436942336
,
'c'
),
(
891420672
,
'DQQYO'
),
(
608698368
,
'qergldqmec'
),
(
1
,
'x'
);
CREATE
TABLE
t2
(
f3
varchar
(
64
),
KEY
(
f3
));
INSERT
INTO
t2
VALUES
(
'd'
),
(
'UALLN'
),
(
'd'
),
(
'z'
),
(
'r'
),
(
'YVAKV'
),
(
'd'
),
(
'TNGZK'
),
(
'e'
),
(
'xucupaxdyythsgiw'
),
(
'why'
),
(
'ttugkxucupaxdyyt'
),
(
'l'
),
(
'LHTKN'
),
(
'd'
),
(
'o'
),
(
'v'
),
(
'KGLCJ'
),
(
'your'
);
SET
SESSION
optimizer_switch
=
'index_merge_sort_intersection=off'
;
SET
SESSION
optimizer_switch
=
'index_condition_pushdown=off'
;
EXPLAIN
SELECT
*
FROM
t1
,
t2
WHERE
t2
.
f3
=
t1
.
f2
AND
t1
.
f1
IN
(
9
,
0
,
100
)
ORDER
BY
t1
.
f2
LIMIT
1
;
SELECT
*
FROM
t1
,
t2
WHERE
t2
.
f3
=
t1
.
f2
AND
t1
.
f1
IN
(
9
,
0
,
100
)
ORDER
BY
t1
.
f2
LIMIT
1
;
SET
SESSION
optimizer_switch
=
DEFAULT
;
SET
SESSION
optimizer_switch
=
'index_condition_pushdown=on'
;
EXPLAIN
SELECT
*
FROM
t1
,
t2
WHERE
t2
.
f3
=
t1
.
f2
AND
t1
.
f1
IN
(
9
,
0
,
100
)
ORDER
BY
t1
.
f2
LIMIT
1
;
SELECT
*
FROM
t1
,
t2
WHERE
t2
.
f3
=
t1
.
f2
AND
t1
.
f1
IN
(
9
,
0
,
100
)
ORDER
BY
t1
.
f2
LIMIT
1
;
SET
SESSION
optimizer_switch
=
DEFAULT
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# Bug #694443: hash join using IS NULL the an equi-join condition
--
echo
#
...
...
mysql-test/t/optimizer_switch.test
View file @
77cbad4b
...
...
@@ -113,4 +113,6 @@ set optimizer_switch=default;
#
# Bug #695304: invalid default setting for optimizer_switch
#
--
replace_regex
/
,
table_elimination
=
on
//
select
@@
optimizer_switch
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment