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

Preserve 64-bit last insert rowids across triggers. (CVS 2779)

FossilOrigin-Name: 4dd7cfaa587fd5f76a0b60db0f02d5f57f801564
This commit is contained in:
drh
2005-11-25 02:43:50 +00:00
parent 91636d58c0
commit 94c1f6f731
4 changed files with 24 additions and 9 deletions

View File

@ -341,6 +341,21 @@ do_test lastinsert-7.6 {
}
} {0 1205}
do_test lastinsert-8.1 {
db close
sqlite3 db test.db
execsql {
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(a, b);
CREATE TRIGGER after_t2 AFTER INSERT ON t2 BEGIN
INSERT INTO t3 VALUES(new.x, new.y);
END;
INSERT INTO t2 VALUES(5000000000, 1);
SELECT last_insert_rowid();
}
} 5000000000
} ;# ifcapable (view && trigger)
finish_test