1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Improved error message when a #NNN parameter appears on user input.

Additional coverage testing. (CVS 2582)

FossilOrigin-Name: 3c00f5982ae61dfcd26c33ccdb81736628dbfce5
This commit is contained in:
drh
2005-08-12 22:58:53 +00:00
parent d2687b7731
commit bb7ac00bf0
5 changed files with 21 additions and 12 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.215 2005/08/12 22:56:09 drh Exp $
** $Id: expr.c,v 1.216 2005/08/12 22:58:53 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -226,11 +226,11 @@ Expr *sqlite3RegisterExpr(Parse *pParse, Token *pToken){
Vdbe *v = pParse->pVdbe;
Expr *p;
int depth;
if( v==0 ) return 0;
if( pParse->nested==0 ){
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", pToken);
return 0;
}
if( v==0 ) return 0;
p = sqlite3Expr(TK_REGISTER, 0, 0, pToken);
if( p==0 ){
return 0; /* Malloc failed */