1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add tests for sqlite_rename_quotefix(). Fix a memory leak in the same.

FossilOrigin-Name: 531550056c38589c99c9a97b6afdbf8f34ff8d2131d74e9d42af3506e8045064
This commit is contained in:
dan
2021-03-16 18:24:49 +00:00
parent 2ad080aa82
commit 1fffa73ea2
5 changed files with 69 additions and 12 deletions

View File

@ -22,6 +22,14 @@ ifcapable !altertable {
}
do_execsql_test 1.0 {
CREATE TABLE x1(
one, two, three, PRIMARY KEY(one),
CHECK (three!="xyz"), CHECK (two!="one")
) WITHOUT ROWID;
CREATE INDEX x1i ON x1(one+"two"+"four") WHERE "five";
CREATE TEMP TRIGGER AFTER INSERT ON x1 BEGIN
UPDATE x1 SET two=new.three || "new" WHERE one=new.one||"";
END;
CREATE TABLE t1(a, b, c, d, PRIMARY KEY(d, b)) WITHOUT ROWID;
INSERT INTO t1 VALUES(1, 2, 3, 4);
}