aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <>2023-02-09 11:51:40 +0000
committerdrh <>2023-02-09 11:51:40 +0000
commita0c8ec9ee5a479bce71a3c9f78fbe6dfc93ef547 (patch)
tree0e0e17fdfd882683f32688754c919582e53e856f /src/expr.c
parent601e4d4a0f0a62ab148d9aa77dfff2862626508f (diff)
downloadsqlite-a0c8ec9ee5a479bce71a3c9f78fbe6dfc93ef547.tar.gz
sqlite-a0c8ec9ee5a479bce71a3c9f78fbe6dfc93ef547.zip
The "flexnum" affinity that was added by [44135d6ea84f7ba6] needs to also
be added to the output of the affinity() built-in function. dbsqlfuzz d309eaa5fe492c9606a8be876c2bc7dedb29d3d8 FossilOrigin-Name: f4ec68ceefa3a607f37d6355aac89fd1ae1704da4061bad7f271db1f17c1dd3a
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c
index 271d9dea8..ea3c90167 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -4103,11 +4103,14 @@ static int exprCodeInlineFunction(
** the type affinity of the argument. This is used for testing of
** the SQLite type logic.
*/
- const char *azAff[] = { "blob", "text", "numeric", "integer", "real" };
+ const char *azAff[] = { "blob", "text", "numeric", "integer",
+ "real", "flexnum" };
char aff;
assert( nFarg==1 );
aff = sqlite3ExprAffinity(pFarg->a[0].pExpr);
- sqlite3VdbeLoadString(v, target,
+ assert( aff<=SQLITE_AFF_NONE
+ || (aff>=SQLITE_AFF_BLOB && aff<=SQLITE_AFF_FLEXNUM) );
+ sqlite3VdbeLoadString(v, target,
(aff<=SQLITE_AFF_NONE) ? "none" : azAff[aff-SQLITE_AFF_BLOB]);
break;
}