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
74f678d8
Commit
74f678d8
authored
Nov 05, 2008
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
12ad7f3b
bcd88c9f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
1 deletion
+104
-1
mysql-test/r/partition.result
mysql-test/r/partition.result
+74
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+29
-0
sql/ha_partition.cc
sql/ha_partition.cc
+1
-1
No files found.
mysql-test/r/partition.result
View file @
74f678d8
drop table if exists t1, t2;
CREATE TABLE t1 (a INT NOT NULL, KEY(a))
PARTITION BY RANGE(a)
(PARTITION p1 VALUES LESS THAN (200), PARTITION pmax VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (2), (40), (40), (70), (60), (90), (199);
SELECT a FROM t1 WHERE a BETWEEN 60 AND 95 ORDER BY a ASC;
a
60
70
90
SELECT a FROM t1 WHERE a BETWEEN 60 AND 95;
a
60
70
90
INSERT INTO t1 VALUES (200), (250), (210);
SELECT a FROM t1 WHERE a BETWEEN 60 AND 220 ORDER BY a ASC;
a
60
70
90
199
200
210
SELECT a FROM t1 WHERE a BETWEEN 200 AND 220 ORDER BY a ASC;
a
200
210
SELECT a FROM t1 WHERE a BETWEEN 60 AND 95 ORDER BY a DESC;
a
90
70
60
SELECT a FROM t1 WHERE a BETWEEN 60 AND 220 ORDER BY a DESC;
a
210
200
199
90
70
60
SELECT a FROM t1 WHERE a BETWEEN 200 AND 220 ORDER BY a DESC;
a
210
200
SELECT a FROM t1 WHERE a BETWEEN 60 AND 220;
a
199
200
210
60
70
90
SELECT a FROM t1 WHERE a BETWEEN 200 AND 220;
a
200
210
SELECT a FROM t1 WHERE a BETWEEN 60 AND 95;
a
60
70
90
SELECT a FROM t1 WHERE a BETWEEN 60 AND 220;
a
199
200
210
60
70
90
SELECT a FROM t1 WHERE a BETWEEN 200 AND 220;
a
200
210
DROP TABLE t1;
CREATE TABLE t1 (
a INT NOT NULL,
b MEDIUMINT NOT NULL,
...
...
mysql-test/t/partition.test
View file @
74f678d8
...
...
@@ -14,6 +14,35 @@
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
#
# Bug#40494: Crash MYSQL server crashes on range access with partitioning
# and order by
#
CREATE
TABLE
t1
(
a
INT
NOT
NULL
,
KEY
(
a
))
PARTITION
BY
RANGE
(
a
)
(
PARTITION
p1
VALUES
LESS
THAN
(
200
),
PARTITION
pmax
VALUES
LESS
THAN
MAXVALUE
);
INSERT
INTO
t1
VALUES
(
2
),
(
40
),
(
40
),
(
70
),
(
60
),
(
90
),
(
199
);
SELECT
a
FROM
t1
WHERE
a
BETWEEN
60
AND
95
ORDER
BY
a
ASC
;
--
sorted_result
SELECT
a
FROM
t1
WHERE
a
BETWEEN
60
AND
95
;
INSERT
INTO
t1
VALUES
(
200
),
(
250
),
(
210
);
SELECT
a
FROM
t1
WHERE
a
BETWEEN
60
AND
220
ORDER
BY
a
ASC
;
SELECT
a
FROM
t1
WHERE
a
BETWEEN
200
AND
220
ORDER
BY
a
ASC
;
SELECT
a
FROM
t1
WHERE
a
BETWEEN
60
AND
95
ORDER
BY
a
DESC
;
SELECT
a
FROM
t1
WHERE
a
BETWEEN
60
AND
220
ORDER
BY
a
DESC
;
SELECT
a
FROM
t1
WHERE
a
BETWEEN
200
AND
220
ORDER
BY
a
DESC
;
--
sorted_result
SELECT
a
FROM
t1
WHERE
a
BETWEEN
60
AND
220
;
--
sorted_result
SELECT
a
FROM
t1
WHERE
a
BETWEEN
200
AND
220
;
--
sorted_result
SELECT
a
FROM
t1
WHERE
a
BETWEEN
60
AND
95
;
--
sorted_result
SELECT
a
FROM
t1
WHERE
a
BETWEEN
60
AND
220
;
--
sorted_result
SELECT
a
FROM
t1
WHERE
a
BETWEEN
200
AND
220
;
DROP
TABLE
t1
;
#
# Bug35931: Index search may return duplicates
#
...
...
sql/ha_partition.cc
View file @
74f678d8
...
...
@@ -4084,7 +4084,7 @@ int ha_partition::read_range_next()
{
DBUG_ENTER
(
"ha_partition::read_range_next"
);
if
(
m_ordered
)
if
(
m_ordered
_scan_ongoing
)
{
DBUG_RETURN
(
handle_ordered_next
(
table
->
record
[
0
],
eq_range
));
}
...
...
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