Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix a segfault caused by having identical window functions in the select-list and ORDER BY clause of a SELECT statement. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
693b4350d741391226a33ab6a05eaad6 |
User & Date: | dan 2018-07-02 17:14:37.869 |
Context
2018-07-02
| ||
17:45 | Fix a problem in the xInverse callback for the built-in sum() window function. (check-in: b656364738 user: dan tags: trunk) | |
17:14 | Fix a segfault caused by having identical window functions in the select-list and ORDER BY clause of a SELECT statement. (check-in: 693b4350d7 user: dan tags: trunk) | |
15:03 | Fix a crash caused by a LIKE pattern that consists of a single escape character. Problem found by OSSFuzz. (check-in: bb9bfc3a12 user: dan tags: trunk) | |
Changes
Changes to src/resolve.c.
︙ | |||
1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 | 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 | + + + + + + + + + + + | /* Otherwise, treat the ORDER BY term as an ordinary expression */ pItem->u.x.iOrderByCol = 0; if( sqlite3ResolveExprNames(pNC, pE) ){ return 1; } for(j=0; j<pSelect->pEList->nExpr; j++){ if( sqlite3ExprCompare(0, pE, pSelect->pEList->a[j].pExpr, -1)==0 ){ #ifndef SQLITE_OMIT_WINDOWFUNC if( pE->pWin ){ Window **pp; for(pp=&pSelect->pWin; *pp; pp=&(*pp)->pNextWin){ if( *pp==pE->pWin ){ *pp = (*pp)->pNextWin; break; } } } #endif pItem->u.x.iOrderByCol = j+1; } } } return sqlite3ResolveOrderGroupBy(pParse, pSelect, pOrderBy, zType); } |
︙ |
Changes to test/window6.test.
︙ | |||
166 167 168 169 170 171 172 | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | + - - - + + + + + + + + + + + + + + + + + + + + + + | INSERT INTO t1 VALUES(''); } do_execsql_test 7.1 { SELECT count(*) FROM t1 WHERE x LIKE '!' ESCAPE '!'; } {0} #------------------------------------------------------------------------- |