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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 lappend v $msg | 300 lappend v $msg |
301 } {0 {33 11}} | 301 } {0 {33 11}} |
302 do_test select1-4.3 { | 302 do_test select1-4.3 { |
303 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1,f2)}} msg] | 303 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1,f2)}} msg] |
304 lappend v $msg | 304 lappend v $msg |
305 } {0 {11 33}} | 305 } {0 {11 33}} |
306 do_test select1-4.4 { | 306 do_test select1-4.4 { |
307 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1)}} msg] | 307 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1)}} msg] |
308 lappend v $msg | 308 lappend v $msg |
309 } {1 {misuse of aggregate: min()}} | 309 } {1 {misuse of aggregate: min()}} |
| 310 do_catchsql_test select1-4.5 { |
| 311 INSERT INTO test1(f1) SELECT f1 FROM test1 ORDER BY min(f1); |
| 312 } {1 {misuse of aggregate: min()}} |
310 | 313 |
311 # The restriction not allowing constants in the ORDER BY clause | 314 # The restriction not allowing constants in the ORDER BY clause |
312 # has been removed. See ticket #1768 | 315 # has been removed. See ticket #1768 |
313 #do_test select1-4.5 { | 316 #do_test select1-4.5 { |
314 # catchsql { | 317 # catchsql { |
315 # SELECT f1 FROM test1 ORDER BY 8.4; | 318 # SELECT f1 FROM test1 ORDER BY 8.4; |
316 # } | 319 # } |
317 #} {1 {ORDER BY terms must not be non-integer constants}} | 320 #} {1 {ORDER BY terms must not be non-integer constants}} |
318 #do_test select1-4.6 { | 321 #do_test select1-4.6 { |
319 # catchsql { | 322 # catchsql { |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 do_test select1-15.3 { | 1068 do_test select1-15.3 { |
1066 execsql { SELECT 2 IN (SELECT a FROM t1) } | 1069 execsql { SELECT 2 IN (SELECT a FROM t1) } |
1067 } {1} | 1070 } {1} |
1068 } | 1071 } |
1069 | 1072 |
1070 # Crash bug reported on the mailing list on 2012-02-23 | 1073 # Crash bug reported on the mailing list on 2012-02-23 |
1071 # | 1074 # |
1072 do_test select1-16.1 { | 1075 do_test select1-16.1 { |
1073 catchsql {SELECT 1 FROM (SELECT *)} | 1076 catchsql {SELECT 1 FROM (SELECT *)} |
1074 } {1 {no tables specified}} | 1077 } {1 {no tables specified}} |
| 1078 |
| 1079 # 2015-04-17: assertion fix. |
| 1080 do_catchsql_test select1-16.2 { |
| 1081 SELECT 1 FROM sqlite_master LIMIT 1,#1; |
| 1082 } {1 {near "#1": syntax error}} |
1075 | 1083 |
1076 finish_test | 1084 finish_test |
OLD | NEW |