/ Check-in [9367632d]
Login

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

Overview
Comment:Fix a pointless conditional. Add a test case.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9367632dd7e4fec9197227e35b0627c2e81ebffc
User & Date: drh 2014-02-10 21:07:51
Context
2014-02-11
05:26
Merge latest trunk changes. check-in: 1f2e1b0c user: dan tags: deferred-open
01:50
Make sure that virtual WHERE-clause terms do not get transformed into real terms when processing set of OR-connected terms. Fix for ticket [4c86b126f22ad]. check-in: c950d6c4 user: drh tags: trunk
2014-02-10
21:07
Fix a pointless conditional. Add a test case. check-in: 9367632d user: drh tags: trunk
18:56
Fix the compound-select-to-subquery converter so that it works with the new compound-select object linkage introduced as part of the fix for ticket [31a19d11b97088296]. check-in: 572d4be4 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  3626   3626     p->pWhere = 0;
  3627   3627     pNew->pGroupBy = 0;
  3628   3628     pNew->pHaving = 0;
  3629   3629     pNew->pOrderBy = 0;
  3630   3630     p->pPrior = 0;
  3631   3631     p->pNext = 0;
  3632   3632     p->selFlags &= ~SF_Compound;
  3633         -  if( pNew->pPrior ) pNew->pPrior->pNext = pNew;
         3633  +  assert( pNew->pPrior!=0 );
         3634  +  pNew->pPrior->pNext = pNew;
  3634   3635     pNew->pLimit = 0;
  3635   3636     pNew->pOffset = 0;
  3636   3637     return WRC_Continue;
  3637   3638   }
  3638   3639   
  3639   3640   #ifndef SQLITE_OMIT_CTE
  3640   3641   /*

Changes to test/selectA.test.

  1288   1288         UNION SELECT a,b,c FROM t3
  1289   1289         INTERSECT SELECT a,b,c FROM t3
  1290   1290         EXCEPT SELECT c,b,a FROM t1
  1291   1291         UNION SELECT a,b,c FROM t3
  1292   1292         ORDER BY y COLLATE NOCASE DESC,x,z)))
  1293   1293     }
  1294   1294   } {MAD}
         1295  +do_execsql_test selectA-3.98 {
         1296  +  WITH RECURSIVE
         1297  +    xyz(n) AS (
         1298  +      SELECT upper((SELECT x FROM (
         1299  +        SELECT x,y,z FROM t2
         1300  +        INTERSECT SELECT a,b,c FROM t3
         1301  +        EXCEPT SELECT c,b,a FROM t1
         1302  +        UNION SELECT a,b,c FROM t3
         1303  +        INTERSECT SELECT a,b,c FROM t3
         1304  +        EXCEPT SELECT c,b,a FROM t1
         1305  +        UNION SELECT a,b,c FROM t3
         1306  +        ORDER BY y COLLATE NOCASE DESC,x,z)))
         1307  +      UNION ALL
         1308  +      SELECT n || '+' FROM xyz WHERE length(n)<5
         1309  +    )
         1310  +  SELECT n FROM xyz ORDER BY +n;
         1311  +} {MAD MAD+ MAD++}
  1295   1312   
  1296   1313   finish_test