1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +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

@@ -110,11 +110,15 @@ int sqlite3Strlen30(const char *z){
}
/*
** The string z[] is followed immediately by another string. Return
** a poiner to that other string.
** Return the declared type of a column. Or return zDflt if the column
** has no declared type.
**
** The column type is an extra string stored after the zero-terminator on
** the column name if and only if the COLFLAG_HASTYPE flag is set.
*/
const char *sqlite3StrNext(const char *z){
return z + strlen(z) + 1;
char *sqlite3ColumnType(Column *pCol, char *zDflt){
if( (pCol->colFlags & COLFLAG_HASTYPE)==0 ) return zDflt;
return pCol->zName + strlen(pCol->zName) + 1;
}
/*