aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authordrh <>2021-07-30 23:30:30 +0000
committerdrh <>2021-07-30 23:30:30 +0000
commitc2df4d6adb44e5f9587bf962c917c46c603825c9 (patch)
tree463be0579cf67d7eae8f67743f9e5c3c715b7936 /src/util.c
parente48f261ebfd36b4935c2d700269790239dac37e5 (diff)
downloadsqlite-c2df4d6adb44e5f9587bf962c917c46c603825c9.tar.gz
sqlite-c2df4d6adb44e5f9587bf962c917c46c603825c9.zip
Recognize certain standard datatypes ("INT", "INTEGER", "REAL", "TEXT", and
"BLOB") and if a column has one of those datatypes, store the type part of the bit-field information in the Column structure to save space. FossilOrigin-Name: d2da62a9df63036b02dadca3798de9e623c2680b3ef0c37d2b18bb88693afd7f
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 8bcf1d261..d513d8f79 100644
--- a/src/util.c
+++ b/src/util.c
@@ -91,6 +91,9 @@ int sqlite3Strlen30(const char *z){
char *sqlite3ColumnType(Column *pCol, char *zDflt){
if( pCol->colFlags & COLFLAG_HASTYPE ){
return pCol->zName + strlen(pCol->zName) + 1;
+ }else if( pCol->eType ){
+ assert( pCol->eType<=SQLITE_N_STDTYPE );
+ return (char*)sqlite3StdType[pCol->eType-1];
}else{
return zDflt;
}