mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Added tests for sqlite3_changes after a DELETE. (CVS 1798)
FossilOrigin-Name: c01f13267f592dc2678e78ea45dadddcdc154f82
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing the DELETE FROM statement.
|
||||
#
|
||||
# $Id: delete.test,v 1.16 2004/06/19 00:16:31 drh Exp $
|
||||
# $Id: delete.test,v 1.17 2004/07/15 20:08:39 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -54,9 +54,12 @@ do_test delete-3.1.4 {
|
||||
do_test delete-3.1.5 {
|
||||
execsql {SELECT * FROM table1 ORDER BY f1}
|
||||
} {1 2 2 4 4 16}
|
||||
do_test delete-3.1.6 {
|
||||
do_test delete-3.1.6.1 {
|
||||
execsql {DELETE FROM table1 WHERE f1=2}
|
||||
} {1}
|
||||
do_test delete-3.1.6.2 {
|
||||
db changes
|
||||
} 1
|
||||
do_test delete-3.1.7 {
|
||||
execsql {SELECT * FROM table1 ORDER BY f1}
|
||||
} {1 2 4 16}
|
||||
@ -125,8 +128,11 @@ do_test delete-5.3 {
|
||||
}
|
||||
execsql {SELECT count(*) FROM table1}
|
||||
} {150}
|
||||
do_test delete-5.4 {
|
||||
do_test delete-5.4.1 {
|
||||
execsql "DELETE FROM table1 WHERE f1>50"
|
||||
db changes
|
||||
} [db one {SELECT count(*) FROM table1 WHERE f1>50}]
|
||||
do_test delete-5.4.2 {
|
||||
execsql {SELECT count(*) FROM table1}
|
||||
} {37}
|
||||
do_test delete-5.5 {
|
||||
@ -172,8 +178,11 @@ do_test delete-6.3 {
|
||||
do_test delete-6.4 {
|
||||
execsql {SELECT f1 FROM table2 WHERE f1<10 ORDER BY f1}
|
||||
} {1 2 3 4 5 6 7 8 9}
|
||||
do_test delete-6.5 {
|
||||
do_test delete-6.5.1 {
|
||||
execsql {DELETE FROM table1 WHERE f1>7}
|
||||
db changes
|
||||
} {2993}
|
||||
do_test delete-6.5.2 {
|
||||
execsql {SELECT f1 FROM table1 ORDER BY f1}
|
||||
} {1 2 3 4 5 6 7}
|
||||
do_test delete-6.6 {
|
||||
|
Reference in New Issue
Block a user