SQLite

Check-in [7496e872a1]
Login

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

Overview
Comment:Fix to the query planner for the LSM1 extension.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7496e872a1a50ac65ad04709365a43038fb015ac9c690196de3cb02ce54c2e57
User & Date: drh 2019-08-17 19:55:26.642
Context
2019-08-17
19:58
Add some extra tests for the lsm virtual table module. (check-in: 4cb009b0f7 user: dan tags: trunk)
19:55
Fix to the query planner for the LSM1 extension. (check-in: 7496e872a1 user: drh tags: trunk)
19:31
Fix the new ability to unregister virtual table modules so that it works for the automatic PRAGMA virtual tables. (check-in: 5d6f4dfeea user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/lsm1/lsm_vtab.c.
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
  int argIdx = -1;       /* Index of the key== constraint, or -1 if none */
  int iIdx2 = -1;        /* The index of the second key */
  int omit1 = 0;
  int omit2 = 0;

  const struct sqlite3_index_constraint *pConstraint;
  pConstraint = pIdxInfo->aConstraint;
  for(i=0; i<pIdxInfo->nConstraint && idxNum<16; i++, pConstraint++){
    if( pConstraint->usable==0 ) continue;
    if( pConstraint->iColumn!=0 ) continue;
    switch( pConstraint->op ){
      case SQLITE_INDEX_CONSTRAINT_EQ: {
        if( idxNum>0 ){
          argIdx = i;
          iIdx2 = -1;







|







838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
  int argIdx = -1;       /* Index of the key== constraint, or -1 if none */
  int iIdx2 = -1;        /* The index of the second key */
  int omit1 = 0;
  int omit2 = 0;

  const struct sqlite3_index_constraint *pConstraint;
  pConstraint = pIdxInfo->aConstraint;
  for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
    if( pConstraint->usable==0 ) continue;
    if( pConstraint->iColumn!=0 ) continue;
    switch( pConstraint->op ){
      case SQLITE_INDEX_CONSTRAINT_EQ: {
        if( idxNum>0 ){
          argIdx = i;
          iIdx2 = -1;