mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
For statements of just an unadorned VALUES clause, assign column names
as "columnN" for increasing whole numbers N. FossilOrigin-Name: 260587d2727f66d7fd65ef672ee46c92024f1d30
This commit is contained in:
@@ -1363,8 +1363,9 @@ static void generateColumnNames(
|
||||
sqlite3VdbeSetColName(v, i, COLNAME_NAME, zCol, SQLITE_TRANSIENT);
|
||||
}
|
||||
}else{
|
||||
sqlite3VdbeSetColName(v, i, COLNAME_NAME,
|
||||
sqlite3DbStrDup(db, pEList->a[i].zSpan), SQLITE_DYNAMIC);
|
||||
const char *z = pEList->a[i].zSpan;
|
||||
z = z==0 ? sqlite3MPrintf(db, "column%d", i+1) : sqlite3DbStrDup(db, z);
|
||||
sqlite3VdbeSetColName(v, i, COLNAME_NAME, z, SQLITE_DYNAMIC);
|
||||
}
|
||||
}
|
||||
generateColumnTypes(pParse, pTabList, pEList);
|
||||
|
||||
Reference in New Issue
Block a user