SQLite

Changes On Branch cgo-warning-workaround
Login

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

Changes In Branch cgo-warning-workaround Excluding Merge-Ins

This is equivalent to a diff from 56e5063c to d4bf60f4

2020-05-26
11:10
Changes to sqlite3SelectNew() to work around a false-positive warning from GCC-10. The code is very slightly larger and slower as a result. (check-in: 04e1edd8 user: drh tags: trunk)
2020-05-25
12:02
Make sure variable declarations are at start of scope even when SQLITE_ENABLE_SNAPSHOT is used. (check-in: a77ceaf6 user: drh tags: trunk)
01:31
Attempt to work around a false-positive warning in the CGo compiler. (Closed-Leaf check-in: d4bf60f4 user: drh tags: cgo-warning-workaround)
2020-05-24
12:36
Version number to 3.32.1. (check-in: 56e5063c user: drh tags: trunk)
03:38
When rewriting a query for window functions, if the rewrite changes the depth of TK_AGG_FUNCTION nodes, be sure to adjust the Expr.op2 field appropriately. Fix for ticket [7a5279a25c57adf1] (check-in: ad7bb70a user: drh tags: trunk)

Changes to src/select.c.

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
  Expr *pWhere,         /* the WHERE clause */
  ExprList *pGroupBy,   /* the GROUP BY clause */
  Expr *pHaving,        /* the HAVING clause */
  ExprList *pOrderBy,   /* the ORDER BY clause */
  u32 selFlags,         /* Flag parameters, such as SF_Distinct */
  Expr *pLimit          /* LIMIT value.  NULL means not used */
){
  Select *pNew;
  Select standin;
  pNew = sqlite3DbMallocRawNN(pParse->db, sizeof(*pNew) );
  if( pNew==0 ){
    assert( pParse->db->mallocFailed );
    pNew = &standin;
  }
  if( pEList==0 ){
    pEList = sqlite3ExprListAppend(pParse, 0,
                                   sqlite3Expr(pParse->db,TK_ASTERISK,0));







|

|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
  Expr *pWhere,         /* the WHERE clause */
  ExprList *pGroupBy,   /* the GROUP BY clause */
  Expr *pHaving,        /* the HAVING clause */
  ExprList *pOrderBy,   /* the ORDER BY clause */
  u32 selFlags,         /* Flag parameters, such as SF_Distinct */
  Expr *pLimit          /* LIMIT value.  NULL means not used */
){
  Select *pNew, *pAllocated;
  Select standin;
  pAllocated = pNew = sqlite3DbMallocRawNN(pParse->db, sizeof(*pNew) );
  if( pNew==0 ){
    assert( pParse->db->mallocFailed );
    pNew = &standin;
  }
  if( pEList==0 ){
    pEList = sqlite3ExprListAppend(pParse, 0,
                                   sqlite3Expr(pParse->db,TK_ASTERISK,0));
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
  pNew->pWith = 0;
#ifndef SQLITE_OMIT_WINDOWFUNC
  pNew->pWin = 0;
  pNew->pWinDefn = 0;
#endif
  if( pParse->db->mallocFailed ) {
    clearSelect(pParse->db, pNew, pNew!=&standin);
    pNew = 0;
  }else{
    assert( pNew->pSrc!=0 || pParse->nErr>0 );
  }
  assert( pNew!=&standin );
  return pNew;
}


/*
** Delete the given Select structure and all of its substructures.
*/
void sqlite3SelectDelete(sqlite3 *db, Select *p){







|



<
|







170
171
172
173
174
175
176
177
178
179
180

181
182
183
184
185
186
187
188
  pNew->pWith = 0;
#ifndef SQLITE_OMIT_WINDOWFUNC
  pNew->pWin = 0;
  pNew->pWinDefn = 0;
#endif
  if( pParse->db->mallocFailed ) {
    clearSelect(pParse->db, pNew, pNew!=&standin);
    pAllocated = 0;
  }else{
    assert( pNew->pSrc!=0 || pParse->nErr>0 );
  }

  return pAllocated;
}


/*
** Delete the given Select structure and all of its substructures.
*/
void sqlite3SelectDelete(sqlite3 *db, Select *p){