/ Check-in [603838fc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add extra test cases for sqlite3changeset_apply() and ALTER TABLE ADD COLUMN.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:603838fc9a65adda831a6a17b31b2e80f5b56e5946a9f0c1fa2c83d2f2a67f6a
User & Date: dan 2017-06-17 16:39:10
Context
2017-06-17
17:55
Rework the code in ctime.c a bit to report on more compile time options. And to only output configuration options passed in to SQLite, not the default values of #define symbols set automatically. Also generate the large array in ctime.c using new script tool/mkctime.tcl, instead of entering it manually. check-in: 9a443397 user: dan tags: trunk
16:39
Add extra test cases for sqlite3changeset_apply() and ALTER TABLE ADD COLUMN. check-in: 603838fc user: dan tags: trunk
2017-06-16
18:31
Minor refactoring change to clarify how ATTACH works. No functional changes. check-in: 3944a32e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/session/sessionat.test.

205
206
207
208
209
210
211





























212
213
214
215
216
    set c2 [sql_exec_changeset db2 {
      INSERT INTO t6 VALUES(3, 3, 3, 3, 3);
      INSERT INTO t6 VALUES(4, 4, 4, 4, 4);
    }]
    list [catch { sqlite3changeset_concat $c1 $c2} msg] $msg
  } {1 SQLITE_SCHEMA}






























}]
}


finish_test







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
    set c2 [sql_exec_changeset db2 {
      INSERT INTO t6 VALUES(3, 3, 3, 3, 3);
      INSERT INTO t6 VALUES(4, 4, 4, 4, 4);
    }]
    list [catch { sqlite3changeset_concat $c1 $c2} msg] $msg
  } {1 SQLITE_SCHEMA}

  #-----------------------------------------------------------------------
  db2 close
  sqlite3 db2 test.db
  do_execsql_test $tn.6.0 {
    CREATE TABLE t7(a INTEGER PRIMARY KEY, b) %WR%;
    INSERT INTO t7 VALUES(1, 1);
    INSERT INTO t7 VALUES(2, 2);
    INSERT INTO t7 VALUES(3, 3);
  }

  do_test $tn.6.1 {
    set c1 [sql_exec_changeset db {
      INSERT INTO t7 VALUES(4, 4);
      DELETE FROM t7 WHERE a=1;
      UPDATE t7 SET b=222 WHERE a=2;
    }]
    set cinv [sqlite3changeset_invert $c1]
    execsql { SELECT * FROM t7 }
  } {2 222 3 3 4 4}

  do_execsql_test -db db2 $tn.6.2 {
    ALTER TABLE t7 ADD COLUMN c DEFAULT 'ccc'
  }

  proc xConfict {args} { return "OMIT" }
  do_test $tn.6.3 {
    sqlite3changeset_apply db $cinv xConflict
    execsql { SELECT * FROM t7 }
  } {1 1 ccc 2 2 ccc 3 3 ccc}
}]
}


finish_test