mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Early detection of too many columns in an index avoid a possible 16-bit
signed integer overflow. FossilOrigin-Name: 8af0caeb6d1e55f66ad2f12af94845dccfe1d0420faf326f5917fc07f8aa6050
This commit is contained in:
@ -12,7 +12,6 @@
|
||||
# focus of this file is testing that it is OK to create new tables
|
||||
# and indices while creating existing tables and indices.
|
||||
#
|
||||
# $Id: createtab.test,v 1.3 2007/09/12 17:01:45 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -142,5 +141,14 @@ for {set av 0} {$av<=$upperBound} {incr av} {
|
||||
integrity_check createtab-$av.40
|
||||
|
||||
}
|
||||
|
||||
# 2019-03-31 Ensure that a proper error is returned for an index
|
||||
# with too many columns.
|
||||
#
|
||||
do_test createtab-3.1 {
|
||||
db eval {DROP TABLE IF EXISTS t1;}
|
||||
set sql "CREATE TABLE t1(x,UNIQUE(x[string repeat ,x 100000]))"
|
||||
catchsql $sql
|
||||
} {1 {too many columns in index}}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user