mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Make sure the columns of a VALUES() clause are named "column%d" even if
the VALUES() clause is a subquery in the FROM clause of an outer query. FossilOrigin-Name: acf3b9cc9c3932431979995a1dceacc06c659ab400fad95ce3728ff8895a022b
This commit is contained in:
@@ -1704,7 +1704,11 @@ int sqlite3ColumnsFromExprList(
|
||||
zName = pEList->a[i].zSpan;
|
||||
}
|
||||
}
|
||||
zName = sqlite3MPrintf(db, "%s", zName);
|
||||
if( zName ){
|
||||
zName = sqlite3DbStrDup(db, zName);
|
||||
}else{
|
||||
zName = sqlite3MPrintf(db,"column%d",i);
|
||||
}
|
||||
|
||||
/* Make sure the column name is unique. If the name is not unique,
|
||||
** append an integer to the name so that it becomes unique.
|
||||
|
||||
Reference in New Issue
Block a user