summaryrefslogtreecommitdiff
path: root/storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test')
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test75
1 files changed, 0 insertions, 75 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test b/storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test
index d5ee75686df..ee325b34eff 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test
@@ -5,81 +5,6 @@
drop table if exists t1, t2;
--enable_warnings
---echo #
---echo # Check that DECIMAL PK
---echo #
-create table t0(a int);
-insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-
---echo # First, make the server to create a dataset in the old format:
-set session debug= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
-create table t1 (
- pk1 decimal(32,16),
- pk2 decimal(32,16),
- pk3 decimal(32,16),
- a smallint not null,
- primary key(pk1, pk2, pk3)
-);
-insert into t1
-select
- A.a, B.a, C.a, 1234
-from t0 A, t0 B, t0 C;
-
---echo #
---echo # Looking at the table size, one can tell that the data is stored using
---echo # old format:
---echo #
-set global rocksdb_force_flush_memtable_now=1;
-
---let $data_length_old = query_get_value("select DATA_LENGTH from information_schema.tables where table_schema=database() and table_name='t1'", DATA_LENGTH, 1)
-
---echo # Check the format version:
-select table_name,index_name,kv_format_version
-from information_schema.ROCKSDB_DDL
-where TABLE_SCHEMA=database() AND table_name='t1';
-
-flush tables;
-
-set session debug= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
---source include/restart_mysqld.inc
-
---echo # Check that the new server reads the data in the old format:
-select * from t1 order by pk1,pk2,pk3 limit 5;
-
---echo #
---echo # Ok, now, enable the new data format:
---echo #
-create table t2 (
- pk1 decimal(32,16),
- pk2 decimal(32,16),
- pk3 decimal(32,16),
- a smallint not null,
- primary key(pk1, pk2, pk3)
-);
-insert into t2
-select
- A.a, B.a, C.a, 1234
-from t0 A, t0 B, t0 C;
-set global rocksdb_force_flush_memtable_now=1;
-
---let $data_length_new = query_get_value("select DATA_LENGTH from information_schema.tables where table_schema=database() and table_name='t2'", DATA_LENGTH, 1)
---disable_query_log
---eval select $data_length_old > $data_length_new as "larger"
---enable_query_log
-
---echo # This should show the new PK data fromat
-select table_name,index_name,kv_format_version from information_schema.ROCKSDB_DDL
-where TABLE_SCHEMA=database() AND table_name='t2';
-
---echo #
---echo # Check that the server is able to read BOTH the old and the new formats:
---echo #
-select * from t2 limit 3;
-select * from t1 limit 3;
-
-drop table t1,t2;
-drop table t0;
-
--echo #
--echo # Check that DECIMAL datatype supports 'index-only' scans and is decoded correctly.
--echo # (Decoding happens from the mem-comparable image in the index, regardless