OLD | NEW |
1 # 2001 September 15 | 1 # 2001 September 15 |
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 #*********************************************************************** |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 sqlite3_get_table_printf $::dbx $sql {} | 224 sqlite3_get_table_printf $::dbx $sql {} |
225 sqlite3_get_table_printf $::dbx {SELECT * FROM t2} {} | 225 sqlite3_get_table_printf $::dbx {SELECT * FROM t2} {} |
226 } {0 2 100 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x2
0 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 x39 x4
0 x41 x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 x59 x6
0 x61 x62 x63 x64 x65 x66 x67 x68 x69 x70 x71 x72 x73 x74 x75 x76 x77 x78 x79 x8
0 x81 x82 x83 x84 x85 x86 x87 x88 x89 x90 x91 x92 x93 x94 x95 x96 x97 x98 x99 x1
00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 5
6 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1001 1002 1003 1004 1005
1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053
1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100} | 226 } {0 2 100 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x2
0 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 x39 x4
0 x41 x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 x59 x6
0 x61 x62 x63 x64 x65 x66 x67 x68 x69 x70 x71 x72 x73 x74 x75 x76 x77 x78 x79 x8
0 x81 x82 x83 x84 x85 x86 x87 x88 x89 x90 x91 x92 x93 x94 x95 x96 x97 x98 x99 x1
00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 5
6 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1001 1002 1003 1004 1005
1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053
1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100} |
227 | 227 |
228 ifcapable schema_pragmas { | 228 ifcapable schema_pragmas { |
229 do_test tableapi-6.1 { | 229 do_test tableapi-6.1 { |
230 sqlite3_get_table_printf $::dbx {PRAGMA user_version} {} | 230 sqlite3_get_table_printf $::dbx {PRAGMA user_version} {} |
231 } {0 1 1 user_version 0} | 231 } {0 1 1 user_version 0} |
232 } | 232 } |
233 | 233 |
| 234 # do_malloc_test closes and deletes the usual db connections and files on |
| 235 # each iteration. $::dbx is a seperate connection, and on Windows, will |
| 236 # cause the file deletion of test.db to fail, so we move the close of $::dbx |
| 237 # up to here before the do_malloc_test. |
| 238 do_test tableapi-99.0 { |
| 239 sqlite3_close $::dbx |
| 240 } {SQLITE_OK} |
| 241 |
234 ifcapable memdebug { | 242 ifcapable memdebug { |
235 do_malloc_test tableapi-7 -sqlprep { | 243 do_malloc_test tableapi-7 -sqlprep { |
236 DROP TABLE IF EXISTS t1; | 244 DROP TABLE IF EXISTS t1; |
237 CREATE TABLE t1(a,b); | 245 CREATE TABLE t1(a,b); |
238 INSERT INTO t1 VALUES(1,2); | 246 INSERT INTO t1 VALUES(1,2); |
239 INSERT INTO t1 VALUES(3,4); | 247 INSERT INTO t1 VALUES(3,4); |
240 INSERT INTO t1 SELECT a+4, b+4 FROM t1; | 248 INSERT INTO t1 SELECT a+4, b+4 FROM t1; |
241 INSERT INTO t1 SELECT a+8, b+8 FROM t1; | 249 INSERT INTO t1 SELECT a+8, b+8 FROM t1; |
242 } -tclbody { | 250 } -tclbody { |
243 set r [sqlite3_get_table_printf db {SELECT rowid, a, b FROM t1} {}] | 251 set r [sqlite3_get_table_printf db {SELECT rowid, a, b FROM t1} {}] |
244 if {[llength $r]<26} {error "out of memory"} | 252 if {[llength $r]<26} {error "out of memory"} |
245 } | 253 } |
246 } | 254 } |
247 | 255 |
248 do_test tableapi-99.0 { | |
249 sqlite3_close $::dbx | |
250 } {SQLITE_OK} | |
251 | |
252 finish_test | 256 finish_test |
OLD | NEW |