Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Modify the ".dump" command on the CLI so that it always issues a PRAGMA foreign_keys=OFF at the top of the output. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0755b9b697d32292f378a4b934ca1cf9 |
User & Date: | drh 2009-09-23 15:51:36.000 |
Context
2009-09-23
| ||
17:30 | Do not check immediate foreign key constraints until the end of the statement. This matches the postgres behaviour. (check-in: 1a32149cc3 user: dan tags: trunk) | |
15:51 | Modify the ".dump" command on the CLI so that it always issues a PRAGMA foreign_keys=OFF at the top of the output. (check-in: 0755b9b697 user: drh tags: trunk) | |
14:45 | Change the version number to 3.6.19. Fix a couple of incorrect testcase() macros associated with the new IS and IS NOT operators in expr.c. (check-in: e3b73394bf user: drh tags: trunk) | |
Changes
Changes to src/shell.c.
︙ | ︙ | |||
2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 | sqlite3_free(zErrMsg); } }else if( c=='d' && strncmp(azArg[0], "dump", n)==0 ){ char *zErrMsg = 0; open_db(p); fprintf(p->out, "BEGIN TRANSACTION;\n"); p->writableSchema = 0; sqlite3_exec(p->db, "PRAGMA writable_schema=ON", 0, 0, 0); if( nArg==1 ){ run_schema_dump_query(p, "SELECT name, type, sql FROM sqlite_master " "WHERE sql NOT NULL AND type=='table' AND name!='sqlite_sequence'", 0 | > > > > | 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 | sqlite3_free(zErrMsg); } }else if( c=='d' && strncmp(azArg[0], "dump", n)==0 ){ char *zErrMsg = 0; open_db(p); /* When playing back a "dump", the content might appear in an order ** which causes immediate foreign key constraints to be violated. ** So disable foreign-key constraint enforcement to prevent problems. */ fprintf(p->out, "PRAGMA foreign_keys=OFF;\n"); fprintf(p->out, "BEGIN TRANSACTION;\n"); p->writableSchema = 0; sqlite3_exec(p->db, "PRAGMA writable_schema=ON", 0, 0, 0); if( nArg==1 ){ run_schema_dump_query(p, "SELECT name, type, sql FROM sqlite_master " "WHERE sql NOT NULL AND type=='table' AND name!='sqlite_sequence'", 0 |
︙ | ︙ |