Commit 28777046 authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-15245: Assertion `false' failed in myrocks::ha_rocksdb::position

Don't call handler->position() if the last call to read a row did
not succeed.
parent 112df069
......@@ -18724,7 +18724,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
skip_over= FALSE;
}
if (join_tab->keep_current_rowid)
if (join_tab->keep_current_rowid && !error)
join_tab->table->file->position(join_tab->table->record[0]);
rc= evaluate_join_record(join, join_tab, error);
......
......@@ -135,3 +135,17 @@ SELECT 1;
1
1
DROP TABLE t1;
#
# MDEV-15245: Assertion `false' failed in myrocks::ha_rocksdb::position
#
CREATE TABLE t1 (a INT) ENGINE=RocksDB;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT) ENGINE=RocksDB
PARTITION BY RANGE(b)
(PARTITION p0 VALUES LESS THAN (1),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t2 VALUES (NULL),(0);
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT t2.* FROM t1, t2;
UPDATE v1 SET b = 5;
drop view v1;
drop table t1,t2;
......@@ -139,3 +139,22 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
SELECT 1;
DROP TABLE t1;
--echo #
--echo # MDEV-15245: Assertion `false' failed in myrocks::ha_rocksdb::position
--echo #
CREATE TABLE t1 (a INT) ENGINE=RocksDB;
INSERT INTO t1 VALUES (1),(2);
# partitioning
CREATE TABLE t2 (b INT) ENGINE=RocksDB
PARTITION BY RANGE(b)
(PARTITION p0 VALUES LESS THAN (1),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t2 VALUES (NULL),(0);
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT t2.* FROM t1, t2;
UPDATE v1 SET b = 5;
drop view v1;
drop table t1,t2;
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