CREATE TABLE t1 (i INT PRIMARY KEY, j INT) ENGINE = ROCKSDB;
INSERT INTO t1 VALUES (1,2), (2,4), (3,6), (4,8), (5,10);
SET debug_sync= 'rocksdb.commit_in_place_alter_table WAIT_FOR flushed';
ALTER TABLE t1 ADD INDEX kj(j), ALGORITHM=INPLACE;
SET GLOBAL rocksdb_force_flush_memtable_now = 1;
SET debug_sync= 'now SIGNAL flushed';
SELECT * FROM INFORMATION_SCHEMA.ROCKSDB_INDEX_FILE_MAP
WHERE INDEX_NUMBER =
(SELECT INDEX_NUMBER FROM INFORMATION_SCHEMA.ROCKSDB_DDL
WHERE TABLE_NAME = 't1' AND INDEX_NAME = "PRIMARY");
COLUMN_FAMILY	INDEX_NUMBER	SST_NAME	NUM_ROWS	DATA_SIZE	ENTRY_DELETES	ENTRY_SINGLEDELETES	ENTRY_MERGES	ENTRY_OTHERS	DISTINCT_KEYS_PREFIX
#	#	SSTNAME	5	#	#	#	#	#	5
SELECT * FROM INFORMATION_SCHEMA.ROCKSDB_INDEX_FILE_MAP
WHERE INDEX_NUMBER =
(SELECT INDEX_NUMBER FROM INFORMATION_SCHEMA.ROCKSDB_DDL
WHERE TABLE_NAME = 't1' AND INDEX_NAME = "kj");
COLUMN_FAMILY	INDEX_NUMBER	SST_NAME	NUM_ROWS	DATA_SIZE	ENTRY_DELETES	ENTRY_SINGLEDELETES	ENTRY_MERGES	ENTRY_OTHERS	DISTINCT_KEYS_PREFIX
#	#	SSTNAME	5	#	#	#	#	#	5,5
SET debug_sync='RESET';
DROP TABLE t1;
