| OLD | NEW |
| 1 # 2013-11-02 | 1 # 2013-11-02 |
| 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 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2074 catchsql { | 2074 catchsql { |
| 2075 UPDATE tce73 set b = 201 where a = 100; | 2075 UPDATE tce73 set b = 201 where a = 100; |
| 2076 } | 2076 } |
| 2077 } {1 {FOREIGN KEY constraint failed}} | 2077 } {1 {FOREIGN KEY constraint failed}} |
| 2078 do_test without_rowid3-ce7c13.1.6 { | 2078 do_test without_rowid3-ce7c13.1.6 { |
| 2079 catchsql { | 2079 catchsql { |
| 2080 UPDATE tce73 set a = 101 where a = 100; | 2080 UPDATE tce73 set a = 101 where a = 100; |
| 2081 } | 2081 } |
| 2082 } {1 {FOREIGN KEY constraint failed}} | 2082 } {1 {FOREIGN KEY constraint failed}} |
| 2083 | 2083 |
| 2084 # Confirm that changes() works on WITHOUT ROWID tables that use the |
| 2085 # xfer optimization. |
| 2086 # |
| 2087 db close |
| 2088 sqlite3 db :memory: |
| 2089 do_execsql_test without_rowid3-30.1 { |
| 2090 CREATE TABLE t1(a,b,PRIMARY KEY(a,b)) WITHOUT ROWID; |
| 2091 CREATE TABLE t2(a,b,PRIMARY KEY(a,b)) WITHOUT ROWID; |
| 2092 INSERT INTO t1 VALUES(1,2),(3,4),(5,6); |
| 2093 SELECT changes(); |
| 2094 } {3} |
| 2095 do_execsql_test without_rowid3-30.2 { |
| 2096 INSERT INTO t2 SELECT * FROM t1; |
| 2097 SELECT changes(); |
| 2098 } {3} |
| 2099 |
| 2084 finish_test | 2100 finish_test |
| OLD | NEW |