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

The {quote: SrcList} object was not being expanded correctly by a call to

sqliteSrcListAppend() if the {quote: SrcList} had previously been duplicated by
a call to sqliteSrcListDup().  Ticket #416. This check-in fixes that problem
by keeping a separate nAlloc field on {quote: SrcList}.  A similar change is made
to {quote: IdList} and {quote: ExprList} to avoid future problems. (CVS 1067)

FossilOrigin-Name: da6273255471673841fdcadc688aeac80722e130
This commit is contained in:
drh
2003-07-30 12:34:12 +00:00
parent a76c82eb0d
commit 4305d10360
7 changed files with 98 additions and 60 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.194 2003/07/20 01:16:47 drh Exp $
** @(#) $Id: sqliteInt.h,v 1.195 2003/07/30 12:34:12 drh Exp $
*/
#include "config.h"
#include "sqlite.h"
@@ -653,6 +653,7 @@ struct Expr {
*/
struct ExprList {
int nExpr; /* Number of expressions on the list */
int nAlloc; /* Number of entries allocated below */
struct ExprList_item {
Expr *pExpr; /* The list of expressions */
char *zName; /* Token associated with this expression */
@@ -679,6 +680,7 @@ struct ExprList {
*/
struct IdList {
int nId; /* Number of identifiers on the list */
int nAlloc; /* Number of entries allocated for a[] below */
struct IdList_item {
char *zName; /* Name of the identifier */
int idx; /* Index in some Table.aCol[] of a column named zName */
@@ -697,7 +699,8 @@ struct IdList {
** now be identified by a database name, a dot, then the table name: ID.ID.
*/
struct SrcList {
int nSrc; /* Number of tables or subqueries in the FROM clause */
u16 nSrc; /* Number of tables or subqueries in the FROM clause */
u16 nAlloc; /* Number of entries allocated in a[] below */
struct SrcList_item {
char *zDatabase; /* Name of database holding this table */
char *zName; /* Name of the table */