aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeapi.c
diff options
context:
space:
mode:
authordrh <>2022-02-28 03:25:13 +0000
committerdrh <>2022-02-28 03:25:13 +0000
commitc9373e86e816ccd62dec14af42eb5b7640e5011e (patch)
tree3d481238801da7906678c49049333206382b36a8 /src/vdbeapi.c
parentb3d981c3b740755dba418024da2a8de1d825ed92 (diff)
downloadsqlite-c9373e86e816ccd62dec14af42eb5b7640e5011e.tar.gz
sqlite-c9373e86e816ccd62dec14af42eb5b7640e5011e.zip
An optimization to initMemArray() saves almost 500K cycles. But it seems a
little dodgy. I want to think about this more before merging to trunk. Perhaps there is a cleaner way to accomplish the same. FossilOrigin-Name: 7fefd8676110a53e6c98a697e2dbf820740fe602a1e83b6caa8d099c41a15d80
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r--src/vdbeapi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index 6939813a2..69f3d7b12 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -1087,6 +1087,8 @@ int sqlite3_data_count(sqlite3_stmt *pStmt){
/*
** Return a pointer to static memory containing an SQL NULL value.
+**
+** Must be revised if column order for Mem changes. tag-20220228a.
*/
static const Mem *columnNullValue(void){
/* Even though the Mem structure contains an element
@@ -1104,15 +1106,15 @@ static const Mem *columnNullValue(void){
#endif
= {
/* .u = */ {0},
+ /* .z = */ (char*)0,
+ /* .n = */ (int)0,
/* .flags = */ (u16)MEM_Null,
/* .enc = */ (u8)0,
/* .eSubtype = */ (u8)0,
- /* .n = */ (int)0,
- /* .z = */ (char*)0,
- /* .zMalloc = */ (char*)0,
+ /* .db = */ (sqlite3*)0,
/* .szMalloc = */ (int)0,
/* .uTemp = */ (u32)0,
- /* .db = */ (sqlite3*)0,
+ /* .zMalloc = */ (char*)0,
/* .xDel = */ (void(*)(void*))0,
#ifdef SQLITE_DEBUG
/* .pScopyFrom = */ (Mem*)0,