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
ad51d77f
Commit
ad51d77f
authored
Dec 06, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: WHERE top level item [#365 bug 11]
Tests affected (forced mode): main.range main.range_mrr_icp
parent
8c9c3020
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
0 deletions
+13
-0
mysql-test/suite/versioning/r/select.result
mysql-test/suite/versioning/r/select.result
+6
-0
mysql-test/suite/versioning/t/select.test
mysql-test/suite/versioning/t/select.test
+5
-0
sql/opt_range.cc
sql/opt_range.cc
+1
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-0
No files found.
mysql-test/suite/versioning/r/select.result
View file @
ad51d77f
...
...
@@ -313,6 +313,11 @@ x
execute stmt;
x
1
### Issue #365, bug 11 (WHERE cond not top level item)
create or replace table t1 (a int, b int, key idx(a)) with system versioning;
insert into t1 values (1, 1), (2, 2);
select * from t1 where (a, 2) in ((1, 1), (2, 2)) and b = 1;
a b
drop view v1;
drop table t1, t2;
call innodb_verify_vtq(29);
...
...
@@ -346,3 +351,4 @@ No A B C D
27 1 1 1 1
28 1 1 1 1
29 1 1 1 1
30 1 1 1 1
mysql-test/suite/versioning/t/select.test
View file @
ad51d77f
...
...
@@ -208,6 +208,11 @@ select x from t1 where x in (select x from v1);";
execute
stmt
;
execute
stmt
;
--
echo
### Issue #365, bug 11 (WHERE cond not top level item)
create
or
replace
table
t1
(
a
int
,
b
int
,
key
idx
(
a
))
with
system
versioning
;
insert
into
t1
values
(
1
,
1
),
(
2
,
2
);
select
*
from
t1
where
(
a
,
2
)
in
((
1
,
1
),
(
2
,
2
))
and
b
=
1
;
drop
view
v1
;
drop
table
t1
,
t2
;
...
...
sql/opt_range.cc
View file @
ad51d77f
...
...
@@ -7347,6 +7347,7 @@ SEL_TREE *Item_func_in::get_func_row_mm_tree(RANGE_OPT_PARAM *param,
key_col
->
bring_value
();
key_col_info
.
comparator
=
row_cmp_item
->
get_comparator
(
i
);
DBUG_ASSERT
(
key_col_info
.
comparator
);
key_col_info
.
comparator
->
store_value
(
key_col
);
col_comparators
++
;
...
...
sql/sql_select.cc
View file @
ad51d77f
...
...
@@ -986,6 +986,7 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr,
thd
->
change_item_tree
(
dst_cond
,
cond1
);
slex
->
where
=
*
dst_cond
;
slex
->
where
->
top_level_item
();
}
}
// if (... table->table->versioned())
}
// for (table= tables; ...)
...
...
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