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

The sqlite3_column_decltype() routine should return NULL, not an empty string,

if the column has no declared type.

FossilOrigin-Name: 605eba4a756e7185119088e2242f82691d078b01
This commit is contained in:
drh
2016-03-22 20:05:09 +00:00
parent 527b0435fa
commit d7564865ad
9 changed files with 44 additions and 47 deletions

View File

@@ -564,22 +564,16 @@ static int vtabCallConstructor(
pTab->pVTable = pVTable;
for(iCol=0; iCol<pTab->nCol; iCol++){
char *zType = (char*)sqlite3StrNext(pTab->aCol[iCol].zName);
char *zType = sqlite3ColumnType(&pTab->aCol[iCol], "");
int nType;
int i = 0;
if( !zType[0] ){
pTab->tabFlags |= oooHidden;
continue;
}
nType = sqlite3Strlen30(zType);
if( sqlite3StrNICmp("hidden", zType, 6)||(zType[6] && zType[6]!=' ') ){
for(i=0; i<nType; i++){
if( (0==sqlite3StrNICmp(" hidden", &zType[i], 7))
&& (zType[i+7]=='\0' || zType[i+7]==' ')
){
i++;
break;
}
for(i=0; i<nType; i++){
if( 0==sqlite3StrNICmp("hidden", &zType[i], 6)
&& (i==0 || zType[i-1]==' ')
&& (zType[i+6]=='\0' || zType[i+6]==' ')
){
break;
}
}
if( i<nType ){