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
b468cd47
Commit
b468cd47
authored
Nov 13, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-5284 Assertion `!(*expr)->fixed' fails in replace_where_subcondition with IN suquery
parent
441192bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
mysql-test/r/subselect_debug.result
mysql-test/r/subselect_debug.result
+7
-0
mysql-test/t/subselect_debug.test
mysql-test/t/subselect_debug.test
+10
-0
sql/opt_subselect.cc
sql/opt_subselect.cc
+2
-4
No files found.
mysql-test/r/subselect_debug.result
View file @
b468cd47
...
...
@@ -11,3 +11,10 @@ REVERSE(EXISTS(SELECT RAND() FROM t1))
0
SET GLOBAL debug=@orig_debug;
DROP TABLE t1;
create table t1 (i int);
insert into t1 values (1),(2);
select * from t1 where (i < 200 or i = 300) and i in (select i from t1);
i
1
2
drop table t1;
mysql-test/t/subselect_debug.test
View file @
b468cd47
...
...
@@ -15,3 +15,13 @@ SELECT SUM(EXISTS(SELECT RAND() FROM t1)) FROM t1;
SELECT
REVERSE
(
EXISTS
(
SELECT
RAND
()
FROM
t1
));
SET
GLOBAL
debug
=@
orig_debug
;
DROP
TABLE
t1
;
#
# MDEV-5284 Assertion `!(*expr)->fixed' fails in replace_where_subcondition with IN suquery
#
create
table
t1
(
i
int
);
insert
into
t1
values
(
1
),(
2
);
select
*
from
t1
where
(
i
<
200
or
i
=
300
)
and
i
in
(
select
i
from
t1
);
drop
table
t1
;
sql/opt_subselect.cc
View file @
b468cd47
...
...
@@ -420,9 +420,7 @@ Currently, solution #2 is implemented.
static
bool
subquery_types_allow_materialization
(
Item_in_subselect
*
in_subs
);
static
bool
replace_where_subcondition
(
JOIN
*
join
,
Item
**
expr
,
Item
*
old_cond
,
Item
*
new_cond
,
bool
do_fix_fields
);
static
bool
replace_where_subcondition
(
JOIN
*
,
Item
**
,
Item
*
,
Item
*
,
bool
);
static
int
subq_sj_candidate_cmp
(
Item_in_subselect
*
el1
,
Item_in_subselect
*
el2
,
void
*
arg
);
static
bool
convert_subq_to_sj
(
JOIN
*
parent_join
,
Item_in_subselect
*
subq_pred
);
...
...
@@ -1293,7 +1291,7 @@ static bool replace_where_subcondition(JOIN *join, Item **expr,
}
else
if
(
item
->
type
()
==
Item
::
COND_ITEM
)
{
DBUG_ASSERT
(
!
(
*
expr
)
->
fixed
);
DBUG_ASSERT
(
!
do_fix_fields
||
!
(
*
expr
)
->
fixed
);
replace_where_subcondition
(
join
,
li
.
ref
(),
old_cond
,
new_cond
,
do_fix_fields
);
...
...
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