diff options
Diffstat (limited to '')
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/t/rocksdb_row_stats.test | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_row_stats.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_row_stats.test new file mode 100644 index 00000000..ebcc741f --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_row_stats.test @@ -0,0 +1,57 @@ +source include/have_rocksdb.inc; +create table t1 (a int primary key) engine=rocksdb; + +-- echo Verify rocksdb_rows_inserted +select variable_value into @old_rows_inserted from information_schema.global_status where variable_name = 'rocksdb_rows_inserted'; +insert into t1 values(1); +select variable_value into @new_rows_inserted from information_schema.global_status where variable_name = 'rocksdb_rows_inserted'; +select @new_rows_inserted - @old_rows_inserted; + +-- echo Verify rocksdb_rows_updated +select variable_value into @old_rows_updated from information_schema.global_status where variable_name = 'rocksdb_rows_updated'; +update t1 set a=2 where a=1; +select variable_value into @new_rows_updated from information_schema.global_status where variable_name = 'rocksdb_rows_updated'; +select @new_rows_updated - @old_rows_updated; + +-- echo Verify rocksdb_rows_read +select variable_value into @old_rows_read from information_schema.global_status where variable_name = 'rocksdb_rows_read'; +select * from t1; +select variable_value into @new_rows_read from information_schema.global_status where variable_name = 'rocksdb_rows_read'; +select @new_rows_read - @old_rows_read; + +-- echo Verify rocksdb_rows_deleted +select variable_value into @old_rows_deleted from information_schema.global_status where variable_name = 'rocksdb_rows_deleted'; +delete from t1; +select variable_value into @new_rows_deleted from information_schema.global_status where variable_name = 'rocksdb_rows_deleted'; +select @new_rows_deleted - @old_rows_deleted; + +use mysql; +create table t1(a int primary key) engine=rocksdb; + +-- echo Verify rocksdb_system_rows_inserted +select variable_value into @old_system_rows_inserted from information_schema.global_status where variable_name = 'rocksdb_system_rows_inserted'; +insert into t1 values(1); +select variable_value into @new_system_rows_inserted from information_schema.global_status where variable_name = 'rocksdb_system_rows_inserted'; +select @new_system_rows_inserted - @old_system_rows_inserted; + +-- echo Verify rocksdb_system_rows_updated +select variable_value into @old_system_rows_updated from information_schema.global_status where variable_name = 'rocksdb_system_rows_updated'; +update t1 set a=2 where a=1; +select variable_value into @new_system_rows_updated from information_schema.global_status where variable_name = 'rocksdb_system_rows_updated'; +select @new_system_rows_updated - @old_system_rows_updated; + +-- echo Verify rocksdb_system_rows_read +select variable_value into @old_system_rows_read from information_schema.global_status where variable_name = 'rocksdb_system_rows_read'; +select * from t1; +select variable_value into @new_system_rows_read from information_schema.global_status where variable_name = 'rocksdb_system_rows_read'; +select @new_system_rows_read - @old_system_rows_read; + +-- echo Verify rocksdb_system_rows_deleted +select variable_value into @old_system_rows_deleted from information_schema.global_status where variable_name = 'rocksdb_system_rows_deleted'; +delete from t1; +select variable_value into @new_system_rows_deleted from information_schema.global_status where variable_name = 'rocksdb_system_rows_deleted'; +select @new_system_rows_deleted - @old_system_rows_deleted; + +drop table t1; +use test; +drop table t1; |