SQLite

Check-in [3926ff17]
Login

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

Overview
Comment:Remove an incorrect assert() added earlier today.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | early-winfunc-rewrite-dev
Files: files | file ages | folders
SHA3-256: 3926ff1725710070c23148b2cafda357daaf4be97eb3840d3153eea5f653426a
User & Date: drh 2020-06-06 14:58:15
Context
2020-06-06
20:48
Merge multiple changes from trunk to address concerns with window-function parse-tree rewriting. (check-in: 05418b2a user: drh tags: branch-3.32-early-winfunc-rewrite)
18:34
In the query flattener, defer deleting content until after associated Parse object is destroyed, in case some of the deleted expressions have been collected for use by sAggInfo. (check-in: 03b32be4 user: drh tags: early-winfunc-rewrite-dev)
14:58
Remove an incorrect assert() added earlier today. (check-in: 3926ff17 user: drh tags: early-winfunc-rewrite-dev)
14:44
When rewriting the parse-tree for window functions, ensure that the inserted subqueries have an accurate SF_Aggregate bit set. This change also coincidentally fixes ticket [0899cf62f597d7e7], even thought that was not the issue we were working on at the time. (check-in: 2cddb24e user: drh tags: early-winfunc-rewrite-dev)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
void sqlite3SelectPrep(
  Parse *pParse,         /* The parser context */
  Select *p,             /* The SELECT statement being coded. */
  NameContext *pOuterNC  /* Name context for container */
){
  assert( p!=0 || pParse->db->mallocFailed );
  if( pParse->db->mallocFailed ) return;
  assert( (p->selFlags & SF_HasTypeInfo)==0 );
  sqlite3SelectExpand(pParse, p);
  if( pParse->nErr || pParse->db->mallocFailed ) return;
  sqlite3ResolveSelectNames(pParse, p, pOuterNC);
  if( pParse->nErr || pParse->db->mallocFailed ) return;
  sqlite3SelectAddTypeInfo(pParse, p);
}








<







5332
5333
5334
5335
5336
5337
5338

5339
5340
5341
5342
5343
5344
5345
void sqlite3SelectPrep(
  Parse *pParse,         /* The parser context */
  Select *p,             /* The SELECT statement being coded. */
  NameContext *pOuterNC  /* Name context for container */
){
  assert( p!=0 || pParse->db->mallocFailed );
  if( pParse->db->mallocFailed ) return;

  sqlite3SelectExpand(pParse, p);
  if( pParse->nErr || pParse->db->mallocFailed ) return;
  sqlite3ResolveSelectNames(pParse, p, pOuterNC);
  if( pParse->nErr || pParse->db->mallocFailed ) return;
  sqlite3SelectAddTypeInfo(pParse, p);
}