mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
If sqlite3_column_value() is called to obtain a value with the MEM_Static flag set, clear it and set the MEM_Ephem flag before returning. Otherwise, if the value is passed to sqlite3_bind_value() or sqlite3_result_value(), sqlite may attempt to use the buffer after the statement has been finalized. This is not always valid, as MEM_Static only guarantees that a MEM.z buffer will be valid for the lifetime of the owner statement, not that it is actually a static buffer. (CVS 5812)
FossilOrigin-Name: b055bfc4e5268d8a66d6a4f5e8aec1285fe4b8e7
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
# This file experiments with recursion using the "test_eval()" SQL function
|
||||
# in order to make sure that SQLite is reentrant.
|
||||
#
|
||||
# $Id: eval.test,v 1.1 2008/07/11 21:02:54 drh Exp $
|
||||
# $Id: eval.test,v 1.2 2008/10/13 10:37:50 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -68,4 +68,8 @@ do_test eval-3.1 {
|
||||
}
|
||||
} {1 {} 102 2 {} 103 3 {} 104 4 {} 105}
|
||||
|
||||
do_test eval-4.1 {
|
||||
execsql { SELECT test_eval('SELECT "abcdefghij"') }
|
||||
} {abcdefghij}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user