aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeaux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r--src/vdbeaux.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index 7b9b79205..9ea20628f 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -2596,6 +2596,20 @@ void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
}
/*
+** Transfer the column count and name information from one Vdbe to
+** another.
+*/
+void sqlite3VdbeColumnInfoXfer(Vdbe *pTo, Vdbe *pFrom){
+ sqlite3 *db = pTo->db;
+ assert( db==pFrom->db );
+ sqlite3DbFree(db, pTo->aColName);
+ pTo->aColName = pFrom->aColName;
+ pFrom->aColName = 0;
+ pTo->nResColumn = pFrom->nResColumn;
+ pFrom->nResColumn = 0;
+}
+
+/*
** Set the name of the idx'th column to be returned by the SQL statement.
** zName must be a pointer to a nul terminated string.
**