Fix the xfer optimization for WITHOUT ROWID tables so that it correctly
updates the change count returned by sqlite3_changes(). FossilOrigin-Name: eff43715d1a3a9ce3fe5da194dbb76ec0c06e13c
This commit is contained in:
@@ -2081,4 +2081,20 @@ do_test without_rowid3-ce7c13.1.6 {
|
||||
}
|
||||
} {1 {FOREIGN KEY constraint failed}}
|
||||
|
||||
# Confirm that changes() works on WITHOUT ROWID tables that use the
|
||||
# xfer optimization.
|
||||
#
|
||||
db close
|
||||
sqlite3 db :memory:
|
||||
do_execsql_test without_rowid3-30.1 {
|
||||
CREATE TABLE t1(a,b,PRIMARY KEY(a,b)) WITHOUT ROWID;
|
||||
CREATE TABLE t2(a,b,PRIMARY KEY(a,b)) WITHOUT ROWID;
|
||||
INSERT INTO t1 VALUES(1,2),(3,4),(5,6);
|
||||
SELECT changes();
|
||||
} {3}
|
||||
do_execsql_test without_rowid3-30.2 {
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT changes();
|
||||
} {3}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user