| Index: third_party/sqlite/src/test/tclsqlite.test
|
| diff --git a/third_party/sqlite/src/test/tclsqlite.test b/third_party/sqlite/src/test/tclsqlite.test
|
| index 8d7fea0d2a6d61676d59e40c393456e77dc33dc8..bdb0fc56d118bfcbb5deb8b98fb46f7e5fe7939d 100644
|
| --- a/third_party/sqlite/src/test/tclsqlite.test
|
| +++ b/third_party/sqlite/src/test/tclsqlite.test
|
| @@ -22,10 +22,9 @@ source $testdir/tester.tcl
|
|
|
| # Check the error messages generated by tclsqlite
|
| #
|
| +set r "sqlite_orig HANDLE FILENAME ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN? ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN? ?-uri BOOLEAN?"
|
| if {[sqlite3 -has-codec]} {
|
| - set r "sqlite_orig HANDLE FILENAME ?-key CODEC-KEY?"
|
| -} else {
|
| - set r "sqlite_orig HANDLE FILENAME ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN? ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN? ?-uri BOOLEAN?"
|
| + append r " ?-key CODECKEY?"
|
| }
|
| do_test tcl-1.1 {
|
| set v [catch {sqlite3 bogus} msg]
|
| @@ -35,7 +34,7 @@ do_test tcl-1.1 {
|
| do_test tcl-1.2 {
|
| set v [catch {db bogus} msg]
|
| lappend v $msg
|
| -} {1 {bad option "bogus": must be authorizer, backup, busy, cache, changes, close, collate, collation_needed, commit_hook, complete, copy, enable_load_extension, errorcode, eval, exists, function, incrblob, interrupt, last_insert_rowid, nullvalue, onecolumn, profile, progress, rekey, restore, rollback_hook, status, timeout, total_changes, trace, transaction, unlock_notify, update_hook, version, or wal_hook}}
|
| +} {1 {bad option "bogus": must be authorizer, backup, busy, cache, changes, close, collate, collation_needed, commit_hook, complete, copy, enable_load_extension, errorcode, eval, exists, function, incrblob, interrupt, last_insert_rowid, nullvalue, onecolumn, preupdate, profile, progress, rekey, restore, rollback_hook, status, timeout, total_changes, trace, trace_v2, transaction, unlock_notify, update_hook, version, or wal_hook}}
|
| do_test tcl-1.2.1 {
|
| set v [catch {db cache bogus} msg]
|
| lappend v $msg
|
| @@ -636,6 +635,39 @@ do_test tcl-14.2 {
|
| db one {SELECT x FROM t6 WHERE xCall()!='value'}
|
| } {}
|
|
|
| +# Verify that the "exists" and "onecolumn" methods work when
|
| +# a "profile" is registered.
|
| +#
|
| +catch {db close}
|
| +sqlite3 db :memory:
|
| +proc noop-profile {args} {
|
| + return
|
| +}
|
| +do_test tcl-15.0 {
|
| + db eval {CREATE TABLE t1(a); INSERT INTO t1 VALUES(1),(2),(3);}
|
| + db onecolumn {SELECT a FROM t1 WHERE a>2}
|
| +} {3}
|
| +do_test tcl-15.1 {
|
| + db exists {SELECT a FROM t1 WHERE a>2}
|
| +} {1}
|
| +do_test tcl-15.2 {
|
| + db exists {SELECT a FROM t1 WHERE a>3}
|
| +} {0}
|
| +db profile noop-profile
|
| +do_test tcl-15.3 {
|
| + db onecolumn {SELECT a FROM t1 WHERE a>2}
|
| +} {3}
|
| +do_test tcl-15.4 {
|
| + db exists {SELECT a FROM t1 WHERE a>2}
|
| +} {1}
|
| +do_test tcl-15.5 {
|
| + db exists {SELECT a FROM t1 WHERE a>3}
|
| +} {0}
|
| +
|
| +
|
| +
|
| +
|
| +
|
|
|
|
|
| finish_test
|
|
|