---
This commit is contained in:
@@ -0,0 +1,354 @@
|
||||
## Summary
|
||||
<!--Explain briefly what goes wrong and explain why you believe this is a bug and not the intended behavior of SQLite (if it is not a crash).-->**No review yet**
|
||||
|
||||
## Minimized query
|
||||
|
||||
```sql
|
||||
CREATE TABLE T (
|
||||
a INTEGER,
|
||||
b TEXT,
|
||||
c INTEGER
|
||||
);
|
||||
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
|
||||
WITH RECURSIVE d(a,b,c,e) AS (
|
||||
SELECT *,1 FROM T WHERE c IS NULL
|
||||
UNION ALL
|
||||
SELECT T.a,T.b,T.c,d.e+1
|
||||
FROM T JOIN d ON T.c=d.a
|
||||
)
|
||||
SELECT * FROM d;
|
||||
SELECT SUM(c) FROM T;
|
||||
ALTER TABLE T RENAME TO T_r9513;
|
||||
```
|
||||
|
||||
## Actual output
|
||||
|
||||
```sql
|
||||
Memory Used: 78968 (max 80520) bytes
|
||||
Number of Outstanding Allocations: 163 (max 177)
|
||||
Number of Pcache Overflow Bytes: 16928 (max 16928) bytes
|
||||
Largest Allocation: 48000 bytes
|
||||
Largest Pcache Allocation: 4360 bytes
|
||||
Lookaside Slots Used: 32 (max 88)
|
||||
Successful lookaside attempts: 107
|
||||
Lookaside failures due to size: 0
|
||||
Lookaside failures due to OOM: 0
|
||||
Pager Heap Usage: 13592 bytes
|
||||
Page cache hits: 4
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Schema Heap Usage: 1048 bytes
|
||||
Statement Heap/Lookaside Usage: 2464 bytes
|
||||
Fullscan Steps: 0
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 0
|
||||
Virtual Machine Steps: 30
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 2464
|
||||
Bytes received by read(): 6887
|
||||
Bytes sent to write(): 0
|
||||
Read() system calls: 14
|
||||
Write() system calls: 0
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
Memory Used: 76528 (max 82208) bytes
|
||||
Number of Outstanding Allocations: 152 (max 177)
|
||||
Number of Pcache Overflow Bytes: 16928 (max 16928) bytes
|
||||
Largest Allocation: 48000 bytes
|
||||
Largest Pcache Allocation: 4360 bytes
|
||||
Lookaside Slots Used: 41 (max 88)
|
||||
Successful lookaside attempts: 140
|
||||
Lookaside failures due to size: 0
|
||||
Lookaside failures due to OOM: 0
|
||||
Pager Heap Usage: 13592 bytes
|
||||
Page cache hits: 2
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Schema Heap Usage: 1072 bytes
|
||||
Statement Heap/Lookaside Usage: 3296 bytes
|
||||
Fullscan Steps: 0
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 0
|
||||
Virtual Machine Steps: 35
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 3296
|
||||
Bytes received by read(): 6981
|
||||
Bytes sent to write(): 1293
|
||||
Read() system calls: 16
|
||||
Write() system calls: 1
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
1|a||1
|
||||
2|b|1|2
|
||||
3|c|2|3
|
||||
Memory Used: 81104 (max 288496) bytes
|
||||
Number of Outstanding Allocations: 176 (max 206)
|
||||
Number of Pcache Overflow Bytes: 16928 (max 33344) bytes
|
||||
Largest Allocation: 87200 bytes
|
||||
Largest Pcache Allocation: 4360 bytes
|
||||
Lookaside Slots Used: 50 (max 123)
|
||||
Successful lookaside attempts: 278
|
||||
Lookaside failures due to size: 3
|
||||
Lookaside failures due to OOM: 61
|
||||
Pager Heap Usage: 13592 bytes
|
||||
Page cache hits: 3
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Schema Heap Usage: 1072 bytes
|
||||
Statement Heap/Lookaside Usage: 20744 bytes
|
||||
Fullscan Steps: 2
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 2
|
||||
Bloom filter bypass taken: 1/3
|
||||
Virtual Machine Steps: 149
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 20744
|
||||
Bytes received by read(): 7078
|
||||
Bytes sent to write(): 2589
|
||||
Read() system calls: 18
|
||||
Write() system calls: 2
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
3
|
||||
Memory Used: 76528 (max 288496) bytes
|
||||
Number of Outstanding Allocations: 152 (max 206)
|
||||
Number of Pcache Overflow Bytes: 16928 (max 33344) bytes
|
||||
Largest Allocation: 87200 bytes
|
||||
Largest Pcache Allocation: 4360 bytes
|
||||
Lookaside Slots Used: 41 (max 123)
|
||||
Successful lookaside attempts: 306
|
||||
Lookaside failures due to size: 3
|
||||
Lookaside failures due to OOM: 61
|
||||
Pager Heap Usage: 13592 bytes
|
||||
Page cache hits: 2
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Schema Heap Usage: 1072 bytes
|
||||
Statement Heap/Lookaside Usage: 3296 bytes
|
||||
Fullscan Steps: 2
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 0
|
||||
Virtual Machine Steps: 19
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 3296
|
||||
Bytes received by read(): 7175
|
||||
Bytes sent to write(): 3955
|
||||
Read() system calls: 20
|
||||
Write() system calls: 3
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
Memory Used: 191424 (max 563832) bytes
|
||||
Number of Outstanding Allocations: 196 (max 272)
|
||||
Number of Pcache Overflow Bytes: 25136 (max 49760) bytes
|
||||
Largest Allocation: 87200 bytes
|
||||
Largest Pcache Allocation: 4360 bytes
|
||||
Lookaside Slots Used: 102 (max 123)
|
||||
Successful lookaside attempts: 644
|
||||
Lookaside failures due to size: 6
|
||||
Lookaside failures due to OOM: 225
|
||||
Pager Heap Usage: 22808 bytes
|
||||
Page cache hits: 10
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Schema Heap Usage: 1048 bytes
|
||||
Statement Heap/Lookaside Usage: 47752 bytes
|
||||
Fullscan Steps: 0
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 0
|
||||
Virtual Machine Steps: 125
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 47752
|
||||
Bytes received by read(): 7272
|
||||
Bytes sent to write(): 5256
|
||||
Read() system calls: 23
|
||||
Write() system calls: 4
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
```
|
||||
|
||||
## Expectation
|
||||
|
||||
```sql
|
||||
Memory Used: 79464 (max 81000) bytes
|
||||
Number of Outstanding Allocations: 173 (max 187)
|
||||
Number of Pcache Overflow Bytes: 16936 (max 16936) bytes
|
||||
Largest Allocation: 48000 bytes
|
||||
Largest Pcache Allocation: 4368 bytes
|
||||
Lookaside Slots Used: 48 (max 97)
|
||||
Successful lookaside attempts: 116
|
||||
Lookaside failures due to size: 0
|
||||
Lookaside failures due to OOM: 0
|
||||
Pager Heap Usage: 13608 bytes
|
||||
Page cache hits: 4
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Temporary data spilled to disk: 0
|
||||
Schema Heap Usage: 880 bytes
|
||||
Statement Heap/Lookaside Usage: 2336 bytes
|
||||
Fullscan Steps: 0
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 0
|
||||
Virtual Machine Steps: 30
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 2336
|
||||
Bytes received by read(): 7407
|
||||
Bytes sent to write(): 0
|
||||
Read() system calls: 14
|
||||
Write() system calls: 0
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
Memory Used: 77136 (max 82768) bytes
|
||||
Number of Outstanding Allocations: 162 (max 187)
|
||||
Number of Pcache Overflow Bytes: 16936 (max 16936) bytes
|
||||
Largest Allocation: 48000 bytes
|
||||
Largest Pcache Allocation: 4368 bytes
|
||||
Lookaside Slots Used: 58 (max 97)
|
||||
Successful lookaside attempts: 153
|
||||
Lookaside failures due to size: 0
|
||||
Lookaside failures due to OOM: 0
|
||||
Pager Heap Usage: 13608 bytes
|
||||
Page cache hits: 2
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Temporary data spilled to disk: 0
|
||||
Schema Heap Usage: 888 bytes
|
||||
Statement Heap/Lookaside Usage: 4496 bytes
|
||||
Fullscan Steps: 0
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 0
|
||||
Virtual Machine Steps: 35
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 4496
|
||||
Bytes received by read(): 7501
|
||||
Bytes sent to write(): 1331
|
||||
Read() system calls: 16
|
||||
Write() system calls: 1
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
1|a||1
|
||||
2|b|1|2
|
||||
3|c|2|3
|
||||
Memory Used: 81320 (max 288992) bytes
|
||||
Number of Outstanding Allocations: 177 (max 222)
|
||||
Number of Pcache Overflow Bytes: 16936 (max 33336) bytes
|
||||
Largest Allocation: 87360 bytes
|
||||
Largest Pcache Allocation: 4368 bytes
|
||||
Lookaside Slots Used: 61 (max 123)
|
||||
Successful lookaside attempts: 266
|
||||
Lookaside failures due to size: 3
|
||||
Lookaside failures due to OOM: 73
|
||||
Pager Heap Usage: 13608 bytes
|
||||
Page cache hits: 3
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Temporary data spilled to disk: 0
|
||||
Schema Heap Usage: 888 bytes
|
||||
Statement Heap/Lookaside Usage: 17568 bytes
|
||||
Fullscan Steps: 2
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 2
|
||||
Bloom filter bypass taken: 1/3
|
||||
Virtual Machine Steps: 150
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 17568
|
||||
Bytes received by read(): 7598
|
||||
Bytes sent to write(): 2665
|
||||
Read() system calls: 18
|
||||
Write() system calls: 2
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
3
|
||||
Memory Used: 77136 (max 288992) bytes
|
||||
Number of Outstanding Allocations: 162 (max 222)
|
||||
Number of Pcache Overflow Bytes: 16936 (max 33336) bytes
|
||||
Largest Allocation: 87360 bytes
|
||||
Largest Pcache Allocation: 4368 bytes
|
||||
Lookaside Slots Used: 56 (max 123)
|
||||
Successful lookaside attempts: 293
|
||||
Lookaside failures due to size: 3
|
||||
Lookaside failures due to OOM: 73
|
||||
Pager Heap Usage: 13608 bytes
|
||||
Page cache hits: 2
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Temporary data spilled to disk: 0
|
||||
Schema Heap Usage: 888 bytes
|
||||
Statement Heap/Lookaside Usage: 3168 bytes
|
||||
Fullscan Steps: 2
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 0
|
||||
Virtual Machine Steps: 19
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 3168
|
||||
Bytes received by read(): 7695
|
||||
Bytes sent to write(): 4069
|
||||
Read() system calls: 20
|
||||
Write() system calls: 3
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
Memory Used: 191456 (max 563448) bytes
|
||||
Number of Outstanding Allocations: 182 (max 243)
|
||||
Number of Pcache Overflow Bytes: 25136 (max 49736) bytes
|
||||
Largest Allocation: 87360 bytes
|
||||
Largest Pcache Allocation: 4368 bytes
|
||||
Lookaside Slots Used: 97 (max 123)
|
||||
Successful lookaside attempts: 632
|
||||
Lookaside failures due to size: 6
|
||||
Lookaside failures due to OOM: 182
|
||||
Pager Heap Usage: 22840 bytes
|
||||
Page cache hits: 10
|
||||
Page cache misses: 0
|
||||
Page cache writes: 0
|
||||
Page cache spills: 0
|
||||
Temporary data spilled to disk: 0
|
||||
Schema Heap Usage: 880 bytes
|
||||
Statement Heap/Lookaside Usage: 35752 bytes
|
||||
Fullscan Steps: 0
|
||||
Sort Operations: 0
|
||||
Autoindex Inserts: 0
|
||||
Virtual Machine Steps: 125
|
||||
Reprepare operations: 0
|
||||
Number of times run: 1
|
||||
Memory used by prepared stmt: 35752
|
||||
Bytes received by read(): 7836
|
||||
Bytes sent to write(): 5408
|
||||
Read() system calls: 24
|
||||
Write() system calls: 4
|
||||
Bytes read from storage: 0
|
||||
Bytes written to storage: 0
|
||||
Cancelled write bytes: 0
|
||||
```
|
||||
|
||||
## Flag
|
||||
|
||||
```
|
||||
-stats
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user