1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Fix a bug in the sqlite3_column_decltype() API. (CVS 1486)

FossilOrigin-Name: c8a40218c20cf5d0abad330e8fa59ca4c36e7608
This commit is contained in:
danielk1977
2004-05-28 13:13:02 +00:00
parent 48dec7e215
commit 76d505baad
6 changed files with 60 additions and 67 deletions

View File

@@ -921,18 +921,18 @@ void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
int sqlite3VdbeSetColName(Vdbe *p, int idx, const char *zName, int N){
int rc;
Mem *pColName;
assert( idx<p->nResColumn );
assert( idx<(2*p->nResColumn) );
/* If the Vdbe.aColName array has not yet been allocated, allocate
** it now.
*/
if( !p->aColName ){
int i;
p->aColName = (Mem *)sqliteMalloc(sizeof(Mem)*p->nResColumn);
p->aColName = (Mem *)sqliteMalloc(sizeof(Mem)*p->nResColumn*2);
if( !p->aColName ){
return SQLITE_NOMEM;
}
for(i=0; i<p->nResColumn; i++){
for(i=0; i<(2*p->nResColumn); i++){
p->aColName[i].flags = MEM_Null;
}
}