/ Check-in [5526e0aa]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Dequote column names generated by the query flattener.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5526e0aa3ccb24988a4f351ac994907b6e89018a
User & Date: drh 2012-10-15 16:24:07
Context
2012-10-15
18:02
Hold the mutex on the shared-cache for the duration of a VACUUM operation. check-in: 629a42d4 user: dan tags: trunk
16:24
Dequote column names generated by the query flattener. check-in: 5526e0aa user: drh tags: trunk
11:28
Fix a failing assert() in wal.c. check-in: 8745530b user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  3094   3094       **
  3095   3095       ** We look at every expression in the outer query and every place we see
  3096   3096       ** "a" we substitute "x*3" and every place we see "b" we substitute "y+10".
  3097   3097       */
  3098   3098       pList = pParent->pEList;
  3099   3099       for(i=0; i<pList->nExpr; i++){
  3100   3100         if( pList->a[i].zName==0 ){
  3101         -        const char *zSpan = pList->a[i].zSpan;
  3102         -        if( ALWAYS(zSpan) ){
  3103         -          pList->a[i].zName = sqlite3DbStrDup(db, zSpan);
  3104         -        }
         3101  +        char *zName = sqlite3DbStrDup(db, pList->a[i].zSpan);
         3102  +        sqlite3Dequote(zName);
         3103  +        pList->a[i].zName = zName;
  3105   3104         }
  3106   3105       }
  3107   3106       substExprList(db, pParent->pEList, iParent, pSub->pEList);
  3108   3107       if( isAgg ){
  3109   3108         substExprList(db, pParent->pGroupBy, iParent, pSub->pEList);
  3110   3109         pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
  3111   3110       }