/ Check-in [0e087c01]
Login

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

Overview
Comment:Remove an incorrect ALWAYS() from the table_info pragma.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0e087c0183bc7a758cf2a1d39158bc24fde833a2
User & Date: drh 2015-04-15 07:19:27
Context
2015-04-15
07:34
Remove an incorrect ALWAYS() from the automatic index generator. check-in: eeb4bd06 user: drh tags: trunk
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
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

  1037   1037             sqlite3VdbeAddOp2(v, OP_Null, 0, 5);
  1038   1038           }
  1039   1039           if( (pCol->colFlags & COLFLAG_PRIMKEY)==0 ){
  1040   1040             k = 0;
  1041   1041           }else if( pPk==0 ){
  1042   1042             k = 1;
  1043   1043           }else{
  1044         -          for(k=1; ALWAYS(k<=pTab->nCol) && pPk->aiColumn[k-1]!=i; k++){}
         1044  +          for(k=1; k<=pTab->nCol && pPk->aiColumn[k-1]!=i; k++){}
  1045   1045           }
  1046   1046           sqlite3VdbeAddOp2(v, OP_Integer, k, 6);
  1047   1047           sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 6);
  1048   1048         }
  1049   1049       }
  1050   1050     }
  1051   1051     break;

Changes to test/pragma.test.

   747    747               ORDER BY cid}
   748    748   } [concat \
   749    749     {0 one INT 1 -1 0} \
   750    750     {1 two text 0 {} 0} \
   751    751     {2 three {VARCHAR(45, 65)} 0 'abcde' 0} \
   752    752     {3 four REAL 0 X'abcdef' 0} \
   753    753     {4 five {} 0 CURRENT_TIME 0} \
          754  +]
          755  +do_test pragma-6.8 {
          756  +  execsql {
          757  +    CREATE TABLE t68(a,b,c,PRIMARY KEY(a,b,a,c));
          758  +    PRAGMA table_info(t68);
          759  +  }
          760  +} [concat \
          761  +  {0 a {} 0 {} 1} \
          762  +  {1 b {} 0 {} 2} \
          763  +  {2 c {} 0 {} 4} \
   754    764   ]
   755    765   } ;# ifcapable schema_pragmas
   756    766   # Miscellaneous tests
   757    767   #
   758    768   ifcapable schema_pragmas {
   759    769   # EVIDENCE-OF: R-63500-32024 PRAGMA database.index_list(table-name);
   760    770   # This pragma returns one row for each index associated with the given