Make sure sufficient VDBE registers are allocated for an INSERT...SELECT
when there is an idlist on the insert table that includes an explicit rowid. Ticket [9654505cfda93610585fde5a9bbf2e730c8a8d5] FossilOrigin-Name: 9a2dd18776cc7003752980be0a0920a8799e5f35
This commit is contained in:
@@ -413,6 +413,29 @@ do_execsql_test insert-11.1 {
|
||||
} {123456789 '123456789' '123456789'}
|
||||
|
||||
|
||||
# More columns of input than there are columns in the table.
|
||||
# Ticket http://www.sqlite.org/src/info/e9654505cfda9361
|
||||
#
|
||||
do_execsql_test insert-12.1 {
|
||||
CREATE TABLE t12a(a,b,c,d,e,f,g);
|
||||
INSERT INTO t12a VALUES(101,102,103,104,105,106,107);
|
||||
CREATE TABLE t12b(x);
|
||||
INSERT INTO t12b(x,rowid,x,x,x,x,x) SELECT * FROM t12a;
|
||||
SELECT rowid, x FROM t12b;
|
||||
} {102 101}
|
||||
do_execsql_test insert-12.2 {
|
||||
CREATE TABLE tab1( value INTEGER);
|
||||
INSERT INTO tab1 (value, _rowid_) values( 11, 1);
|
||||
INSERT INTO tab1 (value, _rowid_) SELECT 22,999;
|
||||
SELECT * FROM tab1;
|
||||
} {11 22}
|
||||
do_execsql_test insert-12.3 {
|
||||
CREATE TABLE t12c(a, b DEFAULT 'xyzzy', c);
|
||||
INSERT INTO t12c(a, rowid, c) SELECT 'one', 999, 'two';
|
||||
SELECT * FROM t12c;
|
||||
} {one xyzzy two}
|
||||
|
||||
|
||||
integrity_check insert-99.0
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user