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
7907b9b4
Commit
7907b9b4
authored
Aug 26, 2013
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Plain Diff
Merge fix for MDEV-4942, 5.3->5.5
parents
b9ce8e60
dbc84ff9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
1 deletion
+42
-1
mysql-test/r/join_outer.result
mysql-test/r/join_outer.result
+12
-0
mysql-test/r/join_outer_jcl6.result
mysql-test/r/join_outer_jcl6.result
+12
-0
mysql-test/t/join_outer.test
mysql-test/t/join_outer.test
+16
-0
sql/sql_select.cc
sql/sql_select.cc
+2
-1
No files found.
mysql-test/r/join_outer.result
View file @
7907b9b4
...
...
@@ -2138,4 +2138,16 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 Using index
drop table t0, t1;
#
# Bug mdev-4942: LEFT JOIN with conjunctive
# <non-nullable datetime field> IS NULL in WHERE
# causes an assert failure
#
CREATE TABLE t1 ( i1 int, d1 date );
INSERT INTO t1 VALUES (1,'2001-06-26'), (2,'2000-11-16');
CREATE TABLE t2 ( i2 int, d2 date NOT NULL );
INSERT INTO t2 VALUES (3,'2000-03-06'), (4,'2007-09-25');
SELECT * FROM t1 LEFT JOIN t2 ON i1 = i2 WHERE d1 IS NULL AND d2 IS NULL;
i1 d1 i2 d2
DROP TABLE t1,t2;
SET optimizer_switch=@save_optimizer_switch;
mysql-test/r/join_outer_jcl6.result
View file @
7907b9b4
...
...
@@ -2149,6 +2149,18 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 Using index
drop table t0, t1;
#
# Bug mdev-4942: LEFT JOIN with conjunctive
# <non-nullable datetime field> IS NULL in WHERE
# causes an assert failure
#
CREATE TABLE t1 ( i1 int, d1 date );
INSERT INTO t1 VALUES (1,'2001-06-26'), (2,'2000-11-16');
CREATE TABLE t2 ( i2 int, d2 date NOT NULL );
INSERT INTO t2 VALUES (3,'2000-03-06'), (4,'2007-09-25');
SELECT * FROM t1 LEFT JOIN t2 ON i1 = i2 WHERE d1 IS NULL AND d2 IS NULL;
i1 d1 i2 d2
DROP TABLE t1,t2;
SET optimizer_switch=@save_optimizer_switch;
set join_cache_level=default;
show variables like 'join_cache_level';
...
...
mysql-test/t/join_outer.test
View file @
7907b9b4
...
...
@@ -1687,4 +1687,20 @@ explain select * from t1 left join t0 on t0.a=t1.pk where t0.person_id='fooo' or
drop
table
t0
,
t1
;
--
echo
#
--
echo
# Bug mdev-4942: LEFT JOIN with conjunctive
--
echo
# <non-nullable datetime field> IS NULL in WHERE
--
echo
# causes an assert failure
--
echo
#
CREATE
TABLE
t1
(
i1
int
,
d1
date
);
INSERT
INTO
t1
VALUES
(
1
,
'2001-06-26'
),
(
2
,
'2000-11-16'
);
CREATE
TABLE
t2
(
i2
int
,
d2
date
NOT
NULL
);
INSERT
INTO
t2
VALUES
(
3
,
'2000-03-06'
),
(
4
,
'2007-09-25'
);
SELECT
*
FROM
t1
LEFT
JOIN
t2
ON
i1
=
i2
WHERE
d1
IS
NULL
AND
d2
IS
NULL
;
DROP
TABLE
t1
,
t2
;
SET
optimizer_switch
=@
save_optimizer_switch
;
sql/sql_select.cc
View file @
7907b9b4
...
...
@@ -13642,7 +13642,8 @@ internal_remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
In these cases the disjunct/conjunct must be merged into the
argument list of cond.
*/
if
(
new_item
->
type
()
==
Item
::
COND_ITEM
)
if
(
new_item
->
type
()
==
Item
::
COND_ITEM
&&
item
->
type
()
==
Item
::
COND_ITEM
)
{
DBUG_ASSERT
(((
Item_cond
*
)
cond
)
->
functype
()
==
((
Item_cond
*
)
new_item
)
->
functype
());
...
...
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