]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Change the sqlite3_bind_value() implementation to use a default branch on
authordrh <drh@noemail.net>
Tue, 14 Apr 2009 12:58:20 +0000 (12:58 +0000)
committerdrh <drh@noemail.net>
Tue, 14 Apr 2009 12:58:20 +0000 (12:58 +0000)
the type switch so that there are no untested jumps in the switch. (CVS 6505)

FossilOrigin-Name: d0a8bd6a53c5da0ac6b88818f82c7f7d330b527a

manifest
manifest.uuid
src/vdbeapi.c

index e8a81b196f7176ef7499d9d11d297a9a76ac6c6f..45e7803d3b66264e8de427d4654127c78ffc98ed 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Reimplement\sthe\ssqlite3_bind_value()\sinterface\sso\sthat\sit\sworks\swhen\sthe\nvalue\sbeing\sbound\scomes\sfrom\sa\sdifferent\sdatabase\sconnection.\s(CVS\s6504)
-D 2009-04-14T12:43:34
+C Change\sthe\ssqlite3_bind_value()\simplementation\sto\suse\sa\sdefault\sbranch\son\nthe\stype\sswitch\sso\sthat\sthere\sare\sno\suntested\sjumps\sin\sthe\sswitch.\s(CVS\s6505)
+D 2009-04-14T12:58:20
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -203,7 +203,7 @@ F src/vacuum.c 07121a727beeee88f27d704a00313ad6a7c9bef0
 F src/vdbe.c 88bc70921ccdcff8bfdf574f3e2285d17ab97103
 F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
 F src/vdbeInt.h df5c5a1c739c98af2c83440dde3fc361240f3a25
-F src/vdbeapi.c 3783c3416206e66749abf5d15c0e8500acef8e0e
+F src/vdbeapi.c 015c9d0fb7047657a13a7bb6aa886f75e43db02d
 F src/vdbeaux.c 5ecb4c7a041b8926a8927b1a27bcbb8ff74ae5c4
 F src/vdbeblob.c e67757450ae8581a8b354d9d7e467e41502dfe38
 F src/vdbemem.c 9798905787baae83d0b53b62030e32ecf7a0586f
@@ -717,7 +717,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P b0b2b2831cc84d57e90bf587ebed600fa72926e9
-R e950f079c16a2cf0cbd9a746b0c47391
+P 3db0c7980668cf38165add13f833863cd00a0cfe
+R 34f39946bda012d0092593a65918e629
 U drh
-Z b6c79b5e1dc82c0024406556d80ccdad
+Z 98a6c859bf61c1e15172ad734a5c6432
index 53202499dd7bbfc87843801535ba9c46d0af11af..11d2f66ff6afd4b29269364a231de28371e19559 100644 (file)
@@ -1 +1 @@
-3db0c7980668cf38165add13f833863cd00a0cfe
\ No newline at end of file
+d0a8bd6a53c5da0ac6b88818f82c7f7d330b527a
\ No newline at end of file
index c23d88f5ef050749c7e4f83cdeb5d5b6bfdffce5..0c3cd7b2212570c64fc8d2764ff48e75e09f7d1d 100644 (file)
@@ -13,7 +13,7 @@
 ** This file contains code use to implement APIs that are part of the
 ** VDBE.
 **
-** $Id: vdbeapi.c,v 1.162 2009/04/14 12:43:34 drh Exp $
+** $Id: vdbeapi.c,v 1.163 2009/04/14 12:58:20 drh Exp $
 */
 #include "sqliteInt.h"
 #include "vdbeInt.h"
@@ -1153,10 +1153,6 @@ int sqlite3_bind_text16(
 int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
   int rc;
   switch( pValue->type ){
-    case SQLITE_NULL: {
-      rc = sqlite3_bind_null(pStmt, i);
-      break;
-    }
     case SQLITE_INTEGER: {
       rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
       break;
@@ -1174,7 +1170,12 @@ int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
       break;
     }
     case SQLITE_TEXT: {
-      rc = bindText(pStmt,i,  pValue->z, pValue->n, SQLITE_TRANSIENT, pValue->enc);
+      rc = bindText(pStmt,i,  pValue->z, pValue->n, SQLITE_TRANSIENT,
+                              pValue->enc);
+      break;
+    }
+    default: {
+      rc = sqlite3_bind_null(pStmt, i);
       break;
     }
   }