/ Check-in [f9e85e6c]
Login

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

Overview
Comment:Add an assert() as an additional test for fix in check-in [523b42371122d9e1b3].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f9e85e6c79162081f8f512d22951931a89d157a32b24afdc48b7eb865379abe7
User & Date: drh 2019-05-29 18:33:59
Context
2019-05-29
21:18
Much faster implementation of applyNumericAffinity() by avoiding some unnecessary calls to sqlite3Atoi64(). check-in: c1d8a3f6 user: drh tags: trunk
18:33
Add an assert() as an additional test for fix in check-in [523b42371122d9e1b3]. check-in: f9e85e6c user: drh tags: trunk
17:22
Fix the query flattener optimization so that it preserve the "SF_Compound" bit when flattening a compound subquery into a non-compound outer query. Failure to preserve that bit could allow subsequent flattenings which are not valid. Fix for ticket [c41afac34f15781fe09cd]. check-in: 523b4237 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

2536
2537
2538
2539
2540
2541
2542

2543
2544
2545
2546
2547
2548
2549
  sqlite3 *db;          /* Database connection */

  /* Make sure there is no ORDER BY or LIMIT clause on prior SELECTs.  Only
  ** the last (right-most) SELECT in the series may have an ORDER BY or LIMIT.
  */
  assert( p && p->pPrior );  /* Calling function guarantees this much */
  assert( (p->selFlags & SF_Recursive)==0 || p->op==TK_ALL || p->op==TK_UNION );

  db = pParse->db;
  pPrior = p->pPrior;
  dest = *pDest;
  if( pPrior->pOrderBy || pPrior->pLimit ){
    sqlite3ErrorMsg(pParse,"%s clause should come after %s not before",
      pPrior->pOrderBy!=0 ? "ORDER BY" : "LIMIT", selectOpName(p->op));
    rc = 1;







>







2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
  sqlite3 *db;          /* Database connection */

  /* Make sure there is no ORDER BY or LIMIT clause on prior SELECTs.  Only
  ** the last (right-most) SELECT in the series may have an ORDER BY or LIMIT.
  */
  assert( p && p->pPrior );  /* Calling function guarantees this much */
  assert( (p->selFlags & SF_Recursive)==0 || p->op==TK_ALL || p->op==TK_UNION );
  assert( p->selFlags & SF_Compound );
  db = pParse->db;
  pPrior = p->pPrior;
  dest = *pDest;
  if( pPrior->pOrderBy || pPrior->pLimit ){
    sqlite3ErrorMsg(pParse,"%s clause should come after %s not before",
      pPrior->pOrderBy!=0 ? "ORDER BY" : "LIMIT", selectOpName(p->op));
    rc = 1;