mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
Prohibit the user from changing the temporary storage medium (pragma temp_store) while there is a read transaction open on the temporary database. Add tests to shared.test to cover a few more lines in btree.c. (CVS 5362)
FossilOrigin-Name: 92e0cf9a08a8b337a8f239afb048a0e045485771
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** This file contains code used to implement the PRAGMA command.
|
||||
**
|
||||
** $Id: pragma.c,v 1.181 2008/06/26 10:54:12 danielk1977 Exp $
|
||||
** $Id: pragma.c,v 1.182 2008/07/08 07:35:52 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -111,7 +111,7 @@ static int getTempStore(const char *z){
|
||||
static int invalidateTempStorage(Parse *pParse){
|
||||
sqlite3 *db = pParse->db;
|
||||
if( db->aDb[1].pBt!=0 ){
|
||||
if( !db->autoCommit ){
|
||||
if( !db->autoCommit || sqlite3BtreeIsInReadTrans(db->aDb[1].pBt) ){
|
||||
sqlite3ErrorMsg(pParse, "temporary storage cannot be changed "
|
||||
"from within a transaction");
|
||||
return SQLITE_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user