mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix an assertion fault that can occur while autovacuuming a corrupt database
file. Add the SQLITE_OMIT_COMPLETE compile-time parameter. (CVS 2361) FossilOrigin-Name: bb0e7e3857a06347b08d93553ac603e737322262
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
# various suported unicode encodings (UTF-8, UTF-16, UTF-16le and
|
||||
# UTF-16be).
|
||||
#
|
||||
# $Id: enc2.test,v 1.21 2005/02/13 23:34:25 drh Exp $
|
||||
# $Id: enc2.test,v 1.22 2005/02/26 17:31:28 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -448,11 +448,13 @@ proc utf16 {utf8} {
|
||||
append utf16 "\x00\x00"
|
||||
return $utf16
|
||||
}
|
||||
do_test enc2-8.1 {
|
||||
sqlite3_complete16 [utf16 "SELECT * FROM t1;"]
|
||||
} {1}
|
||||
do_test enc2-8.2 {
|
||||
sqlite3_complete16 [utf16 "SELECT * FROM"]
|
||||
} {0}
|
||||
ifcapable {complete} {
|
||||
do_test enc2-8.1 {
|
||||
sqlite3_complete16 [utf16 "SELECT * FROM t1;"]
|
||||
} {1}
|
||||
do_test enc2-8.2 {
|
||||
sqlite3_complete16 [utf16 "SELECT * FROM"]
|
||||
} {0}
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
@@ -11,11 +11,15 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is exercising the code in main.c.
|
||||
#
|
||||
# $Id: main.test,v 1.19 2005/01/11 17:46:42 drh Exp $
|
||||
# $Id: main.test,v 1.20 2005/02/26 17:31:28 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
# Only do the next group of tests if the sqlite3_complete API is available
|
||||
#
|
||||
ifcapable {complete} {
|
||||
|
||||
# Tests of the sqlite_complete() function.
|
||||
#
|
||||
do_test main-1.1 {
|
||||
@@ -239,6 +243,8 @@ do_test main-1.36 {
|
||||
db complete {hi there/***/;}
|
||||
} {1}
|
||||
|
||||
} ;# end ifcapable {complete}
|
||||
|
||||
|
||||
# Try to open a database with a corrupt database file.
|
||||
#
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# interface is pretty well tested. This file contains some addition
|
||||
# tests for fringe issues that the main test suite does not cover.
|
||||
#
|
||||
# $Id: tclsqlite.test,v 1.37 2005/01/24 00:28:43 drh Exp $
|
||||
# $Id: tclsqlite.test,v 1.38 2005/02/26 17:31:28 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -96,10 +96,12 @@ do_test tcl-1.12 {
|
||||
set v [catch {db commit_hook a b c} msg]
|
||||
lappend v $msg
|
||||
} {1 {wrong # args: should be "db commit_hook ?CALLBACK?"}}
|
||||
do_test tcl-1.13 {
|
||||
set v [catch {db complete} msg]
|
||||
lappend v $msg
|
||||
} {1 {wrong # args: should be "db complete SQL"}}
|
||||
ifcapable {complete} {
|
||||
do_test tcl-1.13 {
|
||||
set v [catch {db complete} msg]
|
||||
lappend v $msg
|
||||
} {1 {wrong # args: should be "db complete SQL"}}
|
||||
}
|
||||
do_test tcl-1.14 {
|
||||
set v [catch {db eval} msg]
|
||||
lappend v $msg
|
||||
|
Reference in New Issue
Block a user