mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Fix problems with INSERT INTO ... SELECT ... statements that write to tables with __hidden__ columns.
FossilOrigin-Name: 59bd0ec7d4327852ee8c0206b2c59d0a12484db8
This commit is contained in:
@ -70,5 +70,32 @@ foreach {tn view} {
|
||||
SELECT * FROM x1;
|
||||
} {1 2 3 4 5 {} 7 8 9}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Test INSERT INTO ... SELECT ... statements that write to tables with
|
||||
# hidden columns.
|
||||
#
|
||||
do_execsql_test 3.1 {
|
||||
CREATE TABLE t4(a, __hidden__b, c);
|
||||
INSERT INTO t4 SELECT 1, 2;
|
||||
SELECT a, __hidden__b, c FROM t4;
|
||||
} {1 {} 2}
|
||||
|
||||
do_execsql_test 3.2.1 {
|
||||
CREATE TABLE t5(__hidden__a, b, c);
|
||||
CREATE TABLE t6(__hidden__a, b, c);
|
||||
INSERT INTO t6(__hidden__a, b, c) VALUES(1, 2, 3);
|
||||
INSERT INTO t6(__hidden__a, b, c) VALUES(4, 5, 6);
|
||||
INSERT INTO t6(__hidden__a, b, c) VALUES(7, 8, 9);
|
||||
}
|
||||
|
||||
do_execsql_test 3.2.2 {
|
||||
INSERT INTO t5 SELECT * FROM t6;
|
||||
SELECT * FROM t5;
|
||||
} {2 3 5 6 8 9}
|
||||
|
||||
do_execsql_test 3.2.3 {
|
||||
SELECT __hidden__a FROM t5;
|
||||
} {{} {} {}}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user