DROP TABLE IF EXISTS test.t1;
CREATE TABLE test.t1(id INT);
START TRANSACTION;
INSERT INTO test.t1 VALUES (1);
SELECT 1;
1
1
INSERT INTO test.t1 VALUES (1);
COMMIT;
SHOW STATUS LIKE 'COM_INSERT';
Variable_name	Value
Com_insert	0
SHOW STATUS LIKE 'COM_LOAD';
Variable_name	Value
Com_load	2
SELECT COUNT(*) FROM test.t1;
COUNT(*)
2
DELETE FROM test.t1;
FLUSH STATUS;
INSERT INTO test.t1 VALUES (1);
INSERT INTO test.t1 VALUES (1);
START TRANSACTION;
INSERT INTO test.t1 VALUES (1);
COMMIT;
INSERT INTO test.t1 VALUES (1);
INSERT INTO test.t1 VALUES (1);
SHOW STATUS LIKE 'COM_INSERT';
Variable_name	Value
Com_insert	4
SHOW STATUS LIKE 'COM_LOAD';
Variable_name	Value
Com_load	1
SELECT COUNT(*) FROM test.t1;
COUNT(*)
5
DELETE FROM test.t1;
FLUSH STATUS;
INSERT INTO test.t1 VALUES (1);
INSERT INTO test.t1 VALUES (1);
SELECT COUNT(*) FROM test.t1;
COUNT(*)
2
START TRANSACTION;
INSERT INTO test.t1 VALUES (1);
SELECT COUNT(*) FROM test.t1;
COUNT(*)
3
UPDATE test.t1 SET id = 0;
DELETE FROM test.t1;
COMMIT;
SELECT COUNT(*) FROM test.t1;
COUNT(*)
0
INSERT INTO test.t1 VALUES (1);
INSERT INTO test.t1 VALUES (1);
SHOW STATUS LIKE 'COM_INSERT';
Variable_name	Value
Com_insert	4
SHOW STATUS LIKE 'COM_LOAD';
Variable_name	Value
Com_load	1
SELECT COUNT(*) FROM test.t1;
COUNT(*)
2
DELETE FROM test.t1;
FLUSH STATUS;
DROP TABLE test.t1;
