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

Bug fix: Get INSERT INTO ... SELECT working when the target is a virtual

table. (CVS 3374)

FossilOrigin-Name: 7912485705c96e365a942932bb12d5b9113c9885
This commit is contained in:
drh
2006-08-29 18:46:14 +00:00
parent e07b862e71
commit 16ed8a64f6
4 changed files with 60 additions and 9 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
** $Id: insert.c,v 1.171 2006/08/25 23:42:53 drh Exp $
** $Id: insert.c,v 1.172 2006/08/29 18:46:14 drh Exp $
*/
#include "sqliteInt.h"
@@ -621,7 +621,7 @@ void sqlite3Insert(
}else if( useTempTable ){
sqlite3VdbeAddOp(v, OP_Column, srcTab, j);
}else if( pSelect ){
sqlite3VdbeAddOp(v, OP_Dup, i+nColumn-j, 1);
sqlite3VdbeAddOp(v, OP_Dup, i+nColumn-j+IsVirtual(pTab), 1);
}else{
sqlite3ExprCode(pParse, pList->a[j].pExpr);
}