/ 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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/altertab.test.

   238    238   } {}
   239    239   
   240    240   do_execsql_test 7.2 {
   241    241     SELECT 
   242    242     sqlite_rename_table(db, sql, zOld, zNew, bTemp)
   243    243     FROM ddd;
   244    244   } {{} {} {}}
          245  +
          246  +#-------------------------------------------------------------------------
          247  +#
          248  +reset_db
          249  +forcedelete test.db2
          250  +do_execsql_test 8.1 {
          251  +  ATTACH 'test.db2' AS aux;
          252  +  PRAGMA foreign_keys = on;
          253  +  CREATE TABLE aux.p1(a INTEGER PRIMARY KEY, b);
          254  +  CREATE TABLE aux.c1(x INTEGER PRIMARY KEY, y REFERENCES p1(a));
          255  +  INSERT INTO aux.p1 VALUES(1, 1);
          256  +  INSERT INTO aux.p1 VALUES(2, 2);
          257  +  INSERT INTO aux.c1 VALUES(NULL, 2);
          258  +  CREATE TABLE aux.c2(x INTEGER PRIMARY KEY, y REFERENCES c1(a));
          259  +}
          260  +
          261  +do_execsql_test 8.2 {
          262  +  ALTER TABLE aux.p1 RENAME TO ppp;
          263  +}
          264  +
          265  +do_execsql_test 8.2 {
          266  +  INSERT INTO aux.c1 VALUES(NULL, 1);
          267  +  SELECT sql FROM aux.sqlite_master WHERE name = 'c1';
          268  +} {{CREATE TABLE c1(x INTEGER PRIMARY KEY, y REFERENCES "ppp"(a))}}
   245    269   
   246    270   finish_test
   247    271   
   248    272