mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Early detection and reporting of too few columns in an rtree CREATE VIRTUAL
TABLE statement. FossilOrigin-Name: ef73107f475e40e6bdd8b722e96992070f81fd2b7a3cb718ec8f251c89ca3e81
This commit is contained in:
@ -3706,8 +3706,8 @@ static int rtreeInit(
|
||||
};
|
||||
|
||||
assert( RTREE_MAX_AUX_COLUMN<256 ); /* Aux columns counted by a u8 */
|
||||
if( argc>RTREE_MAX_AUX_COLUMN+3 ){
|
||||
*pzErr = sqlite3_mprintf("%s", aErrMsg[3]);
|
||||
if( argc<6 || argc>RTREE_MAX_AUX_COLUMN+3 ){
|
||||
*pzErr = sqlite3_mprintf("%s", aErrMsg[2 + (argc>=6)]);
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
|
||||
|
@ -112,6 +112,9 @@ for {set nCol 1} {$nCol<[llength $cols]} {incr nCol} {
|
||||
|
||||
catchsql { DROP TABLE t1 }
|
||||
}
|
||||
do_catchsql_test rtree-1.3.1000 {
|
||||
CREATE VIRTUAL TABLE t1000 USING rtree;
|
||||
} {1 {Too few columns for an rtree table}}
|
||||
|
||||
# Like execsql except display output as integer where that can be
|
||||
# done without loss of information.
|
||||
|
Reference in New Issue
Block a user