OLD | NEW |
1 # 2005 January 11 | 1 # 2005-01-11 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
11 # This file implements regression tests for SQLite library. The | 11 # This file implements regression tests for SQLite library. The |
12 # focus of this file is testing the CREATE INDEX statement. | 12 # focus of this file is testing the CREATE INDEX statement. |
13 # | 13 # |
14 # $Id: index2.test,v 1.3 2006/03/03 19:12:30 drh Exp $ | |
15 | 14 |
16 set testdir [file dirname $argv0] | 15 set testdir [file dirname $argv0] |
17 source $testdir/tester.tcl | 16 source $testdir/tester.tcl |
18 | 17 |
19 # Create a table with a large number of columns | 18 # Create a table with a large number of columns |
20 # | 19 # |
21 do_test index2-1.1 { | 20 do_test index2-1.1 { |
22 set sql {CREATE TABLE t1(} | 21 set sql {CREATE TABLE t1(} |
23 for {set i 1} {$i<1000} {incr i} { | 22 for {set i 1} {$i<1000} {incr i} { |
24 append sql "c$i," | 23 append sql "c$i," |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 execsql $sql | 64 execsql $sql |
66 } {} | 65 } {} |
67 do_test index2-2.2 { | 66 do_test index2-2.2 { |
68 ifcapable explain { | 67 ifcapable explain { |
69 execsql {EXPLAIN SELECT c9 FROM t1 ORDER BY c1, c2, c3, c4, c5} | 68 execsql {EXPLAIN SELECT c9 FROM t1 ORDER BY c1, c2, c3, c4, c5} |
70 } | 69 } |
71 execsql {SELECT c9 FROM t1 ORDER BY c1, c2, c3, c4, c5, c6 LIMIT 5} | 70 execsql {SELECT c9 FROM t1 ORDER BY c1, c2, c3, c4, c5, c6 LIMIT 5} |
72 } {9 10009 20009 30009 40009} | 71 } {9 10009 20009 30009 40009} |
73 | 72 |
74 finish_test | 73 finish_test |
OLD | NEW |