]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
New bind tests (check-ins (2797) and (2798)) only work right on a UTF8
authordrh <drh@noemail.net>
Fri, 9 Dec 2005 20:54:34 +0000 (20:54 +0000)
committerdrh <drh@noemail.net>
Fri, 9 Dec 2005 20:54:34 +0000 (20:54 +0000)
database.  So make sure they are only run when the database is UTF8. (CVS 2812)

FossilOrigin-Name: 398037906956f0274ca35cbff6961f6df5149295

manifest
manifest.uuid
test/bind.test

index e9edb9bc5b132e7d2b225149092bde9678ac60e4..e1944ecec7ed1da8277311c6898660ed318fe223 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C More\sannoying\sand\spointless\ssignedness\swarnings\sfixed.\s(CVS\s2811)
-D 2005-12-09T20:21:59
+C New\sbind\stests\s(check-ins\s(2797)\sand\s(2798))\sonly\swork\sright\son\sa\sUTF8\ndatabase.\s\sSo\smake\ssure\sthey\sare\sonly\srun\swhen\sthe\sdatabase\sis\sUTF8.\s(CVS\s2812)
+D 2005-12-09T20:54:35
 F Makefile.in e3c6b3a38d734d41574c04f2fc90d18de2b87102
 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -113,7 +113,7 @@ F test/avtrans.test 507834a6e1ef4aeea9b8bc2b45f9246d7e66ad3f
 F test/between.test ca092fa28b665ca92172b182c6c360a92f7ca348
 F test/bigfile.test ebc9ce9216e08bead63734ab816d0f27858f3b80
 F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747
-F test/bind.test 9e80953462a56f8b7f1f840c9fba74f2f1d0db93
+F test/bind.test 7a516239aeb056aad5a36256d0b219373ad67fd9
 F test/bindxfer.test 856830e9e5552b9882c9d5c6647f90e25bdae4ac
 F test/blob.test 0b4ee6fef7a50685b88d921e2992606999510881
 F test/btree.test 8aa7424aeec844df990273fe36447e5d7e407261
@@ -327,7 +327,7 @@ F www/tclsqlite.tcl ddcf912ea48695603c8ed7efb29f0812ef8d1b49
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 83a59151559d9496d4f546e03e65087ea974717d
-R 2e5f3b3d941bdaa6cfe94522526b1dfc
+P 590578bef88d0aa545f8138e8eec0db03c093861
+R b11ea4449bdd8f6caa2595a115b86b1e
 U drh
-Z d1e3c6a49aee717b43cb6b0d33457f77
+Z 9a38610602d3cdfe49544eea7c9cc80d
index d487c32fb4c04f860796940c13f9397fb8e81300..a27e96011dc0ce45608c61b05a15a7c456a2641f 100644 (file)
@@ -1 +1 @@
-590578bef88d0aa545f8138e8eec0db03c093861
\ No newline at end of file
+398037906956f0274ca35cbff6961f6df5149295
\ No newline at end of file
index 16ede149d37aaca2f91e34db417aa34020247845..6cc8034321df324cdb463b305cdf0abd6f99d87e 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this script testing the sqlite_bind API.
 #
-# $Id: bind.test,v 1.34 2005/12/05 13:20:03 drh Exp $
+# $Id: bind.test,v 1.35 2005/12/09 20:54:35 drh Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -500,27 +500,29 @@ ifcapable tclvar {
   } {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'}
-do_test bind-12.2 {
-  sqlite3_create_function $DB
-  execsql {
-    SELECT quote(cast(x_coalesce(x) AS blob)) FROM t3
-  }
-} {X'6162630078797A007071'}
+if {[execsql {pragma encoding}]=="UTF-8"} {
+  # 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'}
+  do_test bind-12.2 {
+    sqlite3_create_function $DB
+    execsql {
+      SELECT quote(cast(x_coalesce(x) AS blob)) FROM t3
+    }
+  } {X'6162630078797A007071'}
+}
 
 finish_test