1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Improved error messages. Limit the number of auxiliary columns to 100.

FossilOrigin-Name: 059d20abd57727e6d312f15b640359ef778786f577d9b50b17b57195db2d0aef
This commit is contained in:
drh
2018-05-18 15:21:43 +00:00
parent 26fb126622
commit 252f39619a
4 changed files with 46 additions and 10 deletions

View File

@ -609,5 +609,37 @@ do_execsql_test 15.2 {
COMMIT;
}
# Test cases for the new auxiliary columns feature
#
do_catchsql_test 16.100 {
CREATE VIRTUAL TABLE t16 USING rtree(id,x0,x1,y0,+aux1,x1);
} {1 {Auxiliary rtree columns must be last}}
do_test 16.110 {
set sql {
CREATE VIRTUAL TABLE t16 USING rtree(
id, x00, x01, x10, x11, x20, x21, x30, x31, x40, x41
}
for {set i 12} {$i<=100} {incr i} {
append sql ", +a$i"
}
append sql ");"
execsql $sql
} {}
do_test 16.120 {
set sql {
CREATE VIRTUAL TABLE t16b USING rtree(
id, x00, x01, x10, x11, x20, x21, x30, x31, x40, x41
}
for {set i 12} {$i<=101} {incr i} {
append sql ", +a$i"
}
append sql ");"
catchsql $sql
} {1 {Too many columns for an rtree table}}
expand_all_sql db
finish_test