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

Fix for an UPDATE on a virtual table when the WHERE clause matches zero rows.

Ticket #2244. (CVS 3652)

FossilOrigin-Name: 43bf797842f00a104f5c5619ad3215edddfc641b
This commit is contained in:
danielk1977
2007-02-21 16:52:12 +00:00
parent 0d5359b9d8
commit b77ff0139e
4 changed files with 38 additions and 12 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is creating and dropping virtual tables.
#
# $Id: vtab1.test,v 1.39 2007/01/09 14:01:14 drh Exp $
# $Id: vtab1.test,v 1.40 2007/02/21 16:52:12 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -889,6 +889,29 @@ do_test vtab1.11-5 {
SELECT glob(a,'2') FROM e
}
} {{2 1} {2 2}}
# See ticket #2244
#
do_test vtab1.2244-1 {
execsql {
CREATE TABLE t2244(a, b);
CREATE VIRTUAL TABLE t2244e USING echo(t2244);
INSERT INTO t2244 VALUES('AA', 'BB');
INSERT INTO t2244 VALUES('CC', 'DD');
SELECT rowid, * FROM t2244e;
}
} {1 AA BB 2 CC DD}
do_test vtab1.2244-2 {
execsql {
SELECT * FROM t2244e WHERE rowid = 10;
}
} {}
do_test vtab1.2244-3 {
execsql {
UPDATE t2244e SET a = 'hello world' WHERE 0;
SELECT rowid, * FROM t2244e;
}
} {1 AA BB 2 CC DD}
unset -nocomplain echo_module_begin_fail
finish_test