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

Make the affinity() function available even if compiled without

SQLITE_DEBUG.  Surround the implementation of all test-only SQL functions
with #ifndef SQLITE_UNTESTABLE.

FossilOrigin-Name: b7e00ef8059f6fb5658c6ad6f337cfdf065a5f1b1130452122282f3a69e98a93
This commit is contained in:
drh
2021-09-17 13:07:15 +00:00
parent 89b1715415
commit 3780f9a4aa
4 changed files with 13 additions and 14 deletions

View File

@@ -3866,6 +3866,7 @@ static int exprCodeInlineFunction(
** Test-only SQL functions that are only usable if enabled
** via SQLITE_TESTCTRL_INTERNAL_FUNCTIONS
*/
#if !defined(SQLITE_UNTESTABLE)
case INLINEFUNC_expr_compare: {
/* Compare two expressions using sqlite3ExprCompare() */
assert( nFarg==2 );
@@ -3899,7 +3900,6 @@ static int exprCodeInlineFunction(
break;
}
#ifdef SQLITE_DEBUG
case INLINEFUNC_affinity: {
/* The AFFINITY() function evaluates to a string that describes
** the type affinity of the argument. This is used for testing of
@@ -3913,7 +3913,7 @@ static int exprCodeInlineFunction(
(aff<=SQLITE_AFF_NONE) ? "none" : azAff[aff-SQLITE_AFF_BLOB]);
break;
}
#endif
#endif /* !defined(SQLITE_UNTESTABLE) */
}
return target;
}