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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
038be989
Commit
038be989
authored
Jun 22, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#600958 RQG: Crash in optimize_semijoin_nests
- Testcase.
parent
6adddca8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
2 deletions
+100
-2
mysql-test/r/subselect_sj.result
mysql-test/r/subselect_sj.result
+33
-0
mysql-test/r/subselect_sj_jcl6.result
mysql-test/r/subselect_sj_jcl6.result
+33
-1
mysql-test/t/subselect_sj.test
mysql-test/t/subselect_sj.test
+34
-1
No files found.
mysql-test/r/subselect_sj.result
View file @
038be989
...
@@ -1347,4 +1347,37 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -1347,4 +1347,37 @@ id select_type table type possible_keys key key_len ref rows Extra
select * from t3 where t3.b in (select t2.b from t1 left join t2 on t1.a=t2.a);
select * from t3 where t3.b in (select t2.b from t1 left join t2 on t1.a=t2.a);
b
b
drop table t1, t2, t3;
drop table t1, t2, t3;
#
# BUG#600958 RQG: Crash in optimize_semijoin_nests
#
CREATE TABLE t1 (
pk int(11) NOT NULL AUTO_INCREMENT,
col_int_key int(11) DEFAULT NULL,
col_date_key date DEFAULT NULL,
col_varchar_key varchar(1) DEFAULT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_date_key (col_date_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (10,8,'2002-02-21',NULL);
CREATE TABLE t2 (
pk int(11) NOT NULL AUTO_INCREMENT,
col_int_key int(11) DEFAULT NULL,
col_date_key date DEFAULT NULL,
col_varchar_key varchar(1) DEFAULT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_date_key (col_date_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
INSERT INTO t2 VALUES (1,7,'1900-01-01','f');
SELECT col_date_key FROM t1
WHERE 5 IN (
SELECT SUBQUERY3_t1 .col_int_key
FROM t2 SUBQUERY3_t1
LEFT JOIN t1 SUBQUERY3_t2 ON SUBQUERY3_t1 .col_varchar_key
);
col_date_key
drop table t2, t1;
set @@optimizer_switch=@save_optimizer_switch;
set @@optimizer_switch=@save_optimizer_switch;
mysql-test/r/subselect_sj_jcl6.result
View file @
038be989
...
@@ -1355,7 +1355,39 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -1355,7 +1355,39 @@ id select_type table type possible_keys key key_len ref rows Extra
select * from t3 where t3.b in (select t2.b from t1 left join t2 on t1.a=t2.a);
select * from t3 where t3.b in (select t2.b from t1 left join t2 on t1.a=t2.a);
b
b
drop table t1, t2, t3;
drop table t1, t2, t3;
set @@optimizer_switch=@save_optimizer_switch;
#
# BUG#600958 RQG: Crash in optimize_semijoin_nests
#
CREATE TABLE t1 (
pk int(11) NOT NULL AUTO_INCREMENT,
col_int_key int(11) DEFAULT NULL,
col_date_key date DEFAULT NULL,
col_varchar_key varchar(1) DEFAULT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_date_key (col_date_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (10,8,'2002-02-21',NULL);
CREATE TABLE t2 (
pk int(11) NOT NULL AUTO_INCREMENT,
col_int_key int(11) DEFAULT NULL,
col_date_key date DEFAULT NULL,
col_varchar_key varchar(1) DEFAULT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_date_key (col_date_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
INSERT INTO t2 VALUES (1,7,'1900-01-01','f');
SELECT col_date_key FROM t1
WHERE 5 IN (
SELECT SUBQUERY3_t1 .col_int_key
FROM t2 SUBQUERY3_t1
LEFT JOIN t1 SUBQUERY3_t2 ON SUBQUERY3_t1 .col_varchar_key
);
col_date_key
drop table t2, t1;
#
#
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
#
#
...
...
mysql-test/t/subselect_sj.test
View file @
038be989
...
@@ -1229,8 +1229,41 @@ insert into t3 values('three'),( 'four');
...
@@ -1229,8 +1229,41 @@ insert into t3 values('three'),( 'four');
insert
into
t3
values
(
'three'
),(
'four'
);
insert
into
t3
values
(
'three'
),(
'four'
);
explain
select
*
from
t3
where
t3
.
b
in
(
select
t2
.
b
from
t1
left
join
t2
on
t1
.
a
=
t2
.
a
);
explain
select
*
from
t3
where
t3
.
b
in
(
select
t2
.
b
from
t1
left
join
t2
on
t1
.
a
=
t2
.
a
);
select
*
from
t3
where
t3
.
b
in
(
select
t2
.
b
from
t1
left
join
t2
on
t1
.
a
=
t2
.
a
);
select
*
from
t3
where
t3
.
b
in
(
select
t2
.
b
from
t1
left
join
t2
on
t1
.
a
=
t2
.
a
);
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
--
echo
#
--
echo
# BUG#600958 RQG: Crash in optimize_semijoin_nests
--
echo
#
CREATE
TABLE
t1
(
pk
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
col_int_key
int
(
11
)
DEFAULT
NULL
,
col_date_key
date
DEFAULT
NULL
,
col_varchar_key
varchar
(
1
)
DEFAULT
NULL
,
PRIMARY
KEY
(
pk
),
KEY
col_int_key
(
col_int_key
),
KEY
col_date_key
(
col_date_key
),
KEY
col_varchar_key
(
col_varchar_key
,
col_int_key
)
)
ENGINE
=
MyISAM
AUTO_INCREMENT
=
11
DEFAULT
CHARSET
=
latin1
;
INSERT
INTO
t1
VALUES
(
10
,
8
,
'2002-02-21'
,
NULL
);
CREATE
TABLE
t2
(
pk
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
col_int_key
int
(
11
)
DEFAULT
NULL
,
col_date_key
date
DEFAULT
NULL
,
col_varchar_key
varchar
(
1
)
DEFAULT
NULL
,
PRIMARY
KEY
(
pk
),
KEY
col_int_key
(
col_int_key
),
KEY
col_date_key
(
col_date_key
),
KEY
col_varchar_key
(
col_varchar_key
,
col_int_key
)
)
ENGINE
=
MyISAM
AUTO_INCREMENT
=
2
DEFAULT
CHARSET
=
latin1
;
INSERT
INTO
t2
VALUES
(
1
,
7
,
'1900-01-01'
,
'f'
);
SELECT
col_date_key
FROM
t1
WHERE
5
IN
(
SELECT
SUBQUERY3_t1
.
col_int_key
FROM
t2
SUBQUERY3_t1
LEFT
JOIN
t1
SUBQUERY3_t2
ON
SUBQUERY3_t1
.
col_varchar_key
);
drop
table
t2
,
t1
;
# The following command must be the last one the file
# The following command must be the last one the file
set
@@
optimizer_switch
=@
save_optimizer_switch
;
set
@@
optimizer_switch
=@
save_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