1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Ensure temp db is open before executing a pragma like "temp.cachesize = xxx". Fix for #1682. (CVS 3104)

FossilOrigin-Name: 1e4644b2369547da65fcaa9a3c8ddd206a3c82ae
This commit is contained in:
danielk1977
2006-02-17 12:25:14 +00:00
parent 7d9bd4e19e
commit ddfb2f036a
6 changed files with 54 additions and 16 deletions

View File

@@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.386 2006/02/10 18:08:09 drh Exp $
** $Id: build.c,v 1.387 2006/02/17 12:25:15 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -2958,7 +2958,7 @@ void sqlite3RollbackTransaction(Parse *pParse){
** Make sure the TEMP database is open and available for use. Return
** the number of errors. Leave any error messages in the pParse structure.
*/
static int sqlite3OpenTempDatabase(Parse *pParse){
int sqlite3OpenTempDatabase(Parse *pParse){
sqlite3 *db = pParse->db;
if( db->aDb[1].pBt==0 && !pParse->explain ){
int rc = sqlite3BtreeFactory(db, 0, 0, MAX_PAGES, &db->aDb[1].pBt);