aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2007-09-01 11:04:26 +0000
committerdanielk1977 <danielk1977@noemail.net>2007-09-01 11:04:26 +0000
commit28c66307d76d973e10ca73d40477729bfbd670c8 (patch)
tree34c4565d1c18424ed9a38cf119ca37c1a3bb7244 /src
parentb8cdbec2464eb4de982bc140f2b344c95c72570b (diff)
downloadsqlite-28c66307d76d973e10ca73d40477729bfbd670c8.tar.gz
sqlite-28c66307d76d973e10ca73d40477729bfbd670c8.zip
Test sqlite3_bind_zeroblob(). Only include sqlite3Utf8To8 in builds if SQLITE_DEBUG is defined. (CVS 4363)
FossilOrigin-Name: fde6142b7bb33198b3d6b65cfbddfad61694b1fb
Diffstat (limited to 'src')
-rw-r--r--src/test1.c5
-rw-r--r--src/test_hexio.c4
-rw-r--r--src/utf.c7
3 files changed, 10 insertions, 6 deletions
diff --git a/src/test1.c b/src/test1.c
index d98dbed23..1baee9866 100644
--- a/src/test1.c
+++ b/src/test1.c
@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test1.c,v 1.273 2007/09/01 09:02:54 danielk1977 Exp $
+** $Id: test1.c,v 1.274 2007/09/01 11:04:26 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -2462,8 +2462,7 @@ static int test_bind_zeroblob(
int rc;
if( objc!=4 ){
- Tcl_AppendResult(interp, "wrong # args: should be \"",
- Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE", 0);
+ Tcl_WrongNumArgs(interp, 1, objv, "STMT IDX N");
return TCL_ERROR;
}
diff --git a/src/test_hexio.c b/src/test_hexio.c
index 15d9274d4..4ec2b82c7 100644
--- a/src/test_hexio.c
+++ b/src/test_hexio.c
@@ -17,7 +17,7 @@
** with historical versions of the "binary" command. So it seems
** easier and safer to build our own mechanism.
**
-** $Id: test_hexio.c,v 1.4 2007/08/16 04:30:40 drh Exp $
+** $Id: test_hexio.c,v 1.5 2007/09/01 11:04:27 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -291,6 +291,7 @@ static int utf8_to_utf8(
int objc,
Tcl_Obj *CONST objv[]
){
+#ifdef SQLITE_DEBUG
int n;
int nOut;
const unsigned char *zOrig;
@@ -307,6 +308,7 @@ static int utf8_to_utf8(
binToHex(z,nOut);
Tcl_AppendResult(interp, (char*)z, 0);
sqlite3_free(z);
+#endif
return TCL_OK;
}
diff --git a/src/utf.c b/src/utf.c
index eba0b586b..3170c09ff 100644
--- a/src/utf.c
+++ b/src/utf.c
@@ -12,7 +12,7 @@
** This file contains routines used to translate between UTF-8,
** UTF-16, UTF-16BE, and UTF-16LE.
**
-** $Id: utf.c,v 1.56 2007/08/21 19:33:57 drh Exp $
+** $Id: utf.c,v 1.57 2007/09/01 11:04:27 danielk1977 Exp $
**
** Notes on UTF-8:
**
@@ -456,7 +456,10 @@ int sqlite3Utf16ByteLen(const void *zIn, int nChar){
return (z-(char const *)zIn)-((c==0)?2:0);
}
-#if defined(SQLITE_TEST)
+/* This test function is not currently used by the automated test-suite.
+** Hence it is only available in debug builds.
+*/
+#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
/*
** Translate UTF-8 to UTF-8.
**