| OLD | NEW |
| 1 # 2007 June 26 | 1 # 2007 June 26 |
| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 execsql { | 67 execsql { |
| 68 SELECT a, b, c FROM t1e; | 68 SELECT a, b, c FROM t1e; |
| 69 } | 69 } |
| 70 } {{value a} {} {value c}} | 70 } {{value a} {} {value c}} |
| 71 | 71 |
| 72 do_test vtabA-1.6 { | 72 do_test vtabA-1.6 { |
| 73 execsql { | 73 execsql { |
| 74 SELECT * FROM t1e; | 74 SELECT * FROM t1e; |
| 75 } | 75 } |
| 76 } {{value a} {value c}} | 76 } {{value a} {value c}} |
| 77 do_execsql_test vtabA-1.7 { |
| 78 DELETE FROM t1e; |
| 79 INSERT INTO t1e SELECT 'abc','def'; |
| 80 } {} |
| 81 do_execsql_test vtabA-1.8 { |
| 82 INSERT INTO t1e VALUES('ghi','jkl'),('mno','pqr'),('stu','vwx'); |
| 83 } {} |
| 84 do_execsql_test vtabA-1.9 { |
| 85 SELECT a,b,c, '|' FROM t1e ORDER BY 1; |
| 86 } {abc {} def | ghi {} jkl | mno {} pqr | stu {} vwx |} |
| 87 |
| 77 | 88 |
| 78 # Test that the expansion of a '*' expression in the result set of | 89 # Test that the expansion of a '*' expression in the result set of |
| 79 # a SELECT does not include the hidden column. | 90 # a SELECT does not include the hidden column. |
| 80 # | 91 # |
| 81 do_test vtabA-1.7 { | 92 do_test vtabA-1.20 { |
| 82 execsql { | 93 execsql { |
| 83 INSERT INTO t1e SELECT * FROM t1e; | 94 INSERT INTO t1e SELECT * FROM t1e; |
| 84 } | 95 } |
| 85 } {} | 96 } {} |
| 86 do_test vtabA-1.8 { | 97 do_test vtabA-1.21 { |
| 87 execsql { | 98 execsql { |
| 88 SELECT * FROM t1e; | 99 SELECT * FROM t1e ORDER BY 1; |
| 89 } | 100 } |
| 90 } {{value a} {value c} {value a} {value c}} | 101 } {abc def abc def ghi jkl ghi jkl mno pqr mno pqr stu vwx stu vwx} |
| 91 | 102 |
| 92 # Test that the declaration type of the hidden column does not include | 103 # Test that the declaration type of the hidden column does not include |
| 93 # the token "HIDDEN". | 104 # the token "HIDDEN". |
| 94 # | 105 # |
| 95 do_test vtabA-1.9 { | 106 do_test vtabA-1.22 { |
| 96 get_decltype t1e b | 107 get_decltype t1e b |
| 97 } {VARCHAR} | 108 } {VARCHAR} |
| 98 do_test vtabA-1.10 { | 109 do_test vtabA-1.23 { |
| 99 get_collist t1e | 110 get_collist t1e |
| 100 } {a c} | 111 } {a c} |
| 101 | 112 |
| 102 #---------------------------------------------------------------------- | 113 #---------------------------------------------------------------------- |
| 103 # These tests vtabA-2.* concentrate on testing that the HIDDEN token | 114 # These tests vtabA-2.* concentrate on testing that the HIDDEN token |
| 104 # is detected and handled correctly in various declarations. | 115 # is detected and handled correctly in various declarations. |
| 105 # | 116 # |
| 106 proc analyse_parse {columns decltype_list} { | 117 proc analyse_parse {columns decltype_list} { |
| 107 db eval { DROP TABLE IF EXISTS t1e; } | 118 db eval { DROP TABLE IF EXISTS t1e; } |
| 108 db eval { DROP TABLE IF EXISTS t1; } | 119 db eval { DROP TABLE IF EXISTS t1; } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 CREATE TABLE t2(x,y); | 155 CREATE TABLE t2(x,y); |
| 145 INSERT INTO t2 VALUES(3,4); | 156 INSERT INTO t2 VALUES(3,4); |
| 146 CREATE VIRTUAL TABLE vt1 USING echo(t1); | 157 CREATE VIRTUAL TABLE vt1 USING echo(t1); |
| 147 CREATE VIRTUAL TABLE vt2 USING echo(t2); | 158 CREATE VIRTUAL TABLE vt2 USING echo(t2); |
| 148 UPDATE vt2 SET x=(SELECT a FROM vt1 WHERE b=2) WHERE y=4; | 159 UPDATE vt2 SET x=(SELECT a FROM vt1 WHERE b=2) WHERE y=4; |
| 149 SELECT * FROM t2; | 160 SELECT * FROM t2; |
| 150 } | 161 } |
| 151 } {1 4} | 162 } {1 4} |
| 152 | 163 |
| 153 finish_test | 164 finish_test |
| OLD | NEW |