1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Add the SQLITE_DBCONFIG_ENABLE_COMMENTS setting (default on) to enable or

disable the ability to include comments in SQL input text.

FossilOrigin-Name: 393749a2e22d5c8eba36e2106a35909420aa6316652d1ab4f18ef699247b6fba
This commit is contained in:
drh
2025-01-31 01:34:19 +00:00
parent 0911f86abf
commit e16b345243
9 changed files with 50 additions and 26 deletions

View File

@@ -830,7 +830,9 @@ int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
z = (const unsigned char*)zCreateTable;
for(i=0; aKeyword[i]; i++){
int tokenType = 0;
do{ z += sqlite3GetToken(z, &tokenType); }while( tokenType==TK_SPACE );
do{
z += sqlite3GetToken(z, &tokenType);
}while( tokenType==TK_SPACE || tokenType==TK_COMMENT );
if( tokenType!=aKeyword[i] ){
sqlite3ErrorWithMsg(db, SQLITE_ERROR, "syntax error");
return SQLITE_ERROR;