Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | When calculating schema memory, use the actual allocated size of hash elements, not sizeof(HashElem). Also fix a bug in dbstatus.test. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | experimental |
Files: | files | file ages | folders |
SHA1: |
e327ef37faec52ce99591266160be2ce |
User & Date: | dan 2010-07-26 15:57:02.000 |
Original Comment: | When calculating schema memory, use the actual allocated size of hash elements, not sizeof(HashElem). Also fix a bug in dbstatus.test |
Context
2010-07-26
| ||
16:24 | Add support for SQLITE_DBSTATUS_SCHEMA_USED and SQLITE_DBSTATUS_STMT_USED to the trunk. (check-in: 008368b2bd user: drh tags: trunk) | |
15:57 | When calculating schema memory, use the actual allocated size of hash elements, not sizeof(HashElem). Also fix a bug in dbstatus.test. (Closed-Leaf check-in: e327ef37fa user: dan tags: experimental) | |
14:47 | Add virtual table test cases to dbstatus.test. (check-in: 72b84d066a user: dan tags: experimental) | |
Changes
Changes to src/status.c.
︙ | |||
145 146 147 148 149 150 151 | 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 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - - - + + + - - - - - - - - - - + + + + + + + + + + - + - + | */ case SQLITE_DBSTATUS_SCHEMA_USED: { int i; /* Used to iterate through schemas */ int nByte = 0; /* Used to accumulate return value */ db->pnBytesFreed = &nByte; for(i=0; i<db->nDb; i++){ |
︙ |
Changes to test/dbstatus.test.
︙ | |||
287 288 289 290 291 292 293 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | - + | incr nAlloc1 [lookaside db] set nStmt1 [lindex [sqlite3_db_status db SQLITE_DBSTATUS_STMT_USED 0] 1] execsql $statements # Step 3. db cache flush set nAlloc2 [lindex [sqlite3_status SQLITE_STATUS_MEMORY_USED 0] 1] |
︙ |