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
44ca4993
Commit
44ca4993
authored
Nov 16, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: partitioning and keyread on an indexed vcol
parent
2a0f7a34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletion
+41
-1
mysql-test/suite/vcol/r/partition.result
mysql-test/suite/vcol/r/partition.result
+20
-0
mysql-test/suite/vcol/t/partition.test
mysql-test/suite/vcol/t/partition.test
+20
-0
sql/ha_partition.cc
sql/ha_partition.cc
+1
-1
No files found.
mysql-test/suite/vcol/r/partition.result
0 → 100644
View file @
44ca4993
CREATE TABLE t1 (
id INT NOT NULL,
store_id INT NOT NULL,
x INT GENERATED ALWAYS AS (id + store_id)
)
PARTITION BY RANGE (store_id) (
PARTITION p0 VALUES LESS THAN (6),
PARTITION p1 VALUES LESS THAN (11),
PARTITION p2 VALUES LESS THAN (16),
PARTITION p3 VALUES LESS THAN (21)
);
INSERT t1 (id, store_id) VALUES(1, 2), (3, 4), (3, 12), (4, 18);
CREATE INDEX idx ON t1(x);
SELECT x FROM t1;
x
3
7
15
22
DROP TABLE t1;
mysql-test/suite/vcol/t/partition.test
0 → 100644
View file @
44ca4993
#
# test keyread on an indexed vcol
#
--
source
include
/
have_partition
.
inc
CREATE
TABLE
t1
(
id
INT
NOT
NULL
,
store_id
INT
NOT
NULL
,
x
INT
GENERATED
ALWAYS
AS
(
id
+
store_id
)
)
PARTITION
BY
RANGE
(
store_id
)
(
PARTITION
p0
VALUES
LESS
THAN
(
6
),
PARTITION
p1
VALUES
LESS
THAN
(
11
),
PARTITION
p2
VALUES
LESS
THAN
(
16
),
PARTITION
p3
VALUES
LESS
THAN
(
21
)
);
INSERT
t1
(
id
,
store_id
)
VALUES
(
1
,
2
),
(
3
,
4
),
(
3
,
12
),
(
4
,
18
);
CREATE
INDEX
idx
ON
t1
(
x
);
SELECT
x
FROM
t1
;
DROP
TABLE
t1
;
sql/ha_partition.cc
View file @
44ca4993
...
...
@@ -3434,7 +3434,7 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
}
m_start_key
.
length
=
0
;
m_rec0
=
table
->
record
[
0
];
m_rec_length
=
table_share
->
stored_rec_
length
;
m_rec_length
=
table_share
->
rec
length
;
if
(
!
m_part_ids_sorted_by_num_of_records
)
{
if
(
!
(
m_part_ids_sorted_by_num_of_records
=
...
...
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