-C Documentation\supdates.\s(CVS\s2796)
-D 2005-12-02T01:57:43
+C Add\sa\stest\sto\sverify\sthat\sbinding\stext\swith\sembedded\s'\\000'\sworks.\s\sAlso\ncomment\schanges\sin\sos.h.\s(CVS\s2797)
+D 2005-12-02T02:44:06
F Makefile.in e3c6b3a38d734d41574c04f2fc90d18de2b87102
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/main.c 7d719efe04b760c5e0faa9e910c6d4f00f85f2f3
F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
F src/os.c bdd3a2fd089777e7ad18b57c896f1141d5a0c1fd
-F src/os.h c5decb84948b4ec614903caa8da31ce86c25031e
+F src/os.h d5ae3f4c1c7731437b6cddec279b7c06f761c44e
F src/os_common.h d74a11728ad2444b6b695b94c28c06881f049e49
F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
F src/sqliteInt.h 4148c9778e350014c2e27b332d7a2ef7278fe62e
F src/table.c 486dcfce532685b53b5a2b5da8bba0ded6fb2316
F src/tclsqlite.c a497c3adfd2c85da6a934331ec0041e47884fbcb
-F src/test1.c 014f00eda1007e21631148e4168f00c9ee2568ae
+F src/test1.c 99b7c919ef00f57537554333329e4fdea513b001
F src/test2.c 36390cdfc70c08e5ee0b466d0654a117f398bbff
F src/test3.c f4e6a16a602091696619a1171bda25c0e3df49f7
F src/test4.c a8fd681e139e1c61f22a77d07fc3a99cb28fff3f
F test/between.test ca092fa28b665ca92172b182c6c360a92f7ca348
F test/bigfile.test ebc9ce9216e08bead63734ab816d0f27858f3b80
F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747
-F test/bind.test 3169339a9fb7aaa8244d0ed8651fe6b6796d809c
+F test/bind.test 4c68b9f37a98b274f365dae19ea6c16c76c2c1c5
F test/bindxfer.test 856830e9e5552b9882c9d5c6647f90e25bdae4ac
F test/blob.test 0b4ee6fef7a50685b88d921e2992606999510881
F test/btree.test 8aa7424aeec844df990273fe36447e5d7e407261
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P bd8740d1aecba69e1b5d64d43db07e8ad8841f07
-R 560e5f5f3270d23cafb702eb82b09cf1
+P 2ffb90c39d0b60de9a692326ca3f2595c1fc97d0
+R 002caed86b62b1fca9bd7852b43785e4
U drh
-Z 01e62cd8f9861c89dbbdef8038a0568c
+Z 4dfc99bb0a2a6963cbe2162482887434
-2ffb90c39d0b60de9a692326ca3f2595c1fc97d0
\ No newline at end of file
+31251a9098662ccf08af5bd5bc3afb282a149701
\ No newline at end of file
/*
** The OsFile object describes an open disk file in an OS-dependent way.
-** The version of OsFile defined here is a generic versions. Each Os
+** The version of OsFile defined here is a generic version. Each OS
** implementation defines its own subclass of this structure that contains
-** additional information needed to handle file I/O.
+** additional information needed to handle file I/O. But the pMethod
+** entry (pointing to the virtual function table) always occurs first
+** so that we can always find the appropriate methods.
*/
struct OsFile {
IoMethod const *pMethod;
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test1.c,v 1.168 2005/11/30 03:20:32 drh Exp $
+** $Id: test1.c,v 1.169 2005/12/02 02:44:06 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
** ignored and the value is set to NULL. If FLAGS=="static" then
** the value is set to the value of a static variable named
** "sqlite_static_bind_value". If FLAGS=="normal" then a copy
-** of the VALUE is made.
+** of the VALUE is made. If FLAGS=="blob10" then a VALUE is ignored
+** an a 10-byte blob "abc\000xyz\000pq" is inserted.
*/
static int test_bind(
void *NotUsed,
rc = sqlite3_bind_text(pStmt, idx, sqlite_static_bind_value, -1, 0);
}else if( strcmp(argv[4],"normal")==0 ){
rc = sqlite3_bind_text(pStmt, idx, argv[3], -1, SQLITE_TRANSIENT);
+ }else if( strcmp(argv[4],"blob10")==0 ){
+ rc = sqlite3_bind_text(pStmt, idx, "abc\000xyz\000pq", 10, SQLITE_STATIC);
}else{
Tcl_AppendResult(interp, "4th argument should be "
"\"null\" or \"static\" or \"normal\"", 0);
# This file implements regression tests for SQLite library. The
# focus of this script testing the sqlite_bind API.
#
-# $Id: bind.test,v 1.32 2005/06/22 08:48:07 drh Exp $
+# $Id: bind.test,v 1.33 2005/12/02 02:44:06 drh Exp $
#
set testdir [file dirname $argv0]
} {1 {unrecognized token: "$abc(123"}}
}
+# Test the ability to bind text that contains embedded '\000' characters.
+# Make sure we can recover the enter input string.
+#
+do_test bind-12.1 {
+ execsql {
+ CREATE TABLE t3(x BLOB);
+ }
+ set VM [sqlite3_prepare $DB {INSERT INTO t3 VALUES(?)} -1 TAIL]
+ sqlite_bind $VM 1 not-used blob10
+ sqlite3_step $VM
+ sqlite3_finalize $VM
+ execsql {
+ SELECT typeof(x), length(x), quote(x),
+ length(cast(x AS BLOB)), quote(cast(x AS BLOB)) FROM t3
+ }
+} {text 3 'abc' 10 X'6162630078797A007071'}
+
+
finish_test