summaryrefslogtreecommitdiff
path: root/data/sqlite3/misuse.diff
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-08-02 06:10:29 +0000
committerJay Freeman <saurik@saurik.com>2008-08-02 06:10:29 +0000
commit9dc5582fea127dddd443efa44b8bed53ad575574 (patch)
tree2a17aa947aef0f722fcebdda359923cc6a787345 /data/sqlite3/misuse.diff
parent4d7545a73268d1909469cb725d35b6fc84c64570 (diff)
Various fixes for AppStore compatibility and libsqlite3.
git-svn-id: http://svn.telesphoreo.org/trunk@412 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/sqlite3/misuse.diff')
-rw-r--r--data/sqlite3/misuse.diff53
1 files changed, 53 insertions, 0 deletions
diff --git a/data/sqlite3/misuse.diff b/data/sqlite3/misuse.diff
new file mode 100644
index 000000000..0e7b79255
--- /dev/null
+++ b/data/sqlite3/misuse.diff
@@ -0,0 +1,53 @@
+diff -ru sqlite-3.5.9/src/vdbeapi.c sqlite-3.5.9+iPhone/src/vdbeapi.c
+--- sqlite-3.5.9/src/vdbeapi.c 2008-05-13 12:52:46.000000000 +0000
++++ sqlite-3.5.9+iPhone/src/vdbeapi.c 2008-08-01 03:22:00.000000000 +0000
+@@ -1072,6 +1072,9 @@
+ int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
+ int rc;
+ Vdbe *p = (Vdbe *)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ if( rc==SQLITE_OK ){
+@@ -1086,6 +1089,9 @@
+ int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
+ int rc;
+ Vdbe *p = (Vdbe *)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ if( rc==SQLITE_OK ){
+@@ -1097,6 +1103,9 @@
+ int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
+ int rc;
+ Vdbe *p = (Vdbe*)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ sqlite3_mutex_leave(p->db->mutex);
+@@ -1125,6 +1134,9 @@
+ int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
+ int rc;
+ Vdbe *p = (Vdbe *)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ if( rc==SQLITE_OK ){
+@@ -1137,6 +1149,9 @@
+ int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
+ int rc;
+ Vdbe *p = (Vdbe *)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ if( rc==SQLITE_OK ){