mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix a problem in the shell tool. In some cases sqlite3_errmsg() was being called before sqlite3_finalize(), causing error messages to be more generic than they should be.
FossilOrigin-Name: e5d07045fabe0803715cfb291aa9e971235cb08a
This commit is contained in:
@ -195,7 +195,7 @@ do_test shell1-1.15.3 {
|
||||
# -version show SQLite version
|
||||
do_test shell1-1.16.1 {
|
||||
catchcmd "-version test.db" ""
|
||||
} {0 3.6.21}
|
||||
} {0 3.6.22}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Test cases shell1-2.*: Basic "dot" command token parsing.
|
||||
@ -703,4 +703,4 @@ do_test shell1-3.27.4 {
|
||||
} {1 {Error: unknown command or invalid arguments: "timer". Enter ".help" for help}}
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
|
@ -81,5 +81,21 @@ do_test shell2-1.2.1 {
|
||||
[regexp {Error: too many options: "select 4"} $msg]
|
||||
} {1 1}
|
||||
|
||||
# Test a problem reported on the mailing list. The shell was at one point
|
||||
# returning the generic SQLITE_ERROR message ("SQL error or missing database")
|
||||
# instead of the "too many levels..." message in the test below.
|
||||
#
|
||||
do_test shell2-1.3 {
|
||||
catchcmd "-batch test.db" {
|
||||
PRAGMA recursive_triggers = ON;
|
||||
CREATE TABLE t5(a PRIMARY KEY, b, c);
|
||||
INSERT INTO t5 VALUES(1, 2, 3);
|
||||
CREATE TRIGGER au_tble AFTER UPDATE ON t5 BEGIN
|
||||
UPDATE OR IGNORE t5 SET a = new.a, c = 10;
|
||||
END;
|
||||
|
||||
UPDATE OR REPLACE t5 SET a = 4 WHERE a = 1;
|
||||
}
|
||||
} {1 {Error: near line 9: too many levels of trigger recursion}}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user