drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 1 | # Copyright (c) 1999, 2000 D. Richard Hipp |
| 2 | # |
| 3 | # This program is free software; you can redistribute it and/or |
| 4 | # modify it under the terms of the GNU General Public |
| 5 | # License as published by the Free Software Foundation; either |
| 6 | # version 2 of the License, or (at your option) any later version. |
| 7 | # |
| 8 | # This program is distributed in the hope that it will be useful, |
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 | # General Public License for more details. |
| 12 | # |
| 13 | # You should have received a copy of the GNU General Public |
| 14 | # License along with this library; if not, write to the |
| 15 | # Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 16 | # Boston, MA 02111-1307, USA. |
| 17 | # |
| 18 | # Author contact information: |
| 19 | # drh@hwaci.com |
| 20 | # http://www.hwaci.com/drh/ |
| 21 | # |
| 22 | #*********************************************************************** |
| 23 | # This file implements regression tests for SQLite library. The |
| 24 | # focus of this file is testing the CREATE TABLE statement. |
| 25 | # |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 26 | # $Id: table.test,v 1.11 2001/09/14 03:24:25 drh Exp $ |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 27 | |
| 28 | set testdir [file dirname $argv0] |
| 29 | source $testdir/tester.tcl |
| 30 | |
| 31 | # Create a basic table and verify it is added to sqlite_master |
| 32 | # |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 33 | do_test table-1.1 { |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 34 | execsql { |
| 35 | CREATE TABLE test1 ( |
| 36 | one varchar(10), |
| 37 | two text |
| 38 | ) |
| 39 | } |
| 40 | execsql { |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 41 | SELECT sql FROM sqlite_master WHERE type!='meta' |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 42 | } |
| 43 | } {{CREATE TABLE test1 ( |
| 44 | one varchar(10), |
| 45 | two text |
| 46 | )}} |
| 47 | |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 48 | |
| 49 | # Verify the other fields of the sqlite_master file. |
| 50 | # |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 51 | do_test table-1.3 { |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 52 | execsql {SELECT name, tbl_name, type FROM sqlite_master WHERE type!='meta'} |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 53 | } {test1 test1 table} |
| 54 | |
| 55 | # Close and reopen the database. Verify that everything is |
| 56 | # still the same. |
| 57 | # |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 58 | do_test table-1.4 { |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 59 | db close |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 60 | sqlite db test.db |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 61 | execsql {SELECT name, tbl_name, type from sqlite_master WHERE type!='meta'} |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 62 | } {test1 test1 table} |
| 63 | |
| 64 | # Drop the database and make sure it disappears. |
| 65 | # |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 66 | do_test table-1.5 { |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 67 | execsql {DROP TABLE test1} |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 68 | execsql {SELECT * FROM sqlite_master WHERE type!='meta'} |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 69 | } {} |
| 70 | |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 71 | # Close and reopen the database. Verify that the table is |
| 72 | # still gone. |
| 73 | # |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 74 | do_test table-1.6 { |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 75 | db close |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 76 | sqlite db test.db |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 77 | execsql {SELECT name FROM sqlite_master WHERE type!='meta'} |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 78 | } {} |
| 79 | |
drh | 982cef7 | 2000-05-30 16:27:03 +0000 | [diff] [blame] | 80 | # Repeat the above steps, but this time quote the table name. |
| 81 | # |
| 82 | do_test table-1.10 { |
| 83 | execsql {CREATE TABLE "create" (f1 int)} |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 84 | execsql {SELECT name FROM sqlite_master WHERE type!='meta'} |
drh | 982cef7 | 2000-05-30 16:27:03 +0000 | [diff] [blame] | 85 | } {create} |
| 86 | do_test table-1.11 { |
| 87 | execsql {DROP TABLE "create"} |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 88 | execsql {SELECT name FROM "sqlite_master" WHERE type!='meta'} |
drh | 982cef7 | 2000-05-30 16:27:03 +0000 | [diff] [blame] | 89 | } {} |
| 90 | do_test table-1.12 { |
| 91 | execsql {CREATE TABLE test1("f1 ho" int)} |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 92 | execsql {SELECT name as "X" FROM sqlite_master WHERE type!='meta'} |
drh | 982cef7 | 2000-05-30 16:27:03 +0000 | [diff] [blame] | 93 | } {test1} |
| 94 | do_test table-1.13 { |
| 95 | execsql {DROP TABLE "TEST1"} |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 96 | execsql {SELECT name FROM "sqlite_master" WHERE type!='meta'} |
drh | 982cef7 | 2000-05-30 16:27:03 +0000 | [diff] [blame] | 97 | } {} |
| 98 | |
| 99 | |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 100 | |
| 101 | # Verify that we cannot make two tables with the same name |
| 102 | # |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 103 | do_test table-2.1 { |
drh | 4cfa793 | 2000-06-08 15:10:46 +0000 | [diff] [blame] | 104 | execsql {CREATE TABLE TEST2(one text)} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 105 | set v [catch {execsql {CREATE TABLE test2(two text)}} msg] |
| 106 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 107 | } {1 {table test2 already exists}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 108 | do_test table-2.1b { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 109 | set v [catch {execsql {CREATE TABLE sqlite_master(two text)}} msg] |
| 110 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 111 | } {1 {table sqlite_master already exists}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 112 | do_test table-2.1c { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 113 | db close |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 114 | sqlite db test.db |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 115 | set v [catch {execsql {CREATE TABLE sqlite_master(two text)}} msg] |
| 116 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 117 | } {1 {table sqlite_master already exists}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 118 | do_test table-2.1d { |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 119 | execsql {DROP TABLE test2; SELECT name FROM sqlite_master WHERE type!='meta'} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 120 | } {} |
| 121 | |
| 122 | # Verify that we cannot make a table with the same name as an index |
| 123 | # |
drh | dcc581c | 2000-05-30 13:44:19 +0000 | [diff] [blame] | 124 | do_test table-2.2a { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 125 | execsql {CREATE TABLE test2(one text); CREATE INDEX test3 ON test2(one)} |
| 126 | set v [catch {execsql {CREATE TABLE test3(two text)}} msg] |
| 127 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 128 | } {1 {there is already an index named test3}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 129 | do_test table-2.2b { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 130 | db close |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 131 | sqlite db test.db |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 132 | set v [catch {execsql {CREATE TABLE test3(two text)}} msg] |
| 133 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 134 | } {1 {there is already an index named test3}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 135 | do_test table-2.2c { |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 136 | execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} |
| 137 | } {test2 test3} |
| 138 | do_test table-2.2d { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 139 | execsql {DROP INDEX test3} |
| 140 | set v [catch {execsql {CREATE TABLE test3(two text)}} msg] |
| 141 | lappend v $msg |
| 142 | } {0 {}} |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 143 | do_test table-2.2e { |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 144 | execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 145 | } {test2 test3} |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 146 | do_test table-2.2f { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 147 | execsql {DROP TABLE test2; DROP TABLE test3} |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 148 | execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 149 | } {} |
| 150 | |
| 151 | # Create a table with many field names |
| 152 | # |
| 153 | set big_table \ |
| 154 | {CREATE TABLE big( |
| 155 | f1 varchar(20), |
| 156 | f2 char(10), |
drh | dcc581c | 2000-05-30 13:44:19 +0000 | [diff] [blame] | 157 | f3 varchar(30) primary key, |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 158 | f4 text, |
| 159 | f5 text, |
| 160 | f6 text, |
| 161 | f7 text, |
| 162 | f8 text, |
| 163 | f9 text, |
| 164 | f10 text, |
| 165 | f11 text, |
| 166 | f12 text, |
| 167 | f13 text, |
| 168 | f14 text, |
| 169 | f15 text, |
| 170 | f16 text, |
| 171 | f17 text, |
| 172 | f18 text, |
| 173 | f19 text, |
| 174 | f20 text |
| 175 | )} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 176 | do_test table-3.1 { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 177 | execsql $big_table |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 178 | execsql {SELECT sql FROM sqlite_master WHERE type!='meta'} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 179 | } \{$big_table\} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 180 | do_test table-3.2 { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 181 | set v [catch {execsql {CREATE TABLE BIG(xyz foo)}} msg] |
| 182 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 183 | } {1 {table BIG already exists}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 184 | do_test table-3.3 { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 185 | set v [catch {execsql {CREATE TABLE biG(xyz foo)}} msg] |
| 186 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 187 | } {1 {table biG already exists}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 188 | do_test table-3.4 { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 189 | set v [catch {execsql {CREATE TABLE bIg(xyz foo)}} msg] |
| 190 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 191 | } {1 {table bIg already exists}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 192 | do_test table-3.5 { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 193 | db close |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 194 | sqlite db test.db |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 195 | set v [catch {execsql {CREATE TABLE Big(xyz foo)}} msg] |
| 196 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 197 | } {1 {table Big already exists}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 198 | do_test table-3.6 { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 199 | execsql {DROP TABLE big} |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 200 | execsql {SELECT name FROM sqlite_master WHERE type!='meta'} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 201 | } {} |
| 202 | |
| 203 | # Try creating large numbers of tables |
| 204 | # |
| 205 | set r {} |
| 206 | for {set i 1} {$i<=100} {incr i} { |
| 207 | lappend r test$i |
| 208 | } |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 209 | do_test table-4.1 { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 210 | for {set i 1} {$i<=100} {incr i} { |
| 211 | set sql "CREATE TABLE test$i (" |
| 212 | for {set k 1} {$k<$i} {incr k} { |
| 213 | append sql "field$k text," |
| 214 | } |
| 215 | append sql "last_field text)" |
| 216 | execsql $sql |
| 217 | } |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 218 | execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 219 | } $r |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 220 | do_test table-4.1b { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 221 | db close |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 222 | sqlite db test.db |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 223 | execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 224 | } $r |
| 225 | |
drh | c4a3c77 | 2001-04-04 11:48:57 +0000 | [diff] [blame] | 226 | # Drop the even numbered tables |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 227 | # |
| 228 | set r {} |
| 229 | for {set i 1} {$i<=100} {incr i 2} { |
| 230 | lappend r test$i |
| 231 | } |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 232 | #execsql {--vdbe-trace-on--} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 233 | do_test table-4.2 { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 234 | for {set i 2} {$i<=100} {incr i 2} { |
| 235 | set sql "DROP TABLE TEST$i" |
| 236 | execsql $sql |
| 237 | } |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 238 | execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 239 | } $r |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 240 | #exit |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 241 | |
| 242 | # Drop the odd number tables |
| 243 | # |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 244 | do_test table-4.3 { |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 245 | for {set i 1} {$i<=100} {incr i 2} { |
| 246 | set sql "DROP TABLE test$i" |
| 247 | execsql $sql |
| 248 | } |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 249 | execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name} |
drh | b24fcbe | 2000-05-29 23:30:50 +0000 | [diff] [blame] | 250 | } {} |
| 251 | |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 252 | # Try to drop a table that does not exist |
| 253 | # |
| 254 | do_test table-5.1 { |
| 255 | set v [catch {execsql {DROP TABLE test9}} msg] |
| 256 | lappend v $msg |
| 257 | } {1 {no such table: test9}} |
| 258 | |
| 259 | # Try to drop sqlite_master |
| 260 | # |
| 261 | do_test table-5.2 { |
| 262 | set v [catch {execsql {DROP TABLE sqlite_master}} msg] |
| 263 | lappend v $msg |
drh | 1d37e28 | 2000-05-30 03:12:21 +0000 | [diff] [blame] | 264 | } {1 {table sqlite_master may not be dropped}} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 265 | |
| 266 | # Make sure an EXPLAIN does not really create a new table |
| 267 | # |
| 268 | do_test table-5.3 { |
| 269 | execsql {EXPLAIN CREATE TABLE test1(f1 int)} |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 270 | execsql {SELECT name FROM sqlite_master WHERE type!='meta'} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 271 | } {} |
| 272 | |
| 273 | # Make sure an EXPLAIN does not really drop an existing table |
| 274 | # |
| 275 | do_test table-5.4 { |
| 276 | execsql {CREATE TABLE test1(f1 int)} |
| 277 | execsql {EXPLAIN DROP TABLE test1} |
drh | 2803757 | 2000-08-02 13:47:41 +0000 | [diff] [blame] | 278 | execsql {SELECT name FROM sqlite_master WHERE type!='meta'} |
drh | 1b6a71f | 2000-05-29 23:58:11 +0000 | [diff] [blame] | 279 | } {test1} |
| 280 | |
drh | 4cfa793 | 2000-06-08 15:10:46 +0000 | [diff] [blame] | 281 | # Create a table with a goofy name |
| 282 | # |
drh | 3fc190c | 2001-09-14 03:24:23 +0000 | [diff] [blame] | 283 | #do_test table-6.1 { |
| 284 | # execsql {CREATE TABLE 'Spaces In This Name!'(x int)} |
| 285 | # execsql {INSERT INTO 'spaces in this name!' VALUES(1)} |
| 286 | # set list [glob -nocomplain testdb/spaces*.tbl] |
| 287 | #} {testdb/spaces+in+this+name+.tbl} |
drh | 4cfa793 | 2000-06-08 15:10:46 +0000 | [diff] [blame] | 288 | |
drh | c4a3c77 | 2001-04-04 11:48:57 +0000 | [diff] [blame] | 289 | # Try using keywords as table names or column names. |
| 290 | # |
| 291 | do_test table-7.1 { |
| 292 | set v [catch {execsql { |
| 293 | CREATE TABLE weird( |
| 294 | desc text, |
| 295 | asc text, |
| 296 | explain int, |
| 297 | vacuum boolean, |
drh | d400728 | 2001-04-12 23:21:58 +0000 | [diff] [blame] | 298 | delimiters varchar(10), |
| 299 | begin blob, |
| 300 | end clob |
drh | c4a3c77 | 2001-04-04 11:48:57 +0000 | [diff] [blame] | 301 | ) |
| 302 | }} msg] |
| 303 | lappend v $msg |
| 304 | } {0 {}} |
| 305 | do_test table-7.2 { |
| 306 | execsql { |
drh | d400728 | 2001-04-12 23:21:58 +0000 | [diff] [blame] | 307 | INSERT INTO weird VALUES('a','b',9,0,'xyz','hi','y''all'); |
drh | c4a3c77 | 2001-04-04 11:48:57 +0000 | [diff] [blame] | 308 | SELECT * FROM weird; |
| 309 | } |
drh | d400728 | 2001-04-12 23:21:58 +0000 | [diff] [blame] | 310 | } {a b 9 0 xyz hi y'all} |
drh | c4a3c77 | 2001-04-04 11:48:57 +0000 | [diff] [blame] | 311 | do_test table-7.3 { |
| 312 | execsql2 { |
| 313 | SELECT * FROM weird; |
| 314 | } |
drh | d400728 | 2001-04-12 23:21:58 +0000 | [diff] [blame] | 315 | } {desc a asc b explain 9 vacuum 0 delimiters xyz begin hi end y'all} |
drh | c4a3c77 | 2001-04-04 11:48:57 +0000 | [diff] [blame] | 316 | |
drh | 348784e | 2000-05-29 20:41:49 +0000 | [diff] [blame] | 317 | finish_test |