mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Allow functions to be created when there are outstanding VMs.
(Ticket #926) Fix problems with sqlite3_errcode(). Add tests for sqlite3_errcode(). (CVS 1989) FossilOrigin-Name: d0f1dc5898382258b283308c2cce55a8bc378ee4
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
# focus of this script is testing the ATTACH and DETACH commands
|
||||
# and related functionality.
|
||||
#
|
||||
# $Id: auth.test,v 1.18 2004/09/09 13:55:51 drh Exp $
|
||||
# $Id: auth.test,v 1.19 2004/09/30 13:43:14 drh Exp $
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@@ -1732,7 +1732,7 @@ do_test auth-2.9.1 {
|
||||
} {1 {illegal return value (999) from the authorization function - should be SQLITE_OK, SQLITE_IGNORE, or SQLITE_DENY}}
|
||||
do_test auth-2.9.2 {
|
||||
db errorcode
|
||||
} {21}
|
||||
} {1}
|
||||
do_test auth-2.10 {
|
||||
proc auth {code arg1 arg2 arg3 arg4} {
|
||||
if {$code=="SQLITE_SELECT"} {
|
||||
|
@@ -13,7 +13,7 @@
|
||||
# This file implements tests for the SQLITE_MISUSE detection logic.
|
||||
# This test file leaks memory and file descriptors.
|
||||
#
|
||||
# $Id: misuse.test,v 1.6 2004/06/26 09:50:12 danielk1977 Exp $
|
||||
# $Id: misuse.test,v 1.7 2004/09/30 13:43:14 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -94,6 +94,9 @@ do_test misuse-2.1 {
|
||||
do_test misuse-2.2 {
|
||||
catchsql2 {SELECT * FROM t1}
|
||||
} {0 {a b 1 2}}
|
||||
|
||||
# We used to disallow creating new function from within an exec().
|
||||
# But now this is acceptable.
|
||||
do_test misuse-2.3 {
|
||||
set v [catch {
|
||||
db eval {SELECT * FROM t1} {} {
|
||||
@@ -101,15 +104,15 @@ do_test misuse-2.3 {
|
||||
}
|
||||
} msg]
|
||||
lappend v $msg
|
||||
} {1 {library routine called out of sequence}}
|
||||
} {0 {}}
|
||||
do_test misuse-2.4 {
|
||||
catchsql2 {SELECT * FROM t1}
|
||||
} {1 {library routine called out of sequence}}
|
||||
} {0 {a b 1 2}}
|
||||
do_test misuse-2.5 {
|
||||
catchsql {
|
||||
SELECT * FROM t1
|
||||
}
|
||||
} {1 {library routine called out of sequence}}
|
||||
} {0 {1 2}}
|
||||
|
||||
# Attempt to register a new SQL aggregate while an sqlite_exec() is active.
|
||||
#
|
||||
@@ -123,6 +126,9 @@ do_test misuse-3.1 {
|
||||
do_test misuse-3.2 {
|
||||
catchsql2 {SELECT * FROM t1}
|
||||
} {0 {a b 1 2}}
|
||||
|
||||
# We used to disallow creating new function from within an exec().
|
||||
# But now this is acceptable.
|
||||
do_test misuse-3.3 {
|
||||
set v [catch {
|
||||
db eval {SELECT * FROM t1} {} {
|
||||
@@ -130,15 +136,15 @@ do_test misuse-3.3 {
|
||||
}
|
||||
} msg]
|
||||
lappend v $msg
|
||||
} {1 {library routine called out of sequence}}
|
||||
} {0 {}}
|
||||
do_test misuse-3.4 {
|
||||
catchsql2 {SELECT * FROM t1}
|
||||
} {1 {library routine called out of sequence}}
|
||||
} {0 {a b 1 2}}
|
||||
do_test misuse-3.5 {
|
||||
catchsql {
|
||||
SELECT * FROM t1
|
||||
}
|
||||
} {1 {library routine called out of sequence}}
|
||||
} {0 {1 2}}
|
||||
|
||||
# Attempt to close the database from an sqlite_exec callback.
|
||||
#
|
||||
|
Reference in New Issue
Block a user