1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Allow CREATE TABLE to occur while other queries are running. DROP TABLE is

still prohibited, however, since we do not want to delete a table out
from under an running query. (CVS 3902)

FossilOrigin-Name: 5b4bf1fce4d589337cfb1b46d75c751bbdc607d5
This commit is contained in:
drh
2007-05-02 17:54:55 +00:00
parent 9f8d64009e
commit b7af4452d9
8 changed files with 174 additions and 37 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.367 2007/05/02 17:48:46 danielk1977 Exp $
** $Id: btree.c,v 1.368 2007/05/02 17:54:56 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
@@ -5755,15 +5755,6 @@ int sqlite3BtreeCreateTable(Btree *p, int *piTable, int flags){
}
assert( !pBt->readOnly );
/* It is illegal to create a table if any cursors are open on the
** database. This is because in auto-vacuum mode the backend may
** need to move a database page to make room for the new root-page.
** If an open cursor was using the page a problem would occur.
*/
if( pBt->pCursor ){
return SQLITE_LOCKED;
}
#ifdef SQLITE_OMIT_AUTOVACUUM
rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
if( rc ) return rc;