Overview
Artifact ID: | 0acc8b258a4e123cc90f019b95be4470bf21ab9ac55177e1a8369a264f5afad3 |
---|---|
Ticket: | 596d059af77f249314159d608e7449c899ea0764
Committing a transaction with a failed ALTER TABLE may subtly corrupt schema |
User & Date: | dan 2019-03-15 15:43:08 |
Changes
- icomment:
<verbatim> CREATE TABLE t1(a, b); CREATE TABLE t3(e, f); CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN INSERT INTO t2 VALUES(new.a, new.b); END; BEGIN; ALTER TABLE t3 RENAME TO t4; COMMIT; SELECT * FROM sqlite_master WHERE type='table' AND name!='t1'; </verbatim> The output of the above script is: <verbatim> table|t3|t3|3|CREATE TABLE "t4"(e, f) </verbatim> The schema is now corrupt - as the table name in the SQL does not match the table names in the "name" and "tbl_name" columns.
- login: "dan"
- mimetype: "text/x-fossil-wiki"
- severity changed to: "Critical"
- status changed to: "Open"
- title changed to:
Committing a transaction with a failed ALTER TABLE may subtly corrupt schema
- type changed to: "Code_Defect"