Lab: updates, deletes and protected history¶
Run on an isolated v4.2.5 instance with snapshot permissions. Names are dedicated to this lab.
DROP DATABASE IF EXISTS kernel_objects_518;
CREATE DATABASE kernel_objects_518;
USE kernel_objects_518;
CREATE TABLE t(id INT PRIMARY KEY, amount INT);
INSERT INTO t VALUES(1,10),(2,20),(3,30);
CREATE SNAPSHOT kernel_objects_sp_518 FOR TABLE kernel_objects_518 t;
UPDATE t SET amount=11 WHERE id=1;
DELETE FROM t WHERE id=2;
SELECT id,amount FROM t ORDER BY id;
SELECT id,amount FROM t{SNAPSHOT='kernel_objects_sp_518'} ORDER BY id;
DROP SNAPSHOT kernel_objects_sp_518;
DROP DATABASE kernel_objects_518;
Current rows: (1,11),(3,30); snapshot rows: (1,10),(2,20),(3,30). This validates SQL visibility, not actual Flush/Merge/GC activation.
Scale data with periodic updates/deletes. While retaining the snapshot, record data/tombstone objects, Flush/Merge, checkpoints and GC. Recheck current/history results each round; release the snapshot and observe reclamation. Immediate space reduction is not required: inspect other protection and background progress first.
Do not delete internal objects manually. Forced tasks require the target build’s test/management interface in isolation. Release the lab snapshot/database. See objects and GC.