39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (id INT, value int, PRIMARY KEY (id), INDEX (value)) ENGINE=XEngine;
|
|
INSERT INTO t1 VALUES (1,1);
|
|
select variable_value into @p from performance_schema.global_status where variable_name='xengine_number_sst_entry_put';
|
|
select variable_value into @s from performance_schema.global_status where variable_name='xengine_number_sst_entry_singledelete';
|
|
START TRANSACTION WITH CONSISTENT XENGINE 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 performance_schema.global_status where variable_name='xengine_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 performance_schema.global_status where variable_name='xengine_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 [XENGINE] 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;
|