mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
The sqlite3_declare_vtab() interface should return SQLITE_ERROR, not
SQLITE_MISUSE when a nonsense SQL input is provided, for legacy compatibility. [forum:/forumpost/4b875d7b2a|Forum post 4b875d7b2a]. FossilOrigin-Name: 1ec2961a0341619ae88832942b52606b3246fc0de07ca6da0300e4bfc656ecf0
This commit is contained in:
@@ -831,7 +831,10 @@ int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
|
||||
for(i=0; aKeyword[i]; i++){
|
||||
int tokenType = 0;
|
||||
do{ z += sqlite3GetToken(z, &tokenType); }while( tokenType==TK_SPACE );
|
||||
if( tokenType!=aKeyword[i] ) return SQLITE_MISUSE_BKPT;
|
||||
if( tokenType!=aKeyword[i] ){
|
||||
sqlite3ErrorWithMsg(db, SQLITE_ERROR, "syntax error");
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
sqlite3_mutex_enter(db->mutex);
|
||||
|
Reference in New Issue
Block a user