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
c6de4558
Commit
c6de4558
authored
Jan 24, 2014
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
4d83f579
e1f94a69
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletion
+54
-1
mysql-test/r/innodb_icp.result
mysql-test/r/innodb_icp.result
+25
-0
mysql-test/t/innodb_icp.test
mysql-test/t/innodb_icp.test
+28
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
mysql-test/r/innodb_icp.result
View file @
c6de4558
...
...
@@ -907,5 +907,30 @@ OR a = c
ORDER BY e;
a b c d e
DROP TABLE t1,t2,t3;
#
# MDEV-5337: Wrong result in mariadb 5.5.32 with ORDER BY + LIMIT when index_condition_pushdown=on
# MDEV-5512: Wrong result (WHERE clause ignored) with multiple clauses using Percona-XtraDB engine
#
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (pk int primary key,
key1 char(32),
key2 char(32),
key(key1),
key(key2)
) engine=innodb;
insert into t2 select
A.a+10*B.a+100*C.a,
concat('rare-', A.a+10*B.a),
concat('rare-', A.a+10*B.a)
from
t1 A, t1 B, t1 C;
update t2 set key1='frequent-val' where pk between 100 and 350;
select * from t2 ignore key(PRIMARY)
where key1='frequent-val' and key2 between 'rare-400' and 'rare-450' order by pk limit 2;
pk key1 key2
141 frequent-val rare-41
142 frequent-val rare-42
drop table t1, t2;
set optimizer_switch=@innodb_icp_tmp;
set storage_engine= @save_storage_engine;
mysql-test/t/innodb_icp.test
View file @
c6de4558
...
...
@@ -45,6 +45,34 @@ ORDER BY e;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
#
--
echo
# MDEV-5337: Wrong result in mariadb 5.5.32 with ORDER BY + LIMIT when index_condition_pushdown=on
--
echo
# MDEV-5512: Wrong result (WHERE clause ignored) with multiple clauses using Percona-XtraDB engine
--
echo
#
create
table
t1
(
a
int
);
insert
into
t1
values
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
);
create
table
t2
(
pk
int
primary
key
,
key1
char
(
32
),
key2
char
(
32
),
key
(
key1
),
key
(
key2
)
)
engine
=
innodb
;
insert
into
t2
select
A
.
a
+
10
*
B
.
a
+
100
*
C
.
a
,
concat
(
'rare-'
,
A
.
a
+
10
*
B
.
a
),
concat
(
'rare-'
,
A
.
a
+
10
*
B
.
a
)
from
t1
A
,
t1
B
,
t1
C
;
update
t2
set
key1
=
'frequent-val'
where
pk
between
100
and
350
;
select
*
from
t2
ignore
key
(
PRIMARY
)
where
key1
=
'frequent-val'
and
key2
between
'rare-400'
and
'rare-450'
order
by
pk
limit
2
;
drop
table
t1
,
t2
;
set
optimizer_switch
=@
innodb_icp_tmp
;
set
storage_engine
=
@
save_storage_engine
;
sql/sql_select.cc
View file @
c6de4558
...
...
@@ -19479,7 +19479,7 @@ check_reverse_order:
table
->
disable_keyread
();
}
}
else
if
(
tab
->
type
!=
JT_ALL
)
else
if
(
tab
->
type
!=
JT_ALL
||
tab
->
select
->
quick
)
{
/*
We're about to use a quick access to the table.
...
...
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