| OLD | NEW |
| 1 # 2005 February 14 | 1 # 2005 February 14 |
| 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 16 matching lines...) Expand all Loading... |
| 27 INSERT INTO t1 VALUES(1); | 27 INSERT INTO t1 VALUES(1); |
| 28 INSERT INTO t1 VALUES(1); | 28 INSERT INTO t1 VALUES(1); |
| 29 SELECT * FROM t1; | 29 SELECT * FROM t1; |
| 30 } | 30 } |
| 31 } {1 1} | 31 } {1 1} |
| 32 do_test index3-1.2 { | 32 do_test index3-1.2 { |
| 33 catchsql { | 33 catchsql { |
| 34 BEGIN; | 34 BEGIN; |
| 35 CREATE UNIQUE INDEX i1 ON t1(a); | 35 CREATE UNIQUE INDEX i1 ON t1(a); |
| 36 } | 36 } |
| 37 } {1 {indexed columns are not unique}} | 37 } {1 {UNIQUE constraint failed: t1.a}} |
| 38 do_test index3-1.3 { | 38 do_test index3-1.3 { |
| 39 catchsql COMMIT; | 39 catchsql COMMIT; |
| 40 } {0 {}} | 40 } {0 {}} |
| 41 integrity_check index3-1.4 | 41 integrity_check index3-1.4 |
| 42 | 42 |
| 43 # This test corrupts the database file so it must be the last test | 43 # This test corrupts the database file so it must be the last test |
| 44 # in the series. | 44 # in the series. |
| 45 # | 45 # |
| 46 do_test index3-99.1 { | 46 do_test index3-99.1 { |
| 47 execsql { | 47 execsql { |
| 48 PRAGMA writable_schema=on; | 48 PRAGMA writable_schema=on; |
| 49 UPDATE sqlite_master SET sql='nonsense'; | 49 UPDATE sqlite_master SET sql='nonsense'; |
| 50 } | 50 } |
| 51 db close | 51 db close |
| 52 catch { sqlite3 db test.db } | 52 catch { sqlite3 db test.db } |
| 53 catchsql { DROP INDEX i1 } | 53 catchsql { DROP INDEX i1 } |
| 54 } {1 {malformed database schema (t1) - near "nonsense": syntax error}} | 54 } {1 {malformed database schema (t1) - near "nonsense": syntax error}} |
| 55 | 55 |
| 56 finish_test | 56 finish_test |
| OLD | NEW |