diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2018-05-19 00:26:35 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2018-05-19 00:26:35 +0300 |
commit | dd51082eca82fe7b61ee2e62f75b84c39f180450 (patch) | |
tree | 98c4856b91c3948f249b47bb9357b0620523915c /storage | |
parent | 06aaaef51a90cf21f9361ca6901cfc1ab854e5b9 (diff) | |
download | mariadb-git-dd51082eca82fe7b61ee2e62f75b84c39f180450.tar.gz |
MDEV-12465: Server crashes in my_scan_weight_utf8_bin upon collecting stats for RocksDB table
Apply patch by Oleksandr Byelkin:
Do not use "only index read" in analyzing indices if there is a field which present in the index only partially.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result | 26 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/t/analyze_table.test | 26 |
2 files changed, 52 insertions, 0 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result b/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result index ff2973230db..b666a17c81c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result @@ -27,3 +27,29 @@ ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze status OK DROP TABLE t1; +# +# MDEV-12465: Server crashes in my_scan_weight_utf8_bin upon +# collecting stats for RocksDB table +# +CREATE TABLE t1 ( +pk INT, +f1 CHAR(255), +f2 TEXT, +f3 VARCHAR(255), +f4 TEXT, +PRIMARY KEY (pk), +KEY (f4(255)) +) ENGINE=RocksDB +CHARSET utf8 +COLLATE utf8_bin +PARTITION BY KEY (pk) PARTITIONS 2; +INSERT INTO t1 VALUES +(1,'foo','bar','foo','bar'), (2,'bar','foo','bar','foo'); +ANALYZE TABLE t1 PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze Warning Engine-independent statistics are not collected for column 'f2' +test.t1 analyze Warning Engine-independent statistics are not collected for column 'f4' +test.t1 analyze status OK +drop table t1; +# End of 10.2 tests diff --git a/storage/rocksdb/mysql-test/rocksdb/t/analyze_table.test b/storage/rocksdb/mysql-test/rocksdb/t/analyze_table.test index 10722194121..b24398b1fe2 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/analyze_table.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/analyze_table.test @@ -1,4 +1,5 @@ --source include/have_rocksdb.inc +--source include/have_partition.inc # # ANALYZE TABLE statements @@ -29,3 +30,28 @@ INSERT INTO t1 VALUES (5,8),(6,10),(7,11),(8,12); ANALYZE TABLE t1; DROP TABLE t1; +--echo # +--echo # MDEV-12465: Server crashes in my_scan_weight_utf8_bin upon +--echo # collecting stats for RocksDB table +--echo # + +CREATE TABLE t1 ( + pk INT, + f1 CHAR(255), + f2 TEXT, + f3 VARCHAR(255), + f4 TEXT, + PRIMARY KEY (pk), + KEY (f4(255)) +) ENGINE=RocksDB + CHARSET utf8 + COLLATE utf8_bin + PARTITION BY KEY (pk) PARTITIONS 2; +INSERT INTO t1 VALUES +(1,'foo','bar','foo','bar'), (2,'bar','foo','bar','foo'); + +ANALYZE TABLE t1 PERSISTENT FOR ALL; + +drop table t1; + +--echo # End of 10.2 tests |