mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix a bug in the sqlite3_changes() function reported on the mailing list. (CVS 3868)
FossilOrigin-Name: 58ea768c3e9905bd9db137f1b31dd3dd6c6001d0
This commit is contained in:
@ -50,8 +50,19 @@ do_test laststmtchanges-1.2 {
|
||||
}
|
||||
} {0 {5 13}}
|
||||
|
||||
# There was some goofy change-counting logic in sqlite3_exec() that
|
||||
# appears to have been left over from SQLite version 2. This test
|
||||
# makes sure it has been removed.
|
||||
#
|
||||
do_test laststmtchanges-1.2.1 {
|
||||
db cache flush
|
||||
sqlite3_exec_printf db {update t0 set x=4 where x=3; select 1;} {}
|
||||
execsql {select changes()}
|
||||
} {5}
|
||||
|
||||
# changes() unchanged within an update statement
|
||||
do_test laststmtchanges-1.3 {
|
||||
execsql {update t0 set x=3 where x=4}
|
||||
catchsql {
|
||||
update t0 set x=x+changes() where x=3;
|
||||
select count() from t0 where x=8;
|
||||
|
Reference in New Issue
Block a user