/ Check-in [14784c31]
Login

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

Overview
Comment:Change the multiSelectOrderBy() routine to return non-zero if there has been any prior error.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 14784c317bff05dd0a74e2596432dfd12c139391
User & Date: drh 2015-04-15 07:10:25
Context
2015-04-15
07:19
Remove an incorrect ALWAYS() from the table_info pragma. check-in: 0e087c01 user: drh tags: trunk
07:10
Change the multiSelectOrderBy() routine to return non-zero if there has been any prior error. check-in: 14784c31 user: drh tags: trunk
06:45
Fix a faulty assert() statement in the name resolver associated with the optimization that converts compound selects with ORDER BY COLLATE into subqueries. check-in: c72324ef user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  3067   3067     }
  3068   3068     p->pPrior = pPrior;
  3069   3069     pPrior->pNext = p;
  3070   3070   
  3071   3071     /*** TBD:  Insert subroutine calls to close cursors on incomplete
  3072   3072     **** subqueries ****/
  3073   3073     explainComposite(pParse, p->op, iSub1, iSub2, 0);
  3074         -  return SQLITE_OK;
         3074  +  return pParse->nErr!=0;
  3075   3075   }
  3076   3076   #endif
  3077   3077   
  3078   3078   #if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
  3079   3079   /* Forward Declarations */
  3080   3080   static void substExprList(sqlite3*, ExprList*, int, ExprList*);
  3081   3081   static void substSelect(sqlite3*, Select *, int, ExprList *);

Changes to test/select4.test.

   793    793       SELECT x FROM t2
   794    794       INTERSECT
   795    795       SELECT x FROM t2
   796    796       UNION ALL
   797    797       SELECT x FROM t2
   798    798       EXCEPT
   799    799       SELECT x FROM t2
          800  +  }
          801  +} {1 {SELECTs to the left and right of UNION do not have the same number of result columns}}
          802  +do_test select4-11.16 {
          803  +  catchsql {
          804  +    INSERT INTO t2(rowid) VALUES(2) UNION SELECT 3,4 UNION SELECT 5,6 ORDER BY 1;
   800    805     }
   801    806   } {1 {SELECTs to the left and right of UNION do not have the same number of result columns}}
   802    807   
   803    808   do_test select4-12.1 {
   804    809     sqlite3 db2 :memory:
   805    810     catchsql {
   806    811       SELECT 1 UNION SELECT 2,3 UNION SELECT 4,5 ORDER BY 1;