aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authordrh <>2024-03-09 18:41:40 +0000
committerdrh <>2024-03-09 18:41:40 +0000
commit5007833f5f82d33c95f44c65fc46221de1c5950f (patch)
tree3e9ddbca8dbadbb682c5f2ded3434fcd44e73c6a /ext
parentaa13f4c132ced1fda8d0d436b72c9c0b58ab16e2 (diff)
downloadsqlite-5007833f5f82d33c95f44c65fc46221de1c5950f.tar.gz
sqlite-5007833f5f82d33c95f44c65fc46221de1c5950f.zip
Fix the .expert command in the shell so that it does not leak memory if not
followed by SQL and so that it works with reverse_unordered_selects. FossilOrigin-Name: 7ead022edaf7a0cd6a8976a1261246084975c9a5be5c893f6c751bb5f963ac0f
Diffstat (limited to 'ext')
-rw-r--r--ext/expert/sqlite3expert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/expert/sqlite3expert.c b/ext/expert/sqlite3expert.c
index 33d62226f..276c2cc9f 100644
--- a/ext/expert/sqlite3expert.c
+++ b/ext/expert/sqlite3expert.c
@@ -1948,7 +1948,7 @@ sqlite3expert *sqlite3_expert_new(sqlite3 *db, char **pzErrmsg){
sqlite3_stmt *pSql = 0;
rc = idxPrintfPrepareStmt(pNew->db, &pSql, pzErrmsg,
"SELECT sql FROM sqlite_schema WHERE name NOT LIKE 'sqlite_%%'"
- " AND sql NOT LIKE 'CREATE VIRTUAL %%'"
+ " AND sql NOT LIKE 'CREATE VIRTUAL %%' ORDER BY rowid"
);
while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pSql) ){
const char *zSql = (const char*)sqlite3_column_text(pSql, 0);