mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix for explicitly inserting a NULL value into the rowid column of a virtual table. (CVS 5343)
FossilOrigin-Name: a7f3b431669f7392a6acba8cd8f3fa5297a916b5
This commit is contained in:
@ -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.53 2008/06/16 06:31:35 danielk1977 Exp $
|
||||
# $Id: vtab1.test,v 1.54 2008/07/04 10:56:08 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -1081,5 +1081,30 @@ do_test vtab1-14.4 {
|
||||
set echo_module
|
||||
} [list xBestIndex {SELECT rowid, * FROM 'c'} xFilter {SELECT rowid, * FROM 'c'}]
|
||||
|
||||
do_test vtab1-15.1 {
|
||||
execsql {
|
||||
CREATE TABLE t1(a, b, c);
|
||||
CREATE VIRTUAL TABLE echo_t1 USING echo(t1);
|
||||
}
|
||||
} {}
|
||||
do_test vtab1-15.2 {
|
||||
execsql {
|
||||
INSERT INTO echo_t1(rowid) VALUES(45);
|
||||
SELECT rowid, * FROM echo_t1;
|
||||
}
|
||||
} {45 {} {} {}}
|
||||
do_test vtab1-15.3 {
|
||||
execsql {
|
||||
INSERT INTO echo_t1(rowid) VALUES(NULL);
|
||||
SELECT rowid, * FROM echo_t1;
|
||||
}
|
||||
} {45 {} {} {} 46 {} {} {}}
|
||||
do_test vtab1-15.4 {
|
||||
catchsql {
|
||||
INSERT INTO echo_t1(rowid) VALUES('new rowid');
|
||||
}
|
||||
} {1 {datatype mismatch}}
|
||||
|
||||
|
||||
unset -nocomplain echo_module_begin_fail
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user