Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add initial ZIPVFS support for the "main" database to the sqlite_memstat virtual table. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | memstat-vtab |
Files: | files | file ages | folders |
SHA3-256: |
9cd27350b0f62debfe3238c57c3ab510 |
User & Date: | drh 2018-09-27 15:45:03.985 |
Context
2018-09-27
| ||
16:57 | Enhancements to sqlite_memstat: (1) Add an extra "schema" column to show the schema name for ZIPVFS stats. (2) Only show ZIPVFS stats to schema that use ZIPVFS (3) Put a NULL in unused columns of the output. (Closed-Leaf check-in: 9351135b43 user: drh tags: memstat-vtab) | |
15:45 | Add initial ZIPVFS support for the "main" database to the sqlite_memstat virtual table. (check-in: 9cd27350b0 user: drh tags: memstat-vtab) | |
15:21 | Initial prototype of a eponymous virtual table that accesses sqlite3_status64() and sqlite3_db_status(). (check-in: 0b44e1f68e user: drh tags: memstat-vtab) | |
Changes
Changes to ext/misc/memstat.c.
︙ | |||
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + | /* ** Allowed values for aMemstatColumn[].eType */ #define MSV_GSTAT 0 /* sqlite3_status64() information */ #define MSV_DBSTAT 1 /* sqlite3_db_status() information */ #define MSV_ZIPVFS 2 /* ZIPVFS file-control with 64-bit return */ /* ** An array of quantities that can be measured and reported by ** this virtual table */ static const struct MemstatColumns { const char *zName; /* Symbolic name */ int eType; /* Type of interface */ int eOp; /* Opcode */ } aMemstatColumn[] = { |
︙ | |||
196 197 198 199 200 201 202 203 204 205 206 207 208 209 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | + + + + | case MSV_DBSTAT: { int xCur, xHiwtr; sqlite3_db_status(pCur->db, aMemstatColumn[i].eOp, &xCur, &xHiwtr, 0); iCur = xCur; iHiwtr = xHiwtr; break; } case MSV_ZIPVFS: { sqlite3_file_control(pCur->db, 0, aMemstatColumn[i].eOp, (void*)&iCur); break; } } if( iCol==MSV_COLUMN_HIWTR ) iCur = iHiwtr; sqlite3_result_int64(ctx, iCur); return SQLITE_OK; } /* |
︙ | |||
218 219 220 221 222 223 224 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - + | /* ** Return TRUE if the cursor has been moved off of the last ** row of output. */ static int memstatEof(sqlite3_vtab_cursor *cur){ memstat_cursor *pCur = (memstat_cursor*)cur; |
︙ |