diff options
author | drh <> | 2025-06-16 15:34:26 +0000 |
---|---|---|
committer | drh <> | 2025-06-16 15:34:26 +0000 |
commit | 6ed5aa4b9be0893560ddc3351b62bfeecce6bdda (patch) | |
tree | cf514341d1898ed557346ff5b0b771a130674e62 /src | |
parent | 67f708298f97bbbad6c824fb1d6dfe4e310dd176 (diff) | |
download | sqlite-6ed5aa4b9be0893560ddc3351b62bfeecce6bdda.tar.gz sqlite-6ed5aa4b9be0893560ddc3351b62bfeecce6bdda.zip |
Make the show-%p-az-zero hack of the previous check-in configurable at
run-time using the 0x100000 bit of either .treetrace or .wheretrace.
As before, this is all a no-op except for debugging builds.
FossilOrigin-Name: a29627d7e7f8344d9a099cc133bda85250b02dc5ee5f358ba59691e0816b5b2d
Diffstat (limited to 'src')
-rw-r--r-- | src/printf.c | 11 | ||||
-rw-r--r-- | src/sqliteInt.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/printf.c b/src/printf.c index 406493677..669ca26b0 100644 --- a/src/printf.c +++ b/src/printf.c @@ -417,12 +417,11 @@ void sqlite3_str_vappendf( prefix = 0; } -#if 0 - /* Change the "#if 0" above to "#if 1" to cause all %p outputs - ** to be rendered as 0. This is useful when comparing .treetrace - ** or .wheretrace outputs, as it means the the pointer values - ** will compare equal. */ - if( xtype==etPOINTER ) longvalue = 0; +#if WHERETRACE_ENABLED + if( xtype==etPOINTER && sqlite3WhereTrace & 0x100000 ) longvalue = 0; +#endif +#if TREETRACE_ENABLED + if( xtype==etPOINTER && sqlite3TreeTrace & 0x100000 ) longvalue = 0; #endif if( longvalue==0 ) flag_alternateform = 0; diff --git a/src/sqliteInt.h b/src/sqliteInt.h index e28e338c4..88272920c 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1153,6 +1153,7 @@ extern u32 sqlite3TreeTrace; ** 0x00020000 Transform DISTINCT into GROUP BY ** 0x00040000 SELECT tree dump after all code has been generated ** 0x00080000 NOT NULL strength reduction +** 0x00100000 Pointers are all shown as zero */ /* @@ -1197,6 +1198,7 @@ extern u32 sqlite3WhereTrace; ** 0x00020000 Show WHERE terms returned from whereScanNext() ** 0x00040000 Solver overview messages ** 0x00080000 Star-query heuristic +** 0x00100000 Pointers are all shown as zero */ |