EVOLUTION-MANAGER
Edit File: show_table_status.test
--source include/have_rocksdb.inc --source include/not_windows.inc # decorated database names is too long, exceeded OS limits # # SHOW TABLE STATUS statement # ################################### # TODO: # The result file is likely to change # if MDEV-4197 is fixed ################################### --disable_warnings DROP TABLE IF EXISTS t1, t2, t3; --enable_warnings CREATE TABLE t1 (a INT, b CHAR(8) PRIMARY KEY) ENGINE=rocksdb; INSERT INTO t1 (a,b) VALUES (100,'a'),(2,'foo'); CREATE TABLE t2 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb; INSERT INTO t2 (a,b) VALUES (1,'bar'); set global rocksdb_force_flush_memtable_now = true; CREATE TABLE t3 (a INT, b CHAR(8), pk INT PRIMARY KEY) ENGINE=rocksdb CHARACTER SET utf8; --replace_column 6 # 7 # SHOW TABLE STATUS WHERE name IN ( 't1', 't2', 't3' ); # Some statistics don't get updated as quickly. The Data_length and # Avg_row_length are trailing statistics, meaning they don't get updated # for the current SST until the next SST is written. Insert a bunch of data, # then flush, then insert a bit more and do another flush to get them to show # up. --disable_query_log let $count = 2; let $max = 10000; while ($count < $max) { eval INSERT INTO t2 (a) VALUES ($count); inc $count; } set global rocksdb_force_flush_memtable_now = true; eval INSERT INTO t2 (a) VALUES ($max); set global rocksdb_force_flush_memtable_now = true; --enable_query_log # We expect the number of rows to be 10000. Data_len and Avg_row_len # may vary, depending on built-in compression library. --replace_column 6 # 7 # SHOW TABLE STATUS WHERE name LIKE 't2'; DROP TABLE t1, t2, t3; # # Confirm that long db and table names work. # CREATE DATABASE `db_new..............................................end`; USE `db_new..............................................end`; CREATE TABLE `t1_new..............................................end`(a int) engine=rocksdb; INSERT INTO `t1_new..............................................end` VALUES (1); --query_vertical SELECT TABLE_SCHEMA, TABLE_NAME FROM information_schema.table_statistics WHERE TABLE_NAME = 't1_new..............................................end' DROP DATABASE `db_new..............................................end`;