summaryrefslogtreecommitdiff
path: root/storage/rocksdb/mysql-test/rocksdb/r/read_only_tx.result
blob: b83f0a474ccb07b52f4e4fedb5d2cf7dd462824f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT, value int, PRIMARY KEY (id), INDEX (value)) ENGINE=RocksDB;
INSERT INTO t1 VALUES (1,1);
select variable_value into @p from information_schema.global_status where variable_name='rocksdb_number_sst_entry_put';
select variable_value into @s from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete';
START TRANSACTION WITH CONSISTENT ROCKSDB SNAPSHOT;
File	Position	Gtid_executed
master-bin.000001	734	uuid:1-3
select case when variable_value-@p < 1000 then 'true' else variable_value-@p end from information_schema.global_status where variable_name='rocksdb_number_sst_entry_put';
case when variable_value-@p < 1000 then 'true' else variable_value-@p end
true
select case when variable_value-@s < 100 then 'true' else variable_value-@s end from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete';
case when variable_value-@s < 100 then 'true' else variable_value-@s end
true
SELECT * FROM t1;
id	value
1	1
INSERT INTO t1 values (2, 2);
ERROR HY000: Can't execute updates when you started a transaction with START TRANSACTION WITH CONSISTENT [ROCKSDB] SNAPSHOT.
ROLLBACK;
SELECT * FROM t1;
id	value
1	10001
INSERT INTO t1 values (2, 2);
SELECT * FROM t1 ORDER BY id;
id	value
1	10001
2	2
BEGIN;
SELECT COUNT(*) FROM t1;
COUNT(*)
9998
COMMIT;
OPTIMIZE TABLE t1;
Table	Op	Msg_type	Msg_text
test.t1	optimize	status	OK
DROP TABLE t1;
reset master;