Rollback doc example

This commit is contained in:
Jordi Villar 2024-05-17 18:03:51 +02:00
parent acba6fd7a2
commit 16889ff032

View File

@ -124,21 +124,16 @@ select * from myThirdReplacingMT final;
0 rows in set. Elapsed: 0.003 sec.
-- A simple optimize + final does not delete rows with is_deleted
OPTIMIZE TABLE myThirdReplacingMT FINAL;
select * from myThirdReplacingMT;
┌─key─┬─someCol─┬───────────eventTime─┬─is_deleted─┐
│ 1 │ first │ 2020-01-01 01:01:01 │ 1 │
└─────┴─────────┴─────────────────────┴────────────┘
-- A cleanup optimize deletes rows with is_deleted
-- delete rows with is_deleted
OPTIMIZE TABLE myThirdReplacingMT FINAL CLEANUP;
select * from myThirdReplacingMT;
INSERT INTO myThirdReplacingMT Values (1, 'first', '2020-01-01 00:00:00', 0);
0 rows in set. Elapsed: 0.002 sec.
select * from myThirdReplacingMT final;
┌─key─┬─someCol─┬───────────eventTime─┬─is_deleted─┐
│ 1 │ first │ 2020-01-01 00:00:00 │ 0 │
└─────┴─────────┴─────────────────────┴────────────┘
```
## Query clauses