Fossil SCM

Fix the report logic so that @-bindings in the SQL work the same as $- and :-bindings.

drh 2017-01-10 13:05 trunk
Commit 241f1e2a4ff9fa19375153304561c1f5a418d06f
1 file changed +1 -1
+1 -1
--- src/report.c
+++ src/report.c
@@ -916,11 +916,11 @@
916916
917917
nVar = sqlite3_bind_parameter_count(pStmt);
918918
for(i=1; i<=nVar; i++){
919919
const char *zVar = sqlite3_bind_parameter_name(pStmt, i);
920920
if( zVar==0 ) continue;
921
- if( zVar[0]!='$' && zVar[0]!='$' && zVar[0]!=':' ) continue;
921
+ if( zVar[0]!='$' && zVar[0]!='@' && zVar[0]!=':' ) continue;
922922
if( !fossil_islower(zVar[1]) ) continue;
923923
if( strcmp(zVar, "$login")==0 ){
924924
sqlite3_bind_text(pStmt, i, g.zLogin, -1, SQLITE_TRANSIENT);
925925
}else{
926926
sqlite3_bind_text(pStmt, i, P(zVar+1), -1, SQLITE_TRANSIENT);
927927
--- src/report.c
+++ src/report.c
@@ -916,11 +916,11 @@
916
917 nVar = sqlite3_bind_parameter_count(pStmt);
918 for(i=1; i<=nVar; i++){
919 const char *zVar = sqlite3_bind_parameter_name(pStmt, i);
920 if( zVar==0 ) continue;
921 if( zVar[0]!='$' && zVar[0]!='$' && zVar[0]!=':' ) continue;
922 if( !fossil_islower(zVar[1]) ) continue;
923 if( strcmp(zVar, "$login")==0 ){
924 sqlite3_bind_text(pStmt, i, g.zLogin, -1, SQLITE_TRANSIENT);
925 }else{
926 sqlite3_bind_text(pStmt, i, P(zVar+1), -1, SQLITE_TRANSIENT);
927
--- src/report.c
+++ src/report.c
@@ -916,11 +916,11 @@
916
917 nVar = sqlite3_bind_parameter_count(pStmt);
918 for(i=1; i<=nVar; i++){
919 const char *zVar = sqlite3_bind_parameter_name(pStmt, i);
920 if( zVar==0 ) continue;
921 if( zVar[0]!='$' && zVar[0]!='@' && zVar[0]!=':' ) continue;
922 if( !fossil_islower(zVar[1]) ) continue;
923 if( strcmp(zVar, "$login")==0 ){
924 sqlite3_bind_text(pStmt, i, g.zLogin, -1, SQLITE_TRANSIENT);
925 }else{
926 sqlite3_bind_text(pStmt, i, P(zVar+1), -1, SQLITE_TRANSIENT);
927

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button