--source include/have_rocksdb.inc

# Issue 900 : Segmentation fault in myrocks::Rdb_string_reader::read
CREATE TABLE t1(c1 VARCHAR(1) CHARACTER SET 'utf8' COLLATE 'utf8_bin', c2 YEAR, c3 REAL(1,0) UNSIGNED, PRIMARY KEY(c1)) ENGINE=RocksDB;
INSERT INTO t1 VALUES(0,'0','0');
INSERT INTO t1 VALUES('{0}','0','0');
INSERT INTO t1 VALUES('1','0','1');
# Would segfault here
--error ER_DUP_ENTRY
ALTER TABLE t1 ADD INDEX(c3), ADD UNIQUE (c3);
--error ER_KEY_DOES_NOT_EXISTS
SELECT c3 FROM t1 FORCE INDEX(c3) ORDER BY c3;
DROP TABLE t1;
