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
d47f9233
Commit
d47f9233
authored
Nov 24, 2008
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
10548a6e
d5057740
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
mysql-test/r/partition.result
mysql-test/r/partition.result
+12
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+15
-0
sql/ha_partition.cc
sql/ha_partition.cc
+2
-1
No files found.
mysql-test/r/partition.result
View file @
d47f9233
drop table if exists t1, t2;
CREATE TABLE t1 (
pk INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (pk)
)
/*!50100 PARTITION BY HASH (pk)
PARTITIONS 2 */;
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 WHERE pk < 0 ORDER BY pk;
pk
DROP TABLE t1;
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);
...
...
mysql-test/t/partition.test
View file @
d47f9233
...
...
@@ -14,6 +14,21 @@
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
#
# Bug#40954: Crash if range search and order by.
#
CREATE
TABLE
t1
(
pk
INT
NOT
NULL
AUTO_INCREMENT
,
PRIMARY
KEY
(
pk
)
)
/*!50100 PARTITION BY HASH (pk)
PARTITIONS 2 */
;
INSERT
INTO
t1
VALUES
(
NULL
);
INSERT
INTO
t1
VALUES
(
NULL
);
INSERT
INTO
t1
VALUES
(
NULL
);
SELECT
*
FROM
t1
WHERE
pk
<
0
ORDER
BY
pk
;
DROP
TABLE
t1
;
#
# Bug#40494: Crash MYSQL server crashes on range access with partitioning
# and order by
...
...
sql/ha_partition.cc
View file @
d47f9233
...
...
@@ -4490,7 +4490,8 @@ int ha_partition::handle_ordered_index_scan(uchar *buf, bool reverse_order)
This can only read record to table->record[0], as it was set when
the table was being opened. We have to memcpy data ourselves.
*/
error
=
file
->
read_range_first
(
&
m_start_key
,
end_range
,
eq_range
,
TRUE
);
error
=
file
->
read_range_first
(
m_start_key
.
key
?
&
m_start_key
:
NULL
,
end_range
,
eq_range
,
TRUE
);
memcpy
(
rec_buf_ptr
,
table
->
record
[
0
],
m_rec_length
);
reverse_order
=
FALSE
;
break
;
...
...
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