Commit 7caa80c4 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-3934 Assertion `((keypart_map+1) & keypart_map) == 0' failed in...

MDEV-3934 Assertion `((keypart_map+1) & keypart_map) == 0' failed in _mi_pack_key with an index on a POINT column

sel_arg_range_seq_next(): set keypart map also for GEOM_FLAG keys
parent cc74bb31
CREATE TABLE t1 (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
point_data POINT NOT NULL,
PRIMARY KEY (id),
KEY idx_point_data(point_data)
) ENGINE=MyISAM;
INSERT t1 (point_data) VALUES
(GeomFromText('Point(37.0248492 23.8512726)')),
(GeomFromText('Point(38.0248492 23.8512726)'));
SELECT id FROM t1
WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
id
2
DROP TABLE t1;
#
# MDEV-3934 Assertion `((keypart_map+1) & keypart_map) == 0' failed in _mi_pack_key with an index on a POINT column
#
CREATE TABLE t1 (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
point_data POINT NOT NULL,
PRIMARY KEY (id),
KEY idx_point_data(point_data)
) ENGINE=MyISAM;
INSERT t1 (point_data) VALUES
(GeomFromText('Point(37.0248492 23.8512726)')),
(GeomFromText('Point(38.0248492 23.8512726)'));
SELECT id FROM t1
WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
DROP TABLE t1;
......@@ -248,6 +248,7 @@ walk_up_n_right:
/* Here minimum contains also function code bits, and maximum is +inf */
range->start_key.key= seq->param->min_key;
range->start_key.length= min_key_length;
range->start_key.keypart_map= make_prev_keypart_map(cur->min_key_parts);
range->start_key.flag= (ha_rkey_function) (cur->min_key_flag ^ GEOM_FLAG);
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment