| OLD | NEW |
| 1 # 2004 November 10 | 1 # 2004 November 10 |
| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } {t1 1 2 t1'x1 3 4 5 6 7} | 70 } {t1 1 2 t1'x1 3 4 5 6 7} |
| 71 do_test alter-1.2 { | 71 do_test alter-1.2 { |
| 72 execsql [subst { | 72 execsql [subst { |
| 73 CREATE $::temp TABLE objlist(type, name, tbl_name); | 73 CREATE $::temp TABLE objlist(type, name, tbl_name); |
| 74 INSERT INTO objlist SELECT type, name, tbl_name | 74 INSERT INTO objlist SELECT type, name, tbl_name |
| 75 FROM sqlite_master WHERE NAME!='objlist'; | 75 FROM sqlite_master WHERE NAME!='objlist'; |
| 76 }] | 76 }] |
| 77 ifcapable tempdb { | 77 ifcapable tempdb { |
| 78 execsql { | 78 execsql { |
| 79 INSERT INTO objlist SELECT type, name, tbl_name | 79 INSERT INTO objlist SELECT type, name, tbl_name |
| 80 FROM sqlite_temp_master WHERE NAME!='objlist'; | 80 FROM temp.sqlite_master WHERE NAME!='objlist'; |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 execsql { | 84 execsql { |
| 85 SELECT type, name, tbl_name FROM objlist ORDER BY tbl_name, type desc, name; | 85 SELECT type, name, tbl_name FROM objlist ORDER BY tbl_name, type desc, name; |
| 86 } | 86 } |
| 87 } [list \ | 87 } [list \ |
| 88 table t1 t1 \ | 88 table t1 t1 \ |
| 89 index t1i1 t1 \ | 89 index t1i1 t1 \ |
| 90 index t1i2 t1 \ | 90 index t1i2 t1 \ |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 # | 146 # |
| 147 ifcapable tempdb { | 147 ifcapable tempdb { |
| 148 do_test alter-1.6 { | 148 do_test alter-1.6 { |
| 149 db close | 149 db close |
| 150 sqlite3 db test.db | 150 sqlite3 db test.db |
| 151 set DB [sqlite3_connection_pointer db] | 151 set DB [sqlite3_connection_pointer db] |
| 152 execsql { | 152 execsql { |
| 153 CREATE TEMP TABLE objlist(type, name, tbl_name); | 153 CREATE TEMP TABLE objlist(type, name, tbl_name); |
| 154 INSERT INTO objlist SELECT type, name, tbl_name FROM sqlite_master; | 154 INSERT INTO objlist SELECT type, name, tbl_name FROM sqlite_master; |
| 155 INSERT INTO objlist | 155 INSERT INTO objlist |
| 156 SELECT type, name, tbl_name FROM sqlite_temp_master | 156 SELECT type, name, tbl_name FROM temp.sqlite_master |
| 157 WHERE NAME!='objlist'; | 157 WHERE NAME!='objlist'; |
| 158 SELECT type, name, tbl_name FROM objlist | 158 SELECT type, name, tbl_name FROM objlist |
| 159 ORDER BY tbl_name, type desc, name; | 159 ORDER BY tbl_name, type desc, name; |
| 160 } | 160 } |
| 161 } [list \ | 161 } [list \ |
| 162 table -t1- -t1- \ | 162 table -t1- -t1- \ |
| 163 index t1i1 -t1- \ | 163 index t1i1 -t1- \ |
| 164 index t1i2 -t1- \ | 164 index t1i2 -t1- \ |
| 165 table T2 T2 \ | 165 table T2 T2 \ |
| 166 index i3 T2 \ | 166 index i3 T2 \ |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 set ::TRIGGER | 517 set ::TRIGGER |
| 518 } {trig2 G h i} | 518 } {trig2 G h i} |
| 519 do_test alter-3.3.7 { | 519 do_test alter-3.3.7 { |
| 520 execsql { | 520 execsql { |
| 521 DROP TABLE tbl3; | 521 DROP TABLE tbl3; |
| 522 } | 522 } |
| 523 } {} | 523 } {} |
| 524 ifcapable tempdb { | 524 ifcapable tempdb { |
| 525 do_test alter-3.3.8 { | 525 do_test alter-3.3.8 { |
| 526 execsql { | 526 execsql { |
| 527 SELECT * FROM sqlite_temp_master WHERE type = 'trigger'; | 527 SELECT * FROM temp.sqlite_master WHERE type = 'trigger'; |
| 528 } | 528 } |
| 529 } {} | 529 } {} |
| 530 } | 530 } |
| 531 | 531 |
| 532 } ;# ifcapable trigger | 532 } ;# ifcapable trigger |
| 533 | 533 |
| 534 # If the build does not include AUTOINCREMENT fields, omit alter-4.*. | 534 # If the build does not include AUTOINCREMENT fields, omit alter-4.*. |
| 535 ifcapable autoinc { | 535 ifcapable autoinc { |
| 536 | 536 |
| 537 do_test alter-4.1 { | 537 do_test alter-4.1 { |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 SELECT sqlite_rename_parent('create references ''','abc','xyz'); | 916 SELECT sqlite_rename_parent('create references ''','abc','xyz'); |
| 917 } {{create references '}} | 917 } {{create references '}} |
| 918 do_execsql_test alter-17.12 { | 918 do_execsql_test alter-17.12 { |
| 919 SELECT sqlite_rename_parent('create references "abc"123" ','abc','xyz'); | 919 SELECT sqlite_rename_parent('create references "abc"123" ','abc','xyz'); |
| 920 } {{create references "xyz"123" }} | 920 } {{create references "xyz"123" }} |
| 921 do_execsql_test alter-17.13 { | 921 do_execsql_test alter-17.13 { |
| 922 SELECT sqlite_rename_parent("references '''",'abc','xyz'); | 922 SELECT sqlite_rename_parent("references '''",'abc','xyz'); |
| 923 } {{references '''}} | 923 } {{references '''}} |
| 924 | 924 |
| 925 finish_test | 925 finish_test |
| OLD | NEW |