/ Check-in [acf5d87f]
Login

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

Overview
Comment:Fix sqlilimits.test module so that it knows that the SELECT in a CREATE VIEW is not checked until the view is actually used.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: acf5d87f9456a1d0d69fe0ebc753211e1be07eaf
User & Date: drh 2015-09-18 15:13:29
Context
2015-09-18
15:35
Adjust two test cases so that they conform to the current code. check-in: 228e3d7c user: drh tags: trunk
15:13
Fix sqlilimits.test module so that it knows that the SELECT in a CREATE VIEW is not checked until the view is actually used. check-in: acf5d87f user: drh tags: trunk
14:45
Ensure that "PRAGMA integrity_check" reports an error if the free-list count header field contains a value smaller than the actual number of pages on the database free-list. check-in: 26f64986 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/sqllimits1.test.

639
640
641
642
643
644
645
646

647
648
649
650
651
652
653
654

655
656

657

658
659
660
661
662
663
664

do_test sqllimits1-8.8 {
  # Columns in a view definition:
  set cols [list]
  for {set i 0} {$i <= $SQLITE_LIMIT_COLUMN} {incr i} {
    lappend cols "c$i"
  }
  catchsql "CREATE VIEW v1 AS SELECT [join $cols ,] FROM t1;"

} {1 {too many columns in result set}}

do_test sqllimits1-8.9 {
  # Columns in a view definition (testing * expansion):
  set cols [list]
  for {set i 0} {$i < $SQLITE_LIMIT_COLUMN} {incr i} {
    lappend cols "c$i"
  }

  catchsql "CREATE TABLE t2([join $cols ,])"
  catchsql "CREATE VIEW v1 AS SELECT *, c1 AS o FROM t2;"

} {1 {too many columns in result set}}

do_test sqllimits1-8.10 {
  # ORDER BY columns
  set cols [list]
  for {set i 0} {$i <= $SQLITE_LIMIT_COLUMN} {incr i} {
    lappend cols c
  }
  set sql "SELECT c FROM t1 ORDER BY [join $cols ,]"







|
>








>


>

>







639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668

do_test sqllimits1-8.8 {
  # Columns in a view definition:
  set cols [list]
  for {set i 0} {$i <= $SQLITE_LIMIT_COLUMN} {incr i} {
    lappend cols "c$i"
  }
  execsql "CREATE VIEW v1 AS SELECT [join $cols ,] FROM t1;"
  catchsql {SELECT * FROM v1}
} {1 {too many columns in result set}}

do_test sqllimits1-8.9 {
  # Columns in a view definition (testing * expansion):
  set cols [list]
  for {set i 0} {$i < $SQLITE_LIMIT_COLUMN} {incr i} {
    lappend cols "c$i"
  }
  execsql {DROP VIEW IF EXISTS v1}
  catchsql "CREATE TABLE t2([join $cols ,])"
  catchsql "CREATE VIEW v1 AS SELECT *, c1 AS o FROM t2;"
  catchsql "SELECT * FROM v1"
} {1 {too many columns in result set}}

do_test sqllimits1-8.10 {
  # ORDER BY columns
  set cols [list]
  for {set i 0} {$i <= $SQLITE_LIMIT_COLUMN} {incr i} {
    lappend cols c
  }
  set sql "SELECT c FROM t1 ORDER BY [join $cols ,]"