Error messages from virtual tables store on the sqlite3_vtab->zErrMsg field

are reported back up to the application interface and memory is reclaimed. (CVS 5466)

FossilOrigin-Name: 4a9dd5e782a363e93d4705fa3671bc6cf0bb5a33
This commit is contained in:
drh
2008-07-23 21:07:25 +00:00
parent 9a1ec1e3ae
commit 80cc85b3c2
5 changed files with 30 additions and 19 deletions
+6 -3
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.54 2008/07/04 10:56:08 danielk1977 Exp $
# $Id: vtab1.test,v 1.55 2008/07/23 21:07:25 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -1007,7 +1007,10 @@ do_test vtab1.12-1 {
# First test outside of a transaction.
do_test vtab1.12-2 {
catchsql { INSERT INTO echo_c SELECT * FROM b; }
} {1 {constraint failed}}
} {1 {echo-vtab-error: column a is not unique}}
do_test vtab1.12-2.1 {
sqlite3_errmsg db
} {echo-vtab-error: column a is not unique}
do_test vtab1.12-3 {
execsql { SELECT * FROM c }
} {3 G H}
@@ -1016,7 +1019,7 @@ do_test vtab1.12-3 {
do_test vtab1.12-4 {
execsql {BEGIN}
catchsql { INSERT INTO echo_c SELECT * FROM b; }
} {1 {constraint failed}}
} {1 {echo-vtab-error: column a is not unique}}
do_test vtab1.12-5 {
execsql { SELECT * FROM c }
} {3 G H}