Details
-
Bug
-
Status: Open (View Workflow)
-
Trivial
-
Resolution: Unresolved
-
10.11, 11.1(EOL), 11.2, 10.8(EOL), 11.0(EOL), 11.3(EOL)
-
None
Description
Per-partitioned engine-defined attributes were implemented in 10.8 in the scope of MDEV-5271. To my understanding, data_table is defined as such attribute in OQGraph, however it doesn't work.
--source include/have_partition.inc
|
|
INSTALL SONAME 'ha_oqgraph'; |
|
CREATE TABLE oq_backing ( |
origid INT UNSIGNED NOT NULL, |
destid INT UNSIGNED NOT NULL, |
PRIMARY KEY (origid, destid), |
KEY (destid) |
);
|
INSERT INTO oq_backing (origid, destid) VALUES (1,2), (2,3), (3,4), (4,5), (2,6), (5,6); |
|
CREATE TABLE oq_backing1 ( |
origid INT UNSIGNED NOT NULL, |
destid INT UNSIGNED NOT NULL, |
PRIMARY KEY (origid, destid), |
KEY (destid) |
);
|
INSERT INTO oq_backing1 (origid, destid) VALUES (11,12), (12,13), (13,14), (14,15), (12,16), (15,16); |
|
CREATE TABLE oq_backing2 ( |
origid INT UNSIGNED NOT NULL, |
destid INT UNSIGNED NOT NULL, |
PRIMARY KEY (origid, destid), |
KEY (destid) |
);
|
INSERT INTO oq_backing2 (origid, destid) VALUES (21,22), (22,23), (23,24), (24,25), (22,26), (25,26); |
|
CREATE TABLE oq_graph ( |
latch VARCHAR(32) NULL, |
origid BIGINT UNSIGNED NULL, |
destid BIGINT UNSIGNED NULL, |
weight DOUBLE NULL, |
seq BIGINT UNSIGNED NULL, |
linkid BIGINT UNSIGNED NULL, |
KEY (latch, origid, destid) USING HASH, |
KEY (latch, destid, origid) USING HASH |
)
|
ENGINE=OQGRAPH
|
data_table='oq_backing' origid='origid' destid='destid' |
PARTITION BY RANGE (origid) ( |
PARTITION p0 VALUES LESS THAN (20) data_table='oq_backing1' origid='origid' destid='destid', |
PARTITION p1 VALUES LESS THAN (30) data_table='oq_backing2' origid='origid' destid='destid' |
);
|
|
SELECT * FROM oq_graph; |
|
DROP TABLE IF EXISTS oq_backing, oq_backing1, oq_backing2, oq_graph; |
UNINSTALL SONAME 'ha_oqgraph'; |
10.8.8 |
SELECT * FROM oq_graph; |
latch origid destid weight seq linkid
|
NULL 1 2 1 NULL NULL |
NULL 2 3 1 NULL NULL |
NULL 3 4 1 NULL NULL |
NULL 4 5 1 NULL NULL |
NULL 2 6 1 NULL NULL |
NULL 5 6 1 NULL NULL |
NULL 1 2 1 NULL NULL |
NULL 2 3 1 NULL NULL |
NULL 3 4 1 NULL NULL |
NULL 4 5 1 NULL NULL |
NULL 2 6 1 NULL NULL |
NULL 5 6 1 NULL NULL |
So, neither oq_backing1 nor oq_backing2 are used, instead each partition seems to be treated as a separate table with data_table='oq_backing' – default table option, which cannot be omitted because OQGraph requires it.
It works the same way without per-partition attributes – adding a partition leads to an extra set of rows in the result set.
Attachments
Issue Links
- relates to
-
MDEV-5271 Support engine-defined attributes per partition
- Closed