1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Avoid using a prepared statement for ".stats on" after it has been closed

by the ".eqp full" logic.  Fix for ticket [7be932dfa60a8a6b3b26bcf76].

FossilOrigin-Name: bb87c054b1b76959e46258ac66b24027f468b390a4148ac67f208a1fbeda4060
This commit is contained in:
drh
2018-06-07 15:23:43 +00:00
parent df12595c09
commit 3c49eaf4be
4 changed files with 22 additions and 8 deletions

View File

@ -637,6 +637,19 @@ do_test shell1-3.23b.4 {
catchcmd "test.db" ".stats OFF BAD"
} {1 {Usage: .stats ?on|off?}}
# Ticket 7be932dfa60a8a6b3b26bcf7623ec46e0a403ddb 2018-06-07
# Adverse interaction between .stats and .eqp
#
do_test shell1-3.23b.5 {
catchcmd "test.db" [string map {"\n " "\n"} {
CREATE TEMP TABLE t1(x);
INSERT INTO t1 VALUES(1),(2);
.stats on
.eqp full
SELECT * FROM t1;
}]
} {/1\n2\n/}
# .tables ?TABLE? List names of tables
# If TABLE specified, only list tables matching
# LIKE pattern TABLE.