1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Allow the output arguments in sqlite_compile and sqlite_step to be NULL

pointers.  Tickets #384 and #385. (CVS 1049)

FossilOrigin-Name: dd84f88f6c4012e4a093a4881f6fe50527bb2006
This commit is contained in:
drh
2003-07-09 00:28:13 +00:00
parent 23af2f6eb2
commit 073e5a7751
6 changed files with 58 additions and 42 deletions

View File

@@ -36,7 +36,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.232 2003/07/06 17:22:25 drh Exp $
** $Id: vdbe.c,v 1.233 2003/07/09 00:28:15 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -810,16 +810,18 @@ int sqlite_step(
rc = sqliteVdbeExec(p);
}
if( rc==SQLITE_DONE || rc==SQLITE_ROW ){
*pazColName = (const char**)p->azColName;
*pN = p->nResColumn;
if( pazColName ) *pazColName = (const char**)p->azColName;
if( pN ) *pN = p->nResColumn;
}else{
*pN = 0;
*pazColName = 0;
if( pazColName) *pazColName = 0;
if( pN ) *pN = 0;
}
if( rc==SQLITE_ROW ){
*pazValue = (const char**)p->azResColumn;
}else{
*pazValue = 0;
if( pazValue ){
if( rc==SQLITE_ROW ){
*pazValue = (const char**)p->azResColumn;
}else{
*pazValue = 0;
}
}
if( sqliteSafetyOff(db) ){
return SQLITE_MISUSE;