Fossil SCM
Use more aggressive cleanup when coming back from the 'sqlite' command, to permit TH1 hooks to exit cleanly.
Commit
b8b037610f7f717471200ad93a9d603bf9a49f0a
Parent
5a2b7356b4af9c9…
1 file changed
+4
+4
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -148,11 +148,15 @@ | ||
| 148 | 148 | extern int sqlite3_shell(int, char**); |
| 149 | 149 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); |
| 150 | 150 | db_close(1); |
| 151 | 151 | sqlite3_shutdown(); |
| 152 | 152 | sqlite3_shell(g.argc-1, g.argv+1); |
| 153 | + sqlite3_cancel_auto_extension((void(*)(void))sqlcmd_autoinit); | |
| 153 | 154 | g.db = 0; |
| 155 | + g.zMainDbType = 0; | |
| 156 | + g.repositoryOpen = 0; | |
| 157 | + g.localOpen = 0; | |
| 154 | 158 | } |
| 155 | 159 | |
| 156 | 160 | /* |
| 157 | 161 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 158 | 162 | ** to load the name and database connection for the open Fossil database. |
| 159 | 163 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -148,11 +148,15 @@ | |
| 148 | extern int sqlite3_shell(int, char**); |
| 149 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); |
| 150 | db_close(1); |
| 151 | sqlite3_shutdown(); |
| 152 | sqlite3_shell(g.argc-1, g.argv+1); |
| 153 | g.db = 0; |
| 154 | } |
| 155 | |
| 156 | /* |
| 157 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 158 | ** to load the name and database connection for the open Fossil database. |
| 159 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -148,11 +148,15 @@ | |
| 148 | extern int sqlite3_shell(int, char**); |
| 149 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); |
| 150 | db_close(1); |
| 151 | sqlite3_shutdown(); |
| 152 | sqlite3_shell(g.argc-1, g.argv+1); |
| 153 | sqlite3_cancel_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 154 | g.db = 0; |
| 155 | g.zMainDbType = 0; |
| 156 | g.repositoryOpen = 0; |
| 157 | g.localOpen = 0; |
| 158 | } |
| 159 | |
| 160 | /* |
| 161 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 162 | ** to load the name and database connection for the open Fossil database. |
| 163 |