0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-12-12 14:23:38 +00:00
libsql/libsql-wal/tests/assets/fixtures/tkt-4ef7e3cfca.test
ad hoc ad79ef48a2
libsql wal tests (#1408)
* add tests

* add bench
2024-05-24 13:59:17 +00:00

37 lines
637 B
Plaintext

CREATE TABLE w(a);
CREATE TABLE x(a);
CREATE TABLE y(a);
CREATE TABLE z(a);
INSERT INTO x(a) VALUES(5);
INSERT INTO y(a) VALUES(10);
CREATE TRIGGER t AFTER INSERT ON w BEGIN
INSERT INTO z
SELECT (SELECT x.a + y.a FROM y) FROM x;
END;
INSERT INTO w VALUES('incorrect');
SELECT * FROM z;
CREATE TABLE w(a);
CREATE TABLE x(b);
CREATE TABLE y(a);
CREATE TABLE z(a);
INSERT INTO x(b) VALUES(5);
INSERT INTO y(a) VALUES(10);
CREATE TRIGGER t AFTER INSERT ON w BEGIN
INSERT INTO z
SELECT (SELECT x.b + y.a FROM y) FROM x;
END;
INSERT INTO w VALUES('assert');
SELECT * FROM z;