summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite/src/test9.c
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 18:27:25 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 18:27:25 +0000
commit997e22224e1062a4cd39373057a68879a1d7a3ac (patch)
treea90a9ce4272fc78f2459b1b2c78b52a3f6d4e5d3 /third_party/sqlite/src/test9.c
parent0d683c611a18dc6ea0e99f38c73b4fb96611041f (diff)
downloadchromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.zip
chromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.tar.gz
chromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.tar.bz2
Update sqlite to version 3.6.18, porting our patches.
Hopefully this will help to address some valgrind issues. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/sqlite/src/test9.c')
-rw-r--r--third_party/sqlite/src/test9.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/third_party/sqlite/src/test9.c b/third_party/sqlite/src/test9.c
index 2043da2..222bdc3 100644
--- a/third_party/sqlite/src/test9.c
+++ b/third_party/sqlite/src/test9.c
@@ -14,7 +14,7 @@
** for completeness. Test code is written in C for these cases
** as there is not much point in binding to Tcl.
**
-** $Id: test9.c,v 1.6 2008/07/11 13:53:55 drh Exp $
+** $Id: test9.c,v 1.7 2009/04/02 18:32:27 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -114,6 +114,7 @@ static int c_misuse_test(
){
const char *zErrFunction = "N/A";
sqlite3 *db = 0;
+ sqlite3_stmt *pStmt;
int rc;
if( objc!=1 ){
@@ -138,29 +139,37 @@ static int c_misuse_test(
goto error_out;
}
- rc = sqlite3_prepare(db, 0, 0, 0, 0);
+ pStmt = (sqlite3_stmt*)1234;
+ rc = sqlite3_prepare(db, 0, 0, &pStmt, 0);
if( rc!=SQLITE_MISUSE ){
zErrFunction = "sqlite3_prepare";
goto error_out;
}
+ assert( pStmt==0 ); /* Verify that pStmt is zeroed even on a MISUSE error */
- rc = sqlite3_prepare_v2(db, 0, 0, 0, 0);
+ pStmt = (sqlite3_stmt*)1234;
+ rc = sqlite3_prepare_v2(db, 0, 0, &pStmt, 0);
if( rc!=SQLITE_MISUSE ){
zErrFunction = "sqlite3_prepare_v2";
goto error_out;
}
+ assert( pStmt==0 );
#ifndef SQLITE_OMIT_UTF16
- rc = sqlite3_prepare16(db, 0, 0, 0, 0);
+ pStmt = (sqlite3_stmt*)1234;
+ rc = sqlite3_prepare16(db, 0, 0, &pStmt, 0);
if( rc!=SQLITE_MISUSE ){
zErrFunction = "sqlite3_prepare16";
goto error_out;
}
- rc = sqlite3_prepare16_v2(db, 0, 0, 0, 0);
+ assert( pStmt==0 );
+ pStmt = (sqlite3_stmt*)1234;
+ rc = sqlite3_prepare16_v2(db, 0, 0, &pStmt, 0);
if( rc!=SQLITE_MISUSE ){
zErrFunction = "sqlite3_prepare16_v2";
goto error_out;
}
+ assert( pStmt==0 );
#endif
return TCL_OK;