diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2018-03-08 11:43:55 +0100 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2018-03-11 16:43:36 +0000 |
commit | 28777046b4dc3decd462a4a7a6d68c168b484635 (patch) | |
tree | bbbc2b1c6a48103cdb7a0bd5124e7997d553a6b8 | |
parent | 112df06996dd88ac1d858c4c0c321d4c6e7bbf90 (diff) | |
download | mariadb-git-28777046b4dc3decd462a4a7a6d68c168b484635.tar.gz |
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.
-rw-r--r-- | sql/sql_select.cc | 2 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result | 14 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/t/rocksdb_parts.test | 19 |
3 files changed, 34 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 4746f186fe7..6450eb03d4d 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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); diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result index 9ac7243071b..2fde11c2a08 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result @@ -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; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_parts.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_parts.test index a0768667385..b8d41ae942a 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_parts.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_parts.test @@ -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; + |