/ Check-in [ca7b7aae]
Login

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

Overview
Comment:Fix a problem with fix [b4b57413].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ca7b7aaed010ec67bec5355a9ac1d7f229d6d5f2ba2d796b76f5e908b1267688
User & Date: dan 2019-01-16 20:48:13
Context
2019-01-17
01:06
Fix a failure in sqlite3ExprCompare() check-in: 835e2cc5 user: drh tags: trunk
2019-01-16
20:48
Fix a problem with fix [b4b57413]. check-in: ca7b7aae user: dan tags: trunk
19:44
Fix a problem in the fts3 matchinfo() function with corrupt database handling. check-in: 24ed5fb6 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/resolve.c.

  1159   1159             if( !db->mallocFailed ){
  1160   1160               assert(pDup);
  1161   1161               iCol = resolveOrderByTermToExprList(pParse, pSelect, pDup);
  1162   1162             }
  1163   1163             if( IN_RENAME_OBJECT ){
  1164   1164               if( iCol>0 ){
  1165   1165                 pItem->done = 1;
  1166         -              break;
         1166  +              continue;
  1167   1167               }
  1168   1168             }else{
  1169   1169               sqlite3ExprDelete(db, pDup);
  1170   1170             }
  1171   1171           }
  1172   1172         }
  1173   1173         if( iCol>0 ){

Changes to test/altertab2.test.

   258    258     SELECT sql FROM sqlite_master WHERE name = 'r3';
   259    259   } {
   260    260     {CREATE TRIGGER r3 AFTER INSERT ON "t3x" WHEN new.abcd NOT NULL BEGIN
   261    261       SELECT abcd,b,c FROM "t3x" EXCEPT SELECT abcd,b,c FROM "t3x" ORDER BY abcd;
   262    262       SELECT rowid, * FROM "t3x";
   263    263     END}
   264    264   }
          265  +
          266  +#-------------------------------------------------------------------------
          267  +reset_db
          268  +
          269  +do_execsql_test 7.0 {
          270  +  CREATE TABLE t1(a,b,c,d,e,f);
          271  +  INSERT INTO t1 VALUES(1,2,3,4,5,6);
          272  +  CREATE TABLE t2(x,y,z);
          273  +}
          274  +
          275  +do_execsql_test 7.1 {
          276  +  SELECT a,b,c FROM t1 UNION SELECT d,e,f FROM t1 ORDER BY b,c;
          277  +} {1 2 3 4 5 6}
          278  +
          279  +do_execsql_test 7.2 {
          280  +  CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
          281  +    INSERT INTO t2
          282  +    SELECT a,b,c FROM t1 UNION SELECT d,e,f FROM t1 ORDER BY b,c;
          283  +  END;
          284  +  INSERT INTO t1 VALUES(2,3,4,5,6,7);
          285  +  SELECT * FROM t2;
          286  +} {1 2 3  2 3 4  4 5 6  5 6 7}
          287  +
          288  +do_execsql_test 7.3 {
          289  +  ALTER TABLE t1 RENAME TO xyzzy;
          290  +  SELECT sql FROM sqlite_master WHERE name='r1'
          291  +} {
          292  +  {CREATE TRIGGER r1 AFTER INSERT ON "xyzzy" BEGIN
          293  +    INSERT INTO t2
          294  +    SELECT a,b,c FROM "xyzzy" UNION SELECT d,e,f FROM "xyzzy" ORDER BY b,c;
          295  +  END}
          296  +}
          297  +
          298  +do_execsql_test 7.3 {
          299  +  ALTER TABLE xyzzy RENAME c TO ccc;
          300  +  SELECT sql FROM sqlite_master WHERE name='r1'
          301  +} {
          302  +  {CREATE TRIGGER r1 AFTER INSERT ON "xyzzy" BEGIN
          303  +    INSERT INTO t2
          304  +    SELECT a,b,ccc FROM "xyzzy" UNION SELECT d,e,f FROM "xyzzy" ORDER BY b,ccc;
          305  +  END}
          306  +}
          307  +
   265    308   
   266    309   finish_test
   267    310   
   268    311