/ Check-in [828e8849]
Login

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

Overview
Comment:Add another test case to altertab.test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | alter-table-rename-column
Files: files | file ages | folders
SHA3-256:828e8849faed85812c03215b00a2ba34cbb00dfa4d4afdcbd11300ba7fcf9743
User & Date: dan 2018-09-01 20:38:42
Context
2018-09-03
20:05
Improve the error messages emitted by RENAME TABLE. check-in: 6805b590 user: dan tags: alter-table-rename-column
2018-09-01
20:38
Add another test case to altertab.test. check-in: 828e8849 user: dan tags: alter-table-rename-column
20:23
Fix a problem with renaming a column in a table that has a temp trigger that references another attached database. check-in: 336b8a09 user: dan tags: alter-table-rename-column
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/altertab.test.

238
239
240
241
242
243
244
























245
246
247
248
} {}

do_execsql_test 7.2 {
  SELECT 
  sqlite_rename_table(db, sql, zOld, zNew, bTemp)
  FROM ddd;
} {{} {} {}}

























finish_test









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




238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
} {}

do_execsql_test 7.2 {
  SELECT 
  sqlite_rename_table(db, sql, zOld, zNew, bTemp)
  FROM ddd;
} {{} {} {}}

#-------------------------------------------------------------------------
#
reset_db
forcedelete test.db2
do_execsql_test 8.1 {
  ATTACH 'test.db2' AS aux;
  PRAGMA foreign_keys = on;
  CREATE TABLE aux.p1(a INTEGER PRIMARY KEY, b);
  CREATE TABLE aux.c1(x INTEGER PRIMARY KEY, y REFERENCES p1(a));
  INSERT INTO aux.p1 VALUES(1, 1);
  INSERT INTO aux.p1 VALUES(2, 2);
  INSERT INTO aux.c1 VALUES(NULL, 2);
  CREATE TABLE aux.c2(x INTEGER PRIMARY KEY, y REFERENCES c1(a));
}

do_execsql_test 8.2 {
  ALTER TABLE aux.p1 RENAME TO ppp;
}

do_execsql_test 8.2 {
  INSERT INTO aux.c1 VALUES(NULL, 1);
  SELECT sql FROM aux.sqlite_master WHERE name = 'c1';
} {{CREATE TABLE c1(x INTEGER PRIMARY KEY, y REFERENCES "ppp"(a))}}

finish_test