/ Check-in [dd03be10]
Login

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

Overview
Comment:Fix test cases for the new information in PRAGMA index_list.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | row-size-est
Files: files | file ages | folders
SHA1:dd03be1065537679c2daf5e4200902c47714fceb
User & Date: drh 2013-10-08 22:25:22
Context
2013-10-08
23:16
Move a conditional inside of an #ifdef in order to make all branches reachable regardless of compile-time options used. check-in: f7cc30d4 user: drh tags: row-size-est
22:25
Fix test cases for the new information in PRAGMA index_list. check-in: dd03be10 user: drh tags: row-size-est
20:42
Rollback some of the previous changes in the branch such that the estimated row sizes are now only used as a tie-breaker for index scans. check-in: 65553ff3 user: drh tags: row-size-est
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/pragma.test.

570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
...
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
....
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
      pragma foreign_key_list(t5);
    }
  } {}
  do_test pragma-6.4 {
    execsql {
      pragma index_list(t3);
    }
  } {/0 sqlite_autoindex_t3_1 1 \d+/}
}
ifcapable {!foreignkey} {
  execsql {CREATE TABLE t3(a,b UNIQUE)}
}
do_test pragma-6.5.1 {
  execsql {
    CREATE INDEX t3i1 ON t3(a,b);
................................................................................
do_test pragma-7.1.1 {
  # Make sure a pragma knows to read the schema if it needs to
  db close
  sqlite3 db test.db
  execsql {
    pragma index_list(t3);
  }
} {/0 t3i1 0 \d+ 1 sqlite_autoindex_t3_1 1 \d+/}
do_test pragma-7.1.2 {
  execsql {
    pragma index_list(t3_bogus);
  }
} {}
} ;# ifcapable schema_pragmas
ifcapable {utf16} {
................................................................................
  db2 eval {PRAGMA index_info(i2)}
} {0 2 c 1 3 d 2 1 b}
do_test 23.3 {
  db eval {
    CREATE INDEX i3 ON t1(d,b,c);
  }
  db2 eval {PRAGMA index_list(t1)}
} {/0 i3 0 \d+ 1 i2 0 \d+ 2 i1 0 \d+/}
do_test 23.4 {
  db eval {
    ALTER TABLE t1 ADD COLUMN e;
  }
  db2 eval {
    PRAGMA table_info(t1);
  }







|







 







|







 







|







570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
...
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
....
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
      pragma foreign_key_list(t5);
    }
  } {}
  do_test pragma-6.4 {
    execsql {
      pragma index_list(t3);
    }
  } {/0 {} 1 \d+ 1 sqlite_autoindex_t3_1 1 \d+/}
}
ifcapable {!foreignkey} {
  execsql {CREATE TABLE t3(a,b UNIQUE)}
}
do_test pragma-6.5.1 {
  execsql {
    CREATE INDEX t3i1 ON t3(a,b);
................................................................................
do_test pragma-7.1.1 {
  # Make sure a pragma knows to read the schema if it needs to
  db close
  sqlite3 db test.db
  execsql {
    pragma index_list(t3);
  }
} {/0 {} 1 \d+ 1 t3i1 0 \d+ 2 sqlite_autoindex_t3_1 1 \d+/}
do_test pragma-7.1.2 {
  execsql {
    pragma index_list(t3_bogus);
  }
} {}
} ;# ifcapable schema_pragmas
ifcapable {utf16} {
................................................................................
  db2 eval {PRAGMA index_info(i2)}
} {0 2 c 1 3 d 2 1 b}
do_test 23.3 {
  db eval {
    CREATE INDEX i3 ON t1(d,b,c);
  }
  db2 eval {PRAGMA index_list(t1)}
} {/0 {} 1 \d+ 1 i3 0 \d+ 2 i2 0 \d+ 3 i1 0 \d+/}
do_test 23.4 {
  db eval {
    ALTER TABLE t1 ADD COLUMN e;
  }
  db2 eval {
    PRAGMA table_info(t1);
  }