1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Reference count Table structures so that they are not deallocated too soon.

Ticket #1210. (CVS 2498)

FossilOrigin-Name: e73d25c7419d580c47925494621df26d2fb9f27e
This commit is contained in:
drh
2005-06-06 21:19:56 +00:00
parent 473d179d8a
commit ed8a3bb108
9 changed files with 79 additions and 64 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that used to generate VDBE code
** that implements the ALTER TABLE command.
**
** $Id: alter.c,v 1.6 2005/03/28 00:07:16 danielk1977 Exp $
** $Id: alter.c,v 1.7 2005/06/06 21:19:57 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -538,6 +538,7 @@ void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){
}
pNew->iDb = iDb;
pNew->addColOffset = pTab->addColOffset;
pNew->nRef = 1;
/* Begin a transaction and increment the schema cookie. */
sqlite3BeginWriteOperation(pParse, 0, iDb);