1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-24 14:17:58 +03:00

Return a meaningful error message if a keyword is used as an rtree table column name. Ticket #3970. (CVS 6902)

FossilOrigin-Name: 046efe46b50fbe928f39a0cda1b1006d486ce9f5
This commit is contained in:
danielk1977
2009-07-17 16:54:48 +00:00
parent 9a8cee7f73
commit 33c54a989e
4 changed files with 22 additions and 12 deletions

View File

@@ -12,7 +12,7 @@
** This file contains code for implementations of the r-tree and r*-tree
** algorithms packaged as an SQLite virtual table module.
**
** $Id: rtree.c,v 1.12 2008/12/22 15:04:32 danielk1977 Exp $
** $Id: rtree.c,v 1.13 2009/07/17 16:54:48 danielk1977 Exp $
*/
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RTREE)
@@ -2737,8 +2737,10 @@ static int rtreeInit(
zSql = sqlite3_mprintf("%s);", zTmp);
sqlite3_free(zTmp);
}
if( !zSql || sqlite3_declare_vtab(db, zSql) ){
if( !zSql ){
rc = SQLITE_NOMEM;
}else if( SQLITE_OK!=(rc = sqlite3_declare_vtab(db, zSql)) ){
*pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db));
}
sqlite3_free(zSql);
}