1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Ensure that all auxiliary data registered by calls to sqlite3_set_auxdata() is destroyed when the VM is halted. Partial fix for [406d3b2ef9].

FossilOrigin-Name: 71effa59c98d167e6e4b269e59ad5f468e664ac1
This commit is contained in:
dan
2013-07-18 17:12:08 +00:00
parent 1ac87e1e81
commit 0c5477997b
8 changed files with 112 additions and 88 deletions

View File

@ -682,6 +682,32 @@ do_test func-13.7 {
lappend res [sqlite3_finalize $STMT]
} {{0 0} {1 0} SQLITE_OK}
# Test that auxiliary data is discarded when a statement is reset.
do_execsql_test 13.8.1 {
SELECT test_auxdata('constant') FROM t4;
} {0 1}
do_execsql_test 13.8.2 {
SELECT test_auxdata('constant') FROM t4;
} {0 1}
db cache flush
do_execsql_test 13.8.3 {
SELECT test_auxdata('constant') FROM t4;
} {0 1}
set V "one"
do_execsql_test 13.8.4 {
SELECT test_auxdata($V), $V FROM t4;
} {0 one 1 one}
set V "two"
do_execsql_test 13.8.5 {
SELECT test_auxdata($V), $V FROM t4;
} {0 two 1 two}
db cache flush
set V "three"
do_execsql_test 2.3 {
SELECT test_auxdata($V), $V FROM t4;
} {0 three 1 three}
# Make sure that a function with a very long name is rejected
do_test func-14.1 {
catch {