1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Make sure the sqlite3_trace() callback is invoked, even if the prepared

statement was marked "expired" before it ever entered sqlite3_step().
Ticket [11d5aa455e0d98f3c1e6a08].

FossilOrigin-Name: 0d4d3df4bc5e75ce1543b5539a1e9e279d2a062f
This commit is contained in:
drh
2014-08-19 20:27:40 +00:00
parent 4b2590e44b
commit 2c7946a485
4 changed files with 29 additions and 11 deletions

View File

@ -48,6 +48,22 @@ do_test trace-1.5 {
db trace {}
db trace
} {}
do_test trace-1.6 {
db eval {
CREATE TABLE t1b(x TEXT PRIMARY KEY, y);
INSERT INTO t1b VALUES('abc','def'),('ghi','jkl'),('mno','pqr');
}
set ::stmtlist {}
set xyzzy a*
db trace trace_proc
db eval {
SELECT y FROM t1b WHERE x GLOB $xyzzy
}
} {def}
do_test trace-1.7 {
set ::stmtlist
} {{SELECT y FROM t1b WHERE x GLOB 'a*'}}
db trace {}
# If we prepare a statement and execute it multiple times, the trace
# happens on each execution.