aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <>2024-08-22 16:22:08 +0000
committerdrh <>2024-08-22 16:22:08 +0000
commitd55ab844513ab13ebbd8e6b483a75e8bdaefa98b (patch)
tree3ce182a828ef83fa20c89e17871321450a593fa0 /src/wherecode.c
parent889ce8ee907502771fcc66cb815a06c1254b34a8 (diff)
downloadsqlite-d55ab844513ab13ebbd8e6b483a75e8bdaefa98b.tar.gz
sqlite-d55ab844513ab13ebbd8e6b483a75e8bdaefa98b.zip
Add the SQLITE_INDEX_SCAN_HEX bit to the sqlite3_index_info.idxFlags bitmask.
When set, this bit causes the EXPLAIN QUERY PLAN output to show the idxNum value in hex rather than in decimal. This is purely a debugging aid. FossilOrigin-Name: 6c00e88ebdb41d6317bb8758825521614dedc2e6e6289ff415c5f0406eed815b
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index b0c0d9aed..0951e5e20 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -200,7 +200,9 @@ int sqlite3WhereExplainOneScan(
}
#ifndef SQLITE_OMIT_VIRTUALTABLE
else if( (flags & WHERE_VIRTUALTABLE)!=0 ){
- sqlite3_str_appendf(&str, " VIRTUAL TABLE INDEX %d:%s",
+ sqlite3_str_appendall(&str, " VIRTUAL TABLE INDEX ");
+ sqlite3_str_appendf(&str,
+ pLoop->u.vtab.bIdxNumHex ? "0x%x:%s" : "%d:%s",
pLoop->u.vtab.idxNum, pLoop->u.vtab.idxStr);
}
#endif