SQLite

All files named ”src/alter.c”
Login

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

History for src/alter.c

2025-05-19
17:06
[4d08f9ca25] part of check-in [fc5edd557e] Merge the latest trunk changes into the reuse-schema branch. (check-in: [fc5edd557e] user: drh branch: reuse-schema, size: 76298)
14:50
[fc7bbbeb9e] part of check-in [ba8184d132] Clarify some malloc size computations to simplify the proof that they are safe. Remove some code associated with cygwin that is marked "#if 0". (check-in: [ba8184d132] user: drh branch: trunk, size: 76312)
2025-03-15
20:35
[14f2cc098a] part of check-in [271e0373a8] Merge the latest trunk enhancements into the reuse-schema branch. (check-in: [271e0373a8] user: drh branch: reuse-schema, size: 76293)
2025-03-05
18:18
[6a21a48729] part of check-in [373ae3f4de] Always ignore comments in the schema of a database, even if SQLITE_DBCONFIG_ENABLE_COMMENTS is turned off. (check-in: [373ae3f4de] user: drh branch: trunk, size: 76307)
2025-03-03
16:53
[4b855e10b6] part of check-in [b51690e180] Merge the latest trunk enhancements into the reuse-schema branch. (check-in: [b51690e180] user: drh branch: reuse-schema, size: 76167)
2025-02-22
16:44
[0d2122ade7] part of check-in [742827f049] Tamp down various harmless compiler warnings. Use "int" in places instead of "u16" or "i16" since the compiler complains less and generates faster code. (check-in: [742827f049] user: drh branch: trunk, size: 76181)
11:40
[918875586d] part of check-in [eeea11278b] Fix an incorrect assert added by [d7729dbbf231d57c]. (check-in: [eeea11278b] user: drh branch: trunk, size: 76019)
2025-02-21
17:03
[04cad1defb] part of check-in [d7729dbbf2] Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would need to use more than SQLITE_LIMIT_COLUMN columns and raise an error. Also include some unrelated compiler warning fixes. (check-in: [d7729dbbf2] user: drh branch: trunk, size: 76017)
2025-02-18
14:56
[5df2e8435f] part of check-in [b2bf063011] Merge the latest trunk enhancements into the reuse-schema branch. (check-in: [b2bf063011] user: drh branch: reuse-schema, size: 75788)
2025-02-08
14:15
[1751e231d8] part of check-in [351dbbc2bf] Use the sqlite3ColumnIndex() routine to look up a column in a table, rather than using a custom loop. Performance improvement, size reduction, and complexity decrease. (check-in: [351dbbc2bf] user: drh branch: trunk, size: 75802)
2025-01-06
20:39
[c48e7cbb7f] part of check-in [65ede04d21] Implemenation of experimental API sqlite3_schema_copy(), for copying a database schema between connections. More testing to come. (check-in: [65ede04d21] user: dan branch: schema-copy, size: 75879)
2024-08-29
17:42
[2da1deedae] part of check-in [87aa6fc212] Merge all the latest trunk enhancements into the reuse-schema branch. (check-in: [87aa6fc212] user: drh branch: reuse-schema, size: 75868)
2024-08-19
22:48
[aa93e37e4a] part of check-in [8ff5dda844] Refactor the SrcItem object so that information about subqueries is stored in a separately allocated Subquery object. This reduces the memory requirements for SrcItem and makes the code run faster. It also provides an expansion path for subquery processing that does not burden simple queries. The current checking mostly works, but there are still issues that need to be tracked down and fixed. (check-in: [8ff5dda844] user: drh branch: srcitem-opt, size: 75882)
2024-08-17
23:23
[b73964bd6b] part of check-in [9f5aeef3cb] Give unique names to fields in the SrcItem object, to facilitate analysis of how those fields are used using "grep". (check-in: [9f5aeef3cb] user: drh branch: srcitem-opt, size: 75704)
2024-08-10
20:22
[628af24886] part of check-in [a27b12ee22] Merge all the branch-3.46 patches into the reuse-schema as a new sub-branch called reuse-schema-3.46. (check-in: [a27b12ee22] user: drh branch: reuse-schema-3.46, size: 75680)
2024-08-09
18:42
[bb663fddf1] part of check-in [b416756320] Fix another instance where ALTER TABLE was returning SQLITE_INTERNAL instead of SQLITE_ERROR one malformed input. (check-in: [b416756320] user: drh branch: trunk, size: 75694)
2024-04-05
15:04
[8fd1f87dbf] part of check-in [e556f3d381] Merge all recent trunk enhancements into the reuse-schema branch. (check-in: [e556f3d381] user: drh branch: reuse-schema, size: 75677)
2024-03-26
11:14
[e1b6782b85] part of check-in [a49296de00] Avoid expanding integer values in columns with real affinity to the full 8-byte representation when editing records as part of a DROP COLUMN command. (check-in: [a49296de00] user: dan branch: trunk, size: 75691)
2023-10-23
19:27
[4725332382] part of check-in [52262ac920] Merge the latest trunk enhancments into the reuse-schema branch. (check-in: [52262ac920] user: drh branch: reuse-schema, size: 75485)
2023-10-14
20:24
[30c2333b8b] part of check-in [75b075863e] Do not allow an ALTER TABLE ADD COLUMN on a STRICT table if the added column contains a DEFAULT clause that would violate the type of the added column. (check-in: [75b075863e] user: drh branch: trunk, size: 75499)
2023-06-22
14:50
[ed1b2b451f] part of check-in [905c6c9ddb] Merge the latest trunk enhancements into the reuse-schema branch. (check-in: [905c6c9ddb] user: drh branch: reuse-schema, size: 75278)
2023-06-16
14:39
[3ff8c2fca0] part of check-in [365caf2f97] Address various harmless compiler warnings from forum post d526da8ee4. (check-in: [365caf2f97] user: drh branch: trunk, size: 75292)
2023-06-07
08:40
[f1c686e732] part of check-in [26c1bb4bd9] Add a C-source spell-checking facility. make misspell (on Nix) (check-in: [26c1bb4bd9] user: larrybr branch: spell-check, size: 75283)
2023-05-02
21:26
[697212155c] part of check-in [d08fa7d4d2] Merge the latest trunk enhancements into the reuse-schema branch. (check-in: [d08fa7d4d2] user: drh branch: reuse-schema, size: 75340)
2023-04-13
18:44
[482c534877] part of check-in [c4845a7c5f] Fix an obscure issue with ALTER TABLE RENAME that comes up with triggers that have UPDATE statements that contain errors. Forum post ff3840145a. (check-in: [c4845a7c5f] user: drh branch: trunk, size: 75354)
2023-01-12
19:43
[dab37a8003] part of check-in [deb26d034b] Merge latest trunk changes, including fixes for RBU pass-through mode, with this branch. (check-in: [deb26d034b] user: dan branch: reuse-schema, size: 74336)
2022-12-23
11:46
[3ca2f449c8] part of check-in [7d3772f0bd] Additional fixes for yet more completely harmless compiler warnings. (check-in: [7d3772f0bd] user: drh branch: trunk, size: 74350)
2022-05-28
15:01
[23f95fd338] part of check-in [4d46296ef6] Merge the latest trunk enhancements into the reuse-schema branch. (check-in: [4d46296ef6] user: drh branch: reuse-schema, size: 74312)
2022-05-27
17:36
[0390ca1d69] part of check-in [01beb0365c] Minor simplification to ALTER TABLE logic. (check-in: [01beb0365c] user: drh branch: trunk, size: 74326)
15:33
[d8671d56a8] part of check-in [33cf12235e] Fix another problem with ALTER TABLE and UPDATE...FROM in triggers. (check-in: [33cf12235e] user: dan branch: trunk, size: 74351)
15:04
[da06f14f95] part of check-in [53fbc269dd] Fix further issues with ALTER TABLE and triggers that contain UPDATE..FROM statements. (check-in: [53fbc269dd] user: dan branch: trunk, size: 74469)
14:41
[05b314a366] part of check-in [f56473f9cc] Omit an unnecessary branch. (check-in: [f56473f9cc] user: drh branch: trunk, size: 74432)
2022-05-26
19:10
[379c644a32] part of check-in [2fba0d41b7] Fix issues with ALTER TABLE and triggers containing "UPDATE...FROM" statements. (check-in: [2fba0d41b7] user: dan branch: trunk, size: 74448)
2022-05-10
13:06
[0951fd0862] part of check-in [9f6d6e6135] Merge all recent trunk changes into the reuse-schema branch. (check-in: [9f6d6e6135] user: drh branch: reuse-schema, size: 73839)
2022-05-02
20:49
[d8872f9d18] part of check-in [5341d4bbe9] Organize the various flag bits of the ExprList_item object into a substructure so that the whole lot can be copied all at once. Faster and smaller code. (check-in: [5341d4bbe9] user: drh branch: right-join, size: 73853)
2022-04-07
01:11
[9395ece985] part of check-in [158156a3e3] Improved technique for parsing the ON and USING clauses of a join is faster and uses less memory. (check-in: [158156a3e3] user: drh branch: trunk, size: 73844)
2022-03-12
15:21
[c4a3622fac] part of check-in [f3fa81963e] Merge the latest trunk changes into the reuse-schema branch. (check-in: [f3fa81963e] user: drh branch: reuse-schema, size: 73766)
2022-03-10
21:04
[006325f884] part of check-in [13fbde2817] Stronger defenses against corrupt schemas in the ALTER TABLE logic. (check-in: [13fbde2817] user: drh branch: trunk, size: 73780)
2022-02-15
20:56
[49c50b6b66] part of check-in [b9ba43fcb3] Merge the latest trunk enhancements into the reuse-schema branch. (check-in: [b9ba43fcb3] user: drh branch: reuse-schema, size: 73847)
2022-02-09
16:18
[60dd7d6249] part of check-in [460abf93ac] Prototype implementation of IF EXISTS and IF NOT EXISTS clauses on the various forms of ALTER TALE. (check-in: [460abf93ac] user: drh branch: alter-table-if-exists, size: 75903)
2022-02-08
13:41
[e31cae888b] part of check-in [1269206db8] Provide sqlite3_error_offset() data for some new errors. (check-in: [1269206db8] user: drh branch: trunk, size: 73861)
2022-02-06
21:13
[b626365480] part of check-in [36653ccef6] With the new ALTER TABLE under PRAGMA writable_schema=ON processing, do not ignore non-parser errors such as OOMs. (check-in: [36653ccef6] user: drh branch: trunk, size: 73860)
2022-02-05
12:05
[af5606a4d7] part of check-in [d4e6b9f0f7] Fix a NULL pointer dereference that can occur after OOM. Problem introduced by check-in [197cbabf1767d060]. (check-in: [d4e6b9f0f7] user: drh branch: relaxed-alter-table, size: 73776)
2022-02-04
20:07
[1cf8dfe6d8] part of check-in [c52d0dd8f4] One more case of disabling errors for ALTER TABLE RENAME when writable_schema=ON. (check-in: [c52d0dd8f4] user: drh branch: relaxed-alter-table, size: 73767)
16:43
[11c8e4d382] part of check-in [197cbabf17] Allow ALTER TABLE RENAME COLUMN to proceed even if there are errors in the schema, as long as PRAGMA writable_schema=ON is active. (check-in: [197cbabf17] user: drh branch: relaxed-alter-table, size: 73674)
2022-01-25
16:28
[8b4666867e] part of check-in [6e4154d414] Merge the latest trunk enhancements into the reuse-schema branch. (check-in: [6e4154d414] user: drh branch: reuse-schema, size: 72965)
2022-01-24
16:47
[e8ac1df663] part of check-in [1f7fa46126] Remove many redundant checks for sqlite3.mallocFailed now that any OOM should cause Parse.nErr to be non-zero. (check-in: [1f7fa46126] user: drh branch: trunk, size: 72979)
15:34
[d5b1083127] part of check-in [6a45d8fe8b] Make it so that any Parse object is always linked into the database conenction while it is active. Hence, an OOM will cause Parse.nErr to be set. (check-in: [6a45d8fe8b] user: drh branch: trunk, size: 72865)
2022-01-18
16:16
[e3943d8fbc] part of check-in [aca6c61d79] Fix ALTER TABLE DROP COLUMN so that it invokes the authorizer. Fix for forum post fd82b85947541dec. (check-in: [aca6c61d79] user: drh branch: trunk, size: 72858)
2022-01-17
20:01
[99491075e8] part of check-in [769ff85765] Merge the latest trunk changes into the reuse-schema branch. (check-in: [769ff85765] user: drh branch: reuse-schema, size: 72651)
2022-01-16
15:15
[67ef8e685f] part of check-in [092ad64faa] Fix ALTER TABLE so that it works even when compiled using -DSQLITE_DQS=0. Forum post 3c1a00b66fca81fe. (check-in: [092ad64faa] user: drh branch: trunk, size: 72665)
2021-12-31
19:20
[16f8d91b1e] part of check-in [6fb2a1bb02] Simplify the sqlite3RunParser() routine by omitting the third parameter. Results in a binary that is about 100 bytes smaller and 1.4M cycles faster. (check-in: [6fb2a1bb02] user: drh branch: trunk, size: 72673)
2021-11-05
23:32
[0b0b8c74bd] part of check-in [ca09148e13] Merge the latest trunk enhancements into the reuse-schema branch. (check-in: [ca09148e13] user: drh branch: reuse-schema, size: 72770)
2021-11-04
14:04
[23743384e5] part of check-in [9147390d98] Show the preferred schema table names in the output of "PRAGMA table_list". (check-in: [9147390d98] user: drh branch: trunk, size: 72784)
2021-11-03
15:59
[92994fddf1] part of check-in [b007a39dd3] Improved the error message that results when a schema parse fails after ALTER TABLE ADD COLUMN. (check-in: [b007a39dd3] user: drh branch: trunk, size: 72764)
2021-11-02
17:55
[d8dac98aa3] part of check-in [1d9004cd01] Ensure that ALTER TABLE RENAME recognizes OOM errors while parsing dependent triggers and handles them appropriately. dbsqlfuzz 53e245eee15d3f19639d773048aa955c30708785. (check-in: [1d9004cd01] user: drh branch: trunk, size: 72767)
2021-10-21
14:10
[019ec1f683] part of check-in [cd15fc3c08] Merge recent trunk enhancements into the reuse-schema branch (check-in: [cd15fc3c08] user: drh branch: reuse-schema, size: 72665)
2021-10-17
10:31
[d6b3248121] part of check-in [03dff7196b] Remove an incorrect assert() added 4 days ago by check-in [9e2f06b84f994277]. Replace it with a testcase() macro. (check-in: [03dff7196b] user: drh branch: trunk, size: 72679)
2021-10-13
14:01
[9179b77831] part of check-in [9e2f06b84f] Remove a NEVER() macro in ALTER TABLE due to an obscure case of a nested CTE inside an UPDATE within a trigger. dbsqlfuzz e89174cbfad2d904f06b5e24df0a22510b6a1c1e (check-in: [9e2f06b84f] user: drh branch: trunk, size: 72642)
2021-10-07
20:46
[9578c5a540] part of check-in [87e2f5eb43] Protect access to the Expr.y union using nearby assert()s and branches. (check-in: [87e2f5eb43] user: drh branch: trunk, size: 72609)
12:11
[c3ef756503] part of check-in [50e08338ae] Protect every access to the Table.u union using a nearby assert() or branch. (check-in: [50e08338ae] user: drh branch: trunk, size: 72505)
2021-10-04
11:49
[aa59bacdcd] part of check-in [64234c5c9a] Merge recent trunk enhancements into the reuse-schema branch. (check-in: [64234c5c9a] user: drh branch: reuse-schema, size: 72357)
2021-09-29
20:17
[a6afe961ef] part of check-in [5d771f3554] Add NEVER() macros on branches that are not reachable since [a0df216f7c3f8963]. (check-in: [5d771f3554] user: drh branch: trunk, size: 72371)
2021-09-28
10:44
[ad192981c3] part of check-in [df0d7e36db] Fix a potential ALTER TABLE problem with expressions like ( (<sub-select>) IN () ). (check-in: [df0d7e36db] user: dan branch: trunk, size: 72468)
2021-09-27
15:44
[7f31a2524b] part of check-in [255b0eeed1] Fix a problem in ALTER TABLE causing table or column references in sub-selects ton the RHS of a vector SET clause in an UPDATE within a trigger (i.e. "SET (a,b) = ( (SELECT...), <expr> )"). (check-in: [255b0eeed1] user: dan branch: trunk, size: 72401)
2021-09-24
16:14
[a279ff8e6e] part of check-in [a3c71a673d] Add lots of new "const" on internal function parameters. There is opportunity for many more - this is a work in progress. (check-in: [a3c71a673d] user: drh branch: trunk, size: 72352)
2021-09-16
13:20
[a4e20094bb] part of check-in [7c82b43b7c] For ALTER TABLE RENAME COLUMN, do not try to filter virtual tables out of calls to sqlite_rename_column(). Let the function filter them itself. The WHERE clause can mistakenly let virtual tables through if the sqlite_schema table is corrupt. The sqlite_rename_column() function must deal with them. We might as well let it deal with them always. (check-in: [7c82b43b7c] user: drh branch: trunk, size: 72230)
2021-08-09
18:17
[618d0c615e] part of check-in [c8d1f17fde] Merge recent trunk enhancements into the reuse-schema branch. (check-in: [c8d1f17fde] user: drh branch: reuse-schema, size: 72269)
2021-08-05
15:27
[38975b971a] part of check-in [832ac4c1ee] Store the collating sequence name for each column of a table as an extension to the column name, for an additional savings in the heap space needed to hold the schema. (check-in: [832ac4c1ee] user: drh branch: trunk, size: 72283)
2021-08-04
13:42
[f2a1c9eeed] part of check-in [164662ef01] Always prefer built-in SQL functions over app-defined SQL functions within sqlite3NestedParse(). Formerly this was the case for a few calls to sqlite3NestedParse(), but not for all of them. (check-in: [164662ef01] user: drh branch: trunk, size: 72306)
2021-08-03
16:11
[701e809c6a] part of check-in [d71adc3fd8] Merge recent trunk enhancements into the reuse-schema branch. (check-in: [d71adc3fd8] user: drh branch: reuse-schema, size: 72562)
2021-08-02
18:03
[3ce23a6f06] part of check-in [8b781dcaf6] Refactor field names in the Column object, zCnName and zCnColl, to make them unique and thus easier to find amid all the other code. (check-in: [8b781dcaf6] user: drh branch: trunk, size: 72576)
16:41
[e73e2dad93] part of check-in [bbb6759bcf] Refactor the Table object to reduce its memory footprint. (check-in: [bbb6759bcf] user: drh branch: trunk, size: 72558)
2021-07-31
20:30
[87c9b91d15] part of check-in [8646547e54] Refactor the way that DEFAULT expressions are stored on columns, in order to save memory in the common case where the column has no DEFAULT clause. (check-in: [8646547e54] user: drh branch: trunk, size: 72200)
2021-07-22
18:22
[a54e0a5ae7] part of check-in [b65f4f7639] Fix ALTER TABLE DROP COLUMN so that it generates valid bytecode even when operating on a corrupt database and using PRAGMA writable_schema=ON. dbsqlfuzz 5f09e7bcc78b4954d06bf9f2400d7715f48d1fef (check-in: [b65f4f7639] user: drh branch: trunk, size: 71936)
2021-07-20
08:23
[8b6d394cca] part of check-in [48434ad3fa] Fix issues in the new ADD COLUMN constraint checking. Add preliminary test cases. (check-in: [48434ad3fa] user: drh branch: add-column-constraint-check, size: 71759)
07:35
[1589ea8a5d] part of check-in [039f540373] Demonstration code to show how NOT NULL and CHECK constraints can be verified after an ALTER TABLE ADD COLUMN. (check-in: [039f540373] user: drh branch: add-column-constraint-check, size: 71735)
2021-06-17
17:26
[7ea3ac556f] part of check-in [92d8f967c9] Merge recent trunk enhancements into reuse-schema branch. (check-in: [92d8f967c9] user: drh branch: reuse-schema, size: 71210)
2021-06-16
11:32
[774a2a175e] part of check-in [fb7f094e4e] Enhanced defense against integer overflow in ALTER TABLE. (check-in: [fb7f094e4e] user: drh branch: trunk, size: 71224)
2021-06-14
20:49
[00212ce602] part of check-in [d4d9869c30] Fix typos in testcase() macros from check-in [c09d90eec2a49b94]. (check-in: [d4d9869c30] user: drh branch: trunk, size: 71224)
20:08
[961d8e65f1] part of check-in [c09d90eec2] Fix an ALTER TABLE problem with handling infinite loops of CTEs in the database schema. (check-in: [c09d90eec2] user: dan branch: trunk, size: 71248)
14:35
[f110886a20] part of check-in [f21a53fb41] Update this branch with latest changes from trunk. (check-in: [f21a53fb41] user: dan branch: reuse-schema, size: 70889)
2021-06-12
17:45
[da02319df1] part of check-in [6796b7a248] An alternative approach to the use-after-free problem. (check-in: [6796b7a248] user: drh branch: alternative-oom-fix, size: 70903)
16:17
[b6f1a0b1ca] part of check-in [193b14a58e] Fix a use-after-free that could follow an OOM in ALTER TABLE. (Edit:) Still contains problems. (check-in: [193b14a58e] user: dan branch: original-uaf-fix, size: 70922)
2021-06-11
12:14
[a5ddc873ae] part of check-in [6f1f2a0a9c] Fix a crash in new ALTER TABLE code that could follow an OOM. (check-in: [6f1f2a0a9c] user: dan branch: trunk, size: 70860)
12:02
[3e76100bb4] part of check-in [852ee0e91c] Remove an unreachable branch added by the previous commit. (check-in: [852ee0e91c] user: dan branch: trunk, size: 70816)
11:14
[3de695d859] part of check-in [8b1f9a51e9] Fix problems with ALTER TABLE and schemas that contain views with some recursive CTEs, or CTEs that reference other CTEs. Forum post 9d965f2956. (check-in: [8b1f9a51e9] user: dan branch: trunk, size: 70895)
2021-06-10
19:08
[5dae4f6b21] part of check-in [32e3ecfc8b] Fix problems with ALTER TABLE and schemas that contain views with complex CTEs. (check-in: [32e3ecfc8b] user: dan branch: alter-table-cte-fix-1, size: 70371)
2021-06-04
23:26
[2cb4a3d15c] part of check-in [1c71de43db] A better fix for the problem addressed by [4eb80b0cc61526c1]. This fix also avoids reading uninitialized variables. (check-in: [1c71de43db] user: drh branch: trunk, size: 70245)
2021-05-27
10:23
[e2e0e6be8a] part of check-in [4eb80b0cc6] Remove a NEVER that is reachable following OOM in writable_schema=ON mode with a corrupt schema. (check-in: [4eb80b0cc6] user: drh branch: trunk, size: 70179)
2021-05-07
14:16
[a5f129de5a] part of check-in [c5e2de1d24] This was suppose to be a merge from trunk. But something went wrong. (check-in: [c5e2de1d24] user: dan branch: bad-merge, size: 70172)
2021-05-01
12:09
[df53c39fd4] part of check-in [20a4f3f12c] Back out the NEVER() inserted by [c7309ed3c7588c7e] because it is reachable after all. dbsqlfuzz bc17a306a09329bba0ecc61547077f6178bcf321 (check-in: [20a4f3f12c] user: drh branch: trunk, size: 70186)
2021-04-22
18:02
[6c62a47364] part of check-in [c7909e8e0d] Raise an error on an attempt to rename an eponymous virtual table. (check-in: [c7909e8e0d] user: drh branch: trunk, size: 70193)
16:54
[0fe0f82a9c] part of check-in [9c7a449f52] Improved handling of errors in ALTER TABLE RENAME. dbsqlfuzz 3e3e2e076e53d02288f80af41a11143a6ddf8c88 (check-in: [9c7a449f52] user: drh branch: trunk, size: 70202)
2021-04-20
12:14
[e7caf3eefc] part of check-in [a61c0e6b78] In the sqlite3SelectDup() routine, do not do an incomplete duplication due to OOM. This in turn requires several new NEVER() and ALWAYS() macros for unreachable branches. (check-in: [a61c0e6b78] user: drh branch: trunk, size: 70132)
2021-04-19
19:07
[82ed7c15c1] part of check-in [35d1c9a5f8] Merge in the 3.35.5 patches. (check-in: [35d1c9a5f8] user: drh branch: reuse-schema-3.35, size: 64712)
2021-04-18
06:03
[68467416a4] part of check-in [11c368f20a] Ensure that all records are updated by setting the OPFLAG_SAVEPOSITION flag when updating records as part of ALTER TABLE DROP COLUMN. Fix for [c88f3036a2]. (check-in: [11c368f20a] user: dan branch: branch-3.35, size: 64726)
05:52
[65449b20d0] part of check-in [cfa8912a94] Modify the drop column code to handle WITHOUT ROWID tables for which a single column appears more than once in the primary key. (check-in: [cfa8912a94] user: dan branch: branch-3.35, size: 64568)
05:30
[9dde656dfd] part of check-in [354a4db5cb] Ensure that all records are updated by setting the OPFLAG_SAVEPOSITION flag when updating records as part of ALTER TABLE DROP COLUMN. Fix for [c88f3036a2]. (check-in: [354a4db5cb] user: dan branch: trunk, size: 70125)
2021-04-06
21:20
[14d5d9ba33] part of check-in [e0d2507021] Modify the drop column code to handle WITHOUT ROWID tables for which a single column appears more than once in the primary key. (check-in: [e0d2507021] user: dan branch: trunk, size: 69967)
2021-03-24
17:04
[ee33577195] part of check-in [26b005a95e] Fix a harmless compiler warning. (check-in: [26b005a95e] user: drh branch: trunk, size: 69754)
2021-03-23
22:15
[effc10185c] part of check-in [4719fae626] Fix a problem with renaming a column when there is a quoted string immediately following the column name somewhere in the schema. (check-in: [4719fae626] user: dan branch: trunk, size: 69750)
2021-03-17
19:52
[2eab8b2c24] part of check-in [18bec0d263] Update to version 3.35.2 (check-in: [18bec0d263] user: drh branch: reuse-schema, size: 64341)
2021-03-16
18:24
[842bb68d8f] part of check-in [531550056c] Add tests for sqlite_rename_quotefix(). Fix a memory leak in the same. (check-in: [531550056c] user: dan branch: alter-quotefix, size: 69742)
16:14
[4f2c88554c] part of check-in [6446c09610] Have ALTER TABLE RENAME COLUMN and DROP COLUMN use sqlite_rename_quotefix() to convert any double-quoted strings in the database schema to their single-quoted equivalents. (check-in: [6446c09610] user: dan branch: alter-quotefix, size: 69703)
11:21
[36ff6fed67] part of check-in [f15d51054a] Merge trunk changes into this branch. (check-in: [f15d51054a] user: dan branch: alter-quotefix, size: 68261)
11:11
[2d63121381] part of check-in [0e255b2687] Fix a problem with ALTER TABLE RENAME COLUMN when used on a schema that features generated columns. Fix for [a753a856]. (check-in: [0e255b2687] user: dan branch: trunk, size: 64355)
2021-03-15
20:22
[3be93b32c6] part of check-in [d874b30046] Add internal SQL function sqlite_rename_quotefix(). For converting double-quoted strings to their single-quoted counterparts in DDL statements. (check-in: [d874b30046] user: dan branch: alter-quotefix, size: 68255)
19:34
[3a54ff90f8] part of check-in [0fe60a63ae] Merge version 3.35.1 into the reuse-schema branch. (check-in: [0fe60a63ae] user: drh branch: reuse-schema, size: 64335)
2021-03-14
19:55
[e06ec2433a] part of check-in [a2adae907a] An alternative approach for fixing ticket [1c24a659e6d7f3a1]. (check-in: [a2adae907a] user: drh branch: tkt-1c24a659-b, size: 64349)
2021-03-11
10:55
[d1a032f3e1] part of check-in [ef8c6e06cb] Merge latest trunk changes into this branch. (check-in: [ef8c6e06cb] user: dan branch: reuse-schema, size: 63882)
2021-03-08
17:17
[1f9383846b] part of check-in [f13e0d12f1] Fix a bad assert in RENAME COLUMN. dbsqlfuzz 3f0a7245b69cd08617d7d7781ebaedb0fe765a93. (check-in: [f13e0d12f1] user: drh branch: trunk, size: 63896)
2021-03-06
13:02
[99618c6098] part of check-in [349ccf58ae] Fix a possible NULL pointer dereference when applying a DROP COLUMN to a corrupt database schema. dbsqlfuzz 419aa525df93db6e463772c686ac6da27b46da9e (check-in: [349ccf58ae] user: drh branch: trunk, size: 63914)
2021-03-04
19:44
[ba30a3a567] part of check-in [2345907109] Mark the NotUsed parameter to the dropColumnFunc() function as unused, to avoid a harmless compiler warning. (check-in: [2345907109] user: drh branch: trunk, size: 63903)
2021-03-03
19:54
[f63c20191c] part of check-in [73bf458e1d] Merge recent trunk enhancements into the reuse-schema branch. (check-in: [73bf458e1d] user: drh branch: reuse-schema, size: 63860)
2021-02-21
21:04
[d5fd529509] part of check-in [bfd5bf2c73] Rename the "struct SrcList_item" object to the more succinct "SrcItem". This is a symbolic change only. The logic is unmodified. (check-in: [bfd5bf2c73] user: drh branch: trunk, size: 63874)
2021-02-19
18:39
[19b49c98a0] part of check-in [9edf2ddc47] Fix another problem handling corrupt database files in the ALTER TABLE DROP COLUMN code. (check-in: [9edf2ddc47] user: dan branch: trunk, size: 63898)
14:13
[1addd06a7a] part of check-in [126ee1ec4f] Fix a crash that could occur in ALTER TABLE DROP COLUMN if the sqlite_schema table was corrupt. (check-in: [126ee1ec4f] user: dan branch: alter-table-drop-column, size: 64029)
09:46
[4dc2c97b49] part of check-in [c5719fc5aa] Omit an branch made unreachable by the improved error message from dropping the last column of a table. (check-in: [c5719fc5aa] user: drh branch: alter-table-drop-column, size: 63806)
09:09
[ae5ff19583] part of check-in [5e1f362bc3] Give a better error message on DROP COLUMN when attempting to drop the last column of a table. (check-in: [5e1f362bc3] user: drh branch: alter-table-drop-column, size: 63800)
02:30
[b2a3c89c5b] part of check-in [963f498ae6] Add a NEVER() to an unreachable branch in the DROP COLUMN logic. (check-in: [963f498ae6] user: drh branch: alter-table-drop-column, size: 63601)
2021-02-18
23:53
[7f9453d11a] part of check-in [9bb720e659] Add missing VdbeCoverage() macros. (check-in: [9bb720e659] user: drh branch: alter-table-drop-column, size: 63594)
23:03
[fedd5c9e8d] part of check-in [68bcde7ab5] Enhance renameParseSql() to better handle OOMs. (check-in: [68bcde7ab5] user: drh branch: alter-table-drop-column, size: 63560)
20:27
[c2d554c43d] part of check-in [e5f144182b] Fix DROP COLUMN so that it works even if the user has registered an authorizer callback. (check-in: [e5f144182b] user: dan branch: alter-table-drop-column, size: 63538)
19:25
[2e5a292062] part of check-in [565a6fd0c9] Fix a problem with schema error detection when processing ALTER TABLE DROP COLUMN commands. (check-in: [565a6fd0c9] user: dan branch: alter-table-drop-column, size: 63392)
2021-02-17
20:46
[d56ceae00c] part of check-in [ea999c9db5] Fix a problem with OOM error handling in the new code on this branch. (check-in: [ea999c9db5] user: dan branch: alter-table-drop-column, size: 62917)
20:08
[e4bb151562] part of check-in [10538ec6fc] Fix various issues with the changes on this branch. Add test cases for the same. (check-in: [10538ec6fc] user: dan branch: alter-table-drop-column, size: 62895)
2021-02-16
20:43
[e912280eed] part of check-in [f0217937d7] Add experimental implementation of ALTER TABLE DROP COLUMN. Only some cases work so far. (check-in: [f0217937d7] user: dan branch: alter-table-drop-column, size: 62193)
2021-02-15
13:17
[c4a973d7fc] part of check-in [29c1932a47] Ensure that the ALTER TABLE statements return 0 for sqlite3_column_count(). (check-in: [29c1932a47] user: drh branch: trunk, size: 56839)
2021-02-10
20:20
[916ec1f34a] part of check-in [d29c41bd26] Merge latest trunk changes into this branch. (check-in: [d29c41bd26] user: dan branch: reuse-schema, size: 56798)
2021-01-01
20:04
[36cae0d6e3] part of check-in [6f25f2529f] Change the unions of the Table.addColOffset field from characters to bytes. This makes the query that implements ALTER TABLE ADD COLUMN more complex and slightly slower, but also makes CREATE TABLE statement parsing faster by avoiding a call to sqlite3UtfCharLen(). Since, CREATE TABLE parsing is far more common than ALTER TABLE, this is a net win for performance. (check-in: [6f25f2529f] user: drh branch: trunk, size: 56812)
2020-11-18
21:15
[5f81b936ed] part of check-in [6004de525d] Merge trunk changes into this branch. (check-in: [6004de525d] user: dan branch: reuse-schema, size: 56618)
2020-10-31
16:33
[b6de60d594] part of check-in [3e6af89040] Update the ALTER TABLE command to correctly handle UPDATE ... FROM statements within trigger programs. (check-in: [3e6af89040] user: dan branch: trunk, size: 56632)
2020-08-14
13:55
[46f7f401f9] part of check-in [e456d43708] Merge the 3.33.0 release into the reuse-schema branch. (check-in: [e456d43708] user: drh branch: reuse-schema, size: 56138)
2020-08-12
16:19
[805de23ddc] part of check-in [f6cffa2d50] Improvement on the previous fix. (check-in: [f6cffa2d50] user: drh branch: trunk, size: 56152)
15:39
[d220ddd24b] part of check-in [41de742c57] Fix an assertion() fault in ALTER TABLE found by OSSFuzz. Test case in TH3. (check-in: [41de742c57] user: drh branch: trunk, size: 56154)
2020-08-11
14:55
[485b411347] part of check-in [b1a77b7ead] Merge all changes since the 3.32.0 release into the reuse-schema branch. (check-in: [b1a77b7ead] user: drh branch: reuse-schema, size: 56121)
2020-07-29
16:18
[71886ac63d] part of check-in [a80ae2c98b] Dozens and dozens of typo fixes in comments. This change adds no value to the end product and is disruptive, so it is questionable whether or not it will ever land on trunk. (check-in: [a80ae2c98b] user: drh branch: typos, size: 56136)
2020-07-18
18:44
[4bc16666a0] part of check-in [4c0d208c45] More harmless compiler warning fixes. (check-in: [4c0d208c45] user: drh branch: trunk, size: 56135)
2020-07-14
19:51
[c63fb72ae0] part of check-in [4f6d8d0ebf] Support UPDATE...FROM statements in trigger programs. (check-in: [4f6d8d0ebf] user: dan branch: update-from, size: 56205)
2020-06-19
13:33
[f6cf5c21f9] part of check-in [9536fa0ae0] Further refactoring of the schema table name. (check-in: [9536fa0ae0] user: drh branch: trunk, size: 56011)
2020-06-15
20:27
[b8ffe4acd4] part of check-in [61782a7ae3] Provide "sqlite_schema" as an alternative name to the table that holds the database schema. (check-in: [61782a7ae3] user: drh branch: trunk, size: 56011)
2020-05-16
19:00
[e1198116d9] part of check-in [5af4abe98c] Merge trunk enhancements in the reuse-schema branch. (Actual date of this check-in is 2020-05-18.) (check-in: [5af4abe98c] user: drh branch: reuse-schema, size: 55965)
2020-05-14
21:16
[826bc45614] part of check-in [eca0ba2cf4] Do not allow a virtual table to be renamed into the name of one of its shadows. (check-in: [eca0ba2cf4] user: drh branch: trunk, size: 55979)
2020-05-08
19:02
[8d8e0b512a] part of check-in [3a16c0ce4d] Release some restrictions on columns added by ALTER TABLE so that they only apply if the table contains one or more rows. (check-in: [3a16c0ce4d] user: drh branch: trunk, size: 55928)
2020-04-07
01:18
[fa2c3be9b0] part of check-in [230556e859] The ALTER TABLE fix of check-in [7e5ad8e0ab7ee91a] is no longer needed due to the changes at check-in [4cf8721f5ceb1fda]. But, we keep the defense in place as an assert() for extra safety. (check-in: [230556e859] user: drh branch: trunk, size: 55439)
2020-04-06
18:16
[db353ed312] part of check-in [1e4b6a9398] Performance improvement for column name lookup. (check-in: [1e4b6a9398] user: drh branch: trunk, size: 55431)
2020-04-03
11:20
[ac9d737cac] part of check-in [d09f8c3621] Fix a case when a pointer might be used after being freed in the ALTER TABLE code. Fix for [4722bdab08cb1]. (check-in: [d09f8c3621] user: dan branch: trunk, size: 55383)
2020-01-17
15:33
[d8f927946f] part of check-in [b302b260ca] More restrictions on changes to shadow tables when in defensive mode. (check-in: [b302b260ca] user: drh branch: branch-3.28, size: 53022)
15:24
[00814c584a] part of check-in [3d13fbf248] Validate the type, name, and tbl_name fields of the sqlite_master table when loading the schema, unless writable_schema is engaged. (check-in: [3d13fbf248] user: drh branch: branch-3.28, size: 53049)
2020-01-15
14:26
[5584426b56] part of check-in [f783917800] Merge all recent enhancements and fixes from trunk. (check-in: [f783917800] user: drh branch: reuse-schema, size: 55008)
2020-01-02
22:23
[f48a4423c8] part of check-in [34b877742e] NEVER() and ALWAYS() macros tagging unreachable branches. (check-in: [34b877742e] user: drh branch: two-size-lookaside, size: 55022)
2019-12-31
14:49
[92604dd52b] part of check-in [39d5557937] Merge recent enhancements from trunk. (check-in: [39d5557937] user: drh branch: two-size-lookaside, size: 54979)
2019-12-20
14:18
[bc3e4089d5] part of check-in [365dd8b663] Fix a potential problem with ALTER TABLE commands on schemas that contains a triggers or view featuring a sub-query that uses an ON clause with a join that is not a LEFT JOIN. (check-in: [365dd8b663] user: dan branch: trunk, size: 54838)
14:08
[ed16ff55ca] part of check-in [2bbd014c90] Fix harmless compiler warnings. (check-in: [2bbd014c90] user: drh branch: trunk, size: 54767)
12:55
[ca6d2329c9] part of check-in [01ca865f31] Do not continue an ALTER TABLE tree walk of a subquery if a prior error is seen in the tree. Report the problem immediately, without continuing. (check-in: [01ca865f31] user: drh branch: trunk, size: 54854)
2019-12-19
03:14
[ca75938a5e] part of check-in [4146c629c6] More restrictions on changes to shadow tables when in defensive mode. (check-in: [4146c629c6] user: drh branch: branch-3.30, size: 53809)
2019-12-17
12:03
[14b5516be5] part of check-in [8223e79f98] Clean up the ExprList that holds the names of columns in a CTE before checking for unused references in the ALTER TABLE implementation. (check-in: [8223e79f98] user: drh branch: trunk, size: 54804)
2019-12-13
00:49
[accee2f80a] part of check-in [59d0f3afe5] Tie up the loose ends in the ExprList size reduction. (check-in: [59d0f3afe5] user: drh branch: exprlist-size-reduction, size: 54870)
2019-12-12
20:22
[27aaf1045f] part of check-in [d3783357f8] Change the name of the Expr.a.zName field to zEName, so that it has a name that is distinct from other fields and variables and is hence easier to grep for. (check-in: [d3783357f8] user: drh branch: two-size-lookaside, size: 54733)
2019-12-09
19:29
[9b3d6f8d34] part of check-in [c7309ed3c7] Add a NEVER() to the ALTER TABLE fix in check-in [1d2e53a39b87e364] (check-in: [c7309ed3c7] user: drh branch: trunk, size: 54729)
08:13
[ef3519bcc3] part of check-in [1d2e53a39b] Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. (check-in: [1d2e53a39b] user: dan branch: trunk, size: 54722)
2019-12-05
14:31
[c49548d049] part of check-in [7e5ad8e0ab] Fix a problem in ALTER TABLE that could occur if an index, view or trigger in the schema features an expression of the form ((SELECT ...) IN ()) where the SELECT statement uses a CTE. (check-in: [7e5ad8e0ab] user: dan branch: trunk, size: 54414)
2019-12-04
15:08
[8980e4d8c6] part of check-in [54410f0e77] Ensure that an ALWAYS() in the rename logic really is always true, even for faulty inputs. (check-in: [54410f0e77] user: drh branch: trunk, size: 54290)
14:26
[3101da3618] part of check-in [75b04a4b0d] Fix an assert() failure that could occur in ALTER TABLE code when the schema contains a view that uses a CTE. (check-in: [75b04a4b0d] user: dan branch: trunk, size: 54251)
2019-11-16
13:51
[01730734ad] part of check-in [8ad34d36a1] Break out the test for writable shadow tables into a separate subroutine. (check-in: [8ad34d36a1] user: drh branch: defensive-improvements, size: 54220)
2019-10-24
01:04
[0fdf14a1d1] part of check-in [42fc08bc15] Do not allow ALTER TABLE ADD COLUMN for a STORED column. (check-in: [42fc08bc15] user: drh branch: generated-columns, size: 54247)
2019-10-19
13:29
[fa7486bfd1] part of check-in [27ab41c910] Refactor names of column index transformation functions, for clarity. Get generated columns working with ALTER TABLE RENAME COLUMN. (check-in: [27ab41c910] user: drh branch: generated-columns, size: 54129)
2019-10-16
20:05
[8a4317e2b3] part of check-in [120c6b78cb] ALTER TABLE is able to add a VIRTUAL column. (check-in: [120c6b78cb] user: drh branch: generated-columns, size: 53961)
2019-10-11
11:21
[2cd3adaef2] part of check-in [eff7cd7f12] Merge the 3.30.1 changes into reuse-schema. (check-in: [eff7cd7f12] user: drh branch: reuse-schema-3.30, size: 53822)
2019-10-09
15:00
[83cf597342] part of check-in [01ba4641ab] Change sqlite3SelectDup() to always return NULL if an OOM has occurred. (check-in: [01ba4641ab] user: drh branch: trunk, size: 53794)
2019-10-07
18:43
[5773b28684] part of check-in [31e85fbbc4] Fix a problem with running ALTER TABLE ADD COLUMN statements within a transaction that writes to one or more virtual tables. Fix for [8fe768e9]. (check-in: [31e85fbbc4] user: dan branch: trunk, size: 53836)
2019-08-13
15:22
[deddf43989] part of check-in [5b4689d89c] Merge latest trunk changes with this branch. (check-in: [5b4689d89c] user: dan branch: reuse-schema, size: 53795)
2019-08-12
00:08
[5c3031e45e] part of check-in [724f4df9cc] Validate the type, name, and tbl_name fields of the sqlite_master table when loading the schema, unless writable_schema is engaged. (check-in: [724f4df9cc] user: drh branch: trunk, size: 53809)
2019-07-08
21:32
[0042c5ab97] part of check-in [fae92fee54] Merge recent trunk enhancements into the reuse-schema branch. (check-in: [fae92fee54] user: drh branch: reuse-schema, size: 53782)
12:44
[3c5b9bdfdb] part of check-in [b0629132bc] Comment improvements. No changes to code. (check-in: [b0629132bc] user: drh branch: tkt9b78184b-alt, size: 56364)
2019-07-02
20:10
[bb45a2df94] part of check-in [5dbb0734af] Have ALTER TABLE detect and error out for the case where renaming a column changes a the interpretation of a double-quoted identifier in the database schema from an SQL literal to a column reference. (check-in: [5dbb0734af] user: dan branch: tkt9b78184b-alt, size: 56219)
2019-06-15
15:21
[c1b5e5639b] part of check-in [d3b6f1665f] Ensure that sqlite3RenameExprUnmap() does an unmap of the result set alias names in subqueries when ALTER TABLE fails because of a syntax error in a trigger. (check-in: [d3b6f1665f] user: drh branch: trunk, size: 53796)
2019-06-11
16:43
[12f8c9a79a] part of check-in [d4755aca4b] Mark an unreachable branch with an ALWAYS macro. (check-in: [d4755aca4b] user: drh branch: trunk, size: 53563)
12:03
[29fcfd07f7] part of check-in [f2c8179f3c] Have the ALTER TABLE code handle the case where an entire expression that includes a sub-select is excluded from a view, trigger or index. (check-in: [f2c8179f3c] user: dan branch: trunk, size: 53501)
2019-05-14
22:25
[7b0602147d] part of check-in [018f3199b9] Merge all the latest trunk enhancements into the reuse-schema branch. (check-in: [018f3199b9] user: drh branch: reuse-schema, size: 53112)
2019-04-19
16:34
[85b41586b2] part of check-in [a2ead8aa45] Fix a problem with renaming a table that starts with "sqlite". Fix for ticket [f00d7b65]. (check-in: [a2ead8aa45] user: dan branch: trunk, size: 53126)
2019-03-20
16:03
[7516a6e36d] part of check-in [4cd20ca677] Merge latest trunk changes into this branch. (check-in: [4cd20ca677] user: dan branch: reuse-schema, size: 53022)
2019-03-15
16:17
[25f5438712] part of check-in [0f2129f59f] Ensure that ALTER TABLE commands open statement transactions. Fix for [596d059a]. (check-in: [0f2129f59f] user: dan branch: trunk, size: 53036)
2019-02-18
18:16
[669e18e9ef] part of check-in [88cbf54eee] Ensure that creating temp schema items does not cause an OPEN_SHARABLE_SCHEMA connection to load all schemas into memory. (check-in: [88cbf54eee] user: dan branch: reuse-schema, size: 52951)
2019-02-05
19:51
[995b37de87] part of check-in [c089cc4fbe] Merge latest trunk into this branch. (check-in: [c089cc4fbe] user: dan branch: reuse-schema, size: 52933)
2019-01-18
16:06
[cb691d6cd3] part of check-in [64bec9e621] Fix a fairly obscure problem allowing an "ALTER TABLE RENAME col TO ..." statement to modify the schema in such a way as to break a reference within a trigger program. (check-in: [64bec9e621] user: dan branch: trunk, size: 52947)
2019-01-13
00:58
[8ac946d83b] part of check-in [ac3b6021d9] Move a local variable declaration into the outermost scope in which it is used. This fixes an ASAN warning. (check-in: [ac3b6021d9] user: drh branch: trunk, size: 52915)
2019-01-09
02:02
[9dda6a9cb2] part of check-in [f09aa3248e] Enhance the ALTER TABLE RENAME COLUMN feature so that it works on tables that have redundant UNIQUE and/or PRIMARY KEY constraints. Fix for ticket [bc8d94f0fbd633fd9a051e3] (check-in: [f09aa3248e] user: drh branch: trunk, size: 52921)
2018-12-18
20:31
[082286f891] part of check-in [23e200da5c] In defensive mode, do not allow shadow tables to be renamed using ALTER TABLE. (check-in: [23e200da5c] user: dan branch: trunk, size: 52806)
2018-12-06
01:53
[87c9057f5e] part of check-in [ea50815bf8] Fix a potential NULL pointer dereference that can occur in ALTER TABLE following an OOM. Test case in TH3. (check-in: [ea50815bf8] user: drh branch: trunk, size: 52643)
2018-12-05
13:49
[80747854ca] part of check-in [f44bc7a8b3] Ensure that ALTER TABLE modifies table and column names embedded in WITH clauses that are part of views and triggers. (check-in: [f44bc7a8b3] user: dan branch: trunk, size: 52551)
2018-11-26
18:09
[f886160da1] part of check-in [6e1330545e] Do not allow direct access to internal-use SQL functions such as sqlite_rename_column() and sqlite3_rename_table() except when the new SQLITE_TESTCTRL_INTERNAL_FUNCTIONS flag is set. (check-in: [6e1330545e] user: drh branch: trunk, size: 52043)
15:00
[a61ed147e7] part of check-in [12920bcb99] Minor comment enhancement in alter.c. No changes to code. (check-in: [12920bcb99] user: drh branch: trunk, size: 52385)
2018-11-20
16:02
[f4ba663ee1] part of check-in [dfab7170ed] Consolidate the two sqlite3SchemaToIndex() routines. (check-in: [dfab7170ed] user: dan branch: reuse-schema1, size: 52399)
2018-11-19
20:41
[3e283b5726] part of check-in [84be9220db] Fix a problem with virtual tables in shared schemas. (check-in: [84be9220db] user: dan branch: reuse-schema1, size: 52407)
2018-11-17
18:45
[ab7f9763c0] part of check-in [9fdd186897] Merge latest trunk changes into this branch. (check-in: [9fdd186897] user: dan branch: reuse-schema1, size: 52165)
2018-11-16
17:04
[486cfbe888] part of check-in [9780829a77] Fix further REUSE_SCHEMA issues. (check-in: [9780829a77] user: dan branch: reuse-schema1, size: 52148)
2018-11-09
20:04
[61c1ace40a] part of check-in [ae9638e9c0] When a table is renamed using "ALTER TABLE RENAME TO", update any REFERENCES clauses that refer to the table, unless "PRAGMA legacy_alter_table" is true and "PRAGMA foreign_keys" is set to false (i.e. so that when "PRAGMA legacy_alter_table" is set behaviour is still compatible with versions 3.24 and earlier). (check-in: [ae9638e9c0] user: dan branch: trunk, size: 52155)
2018-10-08
18:58
[59fa34093f] part of check-in [2ac72114a1] Merge latest trunk changes into this branch. (check-in: [2ac72114a1] user: dan branch: reuse-schema, size: 52124)
2018-10-06
14:33
[27281c6ed7] part of check-in [dac285474a] Ensure each ALTER TABLE statement makes just a single SQLITE_ALTER_TABLE call to the authorizer function. (check-in: [dac285474a] user: dan branch: alter-auth-callbacks, size: 52609)
2018-10-03
18:05
[bcb67339d8] part of check-in [ebcd452317] Add an ALWAYS on an unreachable branch in the ALTER TABLE logic. (check-in: [ebcd452317] user: drh branch: trunk, size: 52138)
2018-10-01
07:04
[b929e4daab] part of check-in [c52f457e56] Fix a problem with ALTER TABLE commands when the schema features an INSTEAD of trigger that uses NEW.* or OLD.*. (check-in: [c52f457e56] user: dan branch: trunk, size: 52008)
2018-09-20
20:15
[65fc93f6de] part of check-in [7edd26ed27] Add the "PRAGMA legacy_alter_table=ON" command to enable the pre-3.25.0 behavior of ALTER TABLE that does not modify the bodies of triggers or views or the WHERE clause of a partial index. Enable the legacy behavior by default when running the xRename method of virtual tables. (check-in: [7edd26ed27] user: drh branch: trunk, size: 51893)
19:02
[e561794b31] part of check-in [ad130bb86e] Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a new EP_WinFunc property that is only true if Expr.y.pWin is a valid pointer. This reduces the size of the Expr object by 8 bytes, reduces the overall amount of code, and shaves over 1 million cycles off of the speed test. (check-in: [ad130bb86e] user: drh branch: trunk, size: 51539)
17:21
[70dd115eb1] part of check-in [71947337e9] By default, make all "ALTER TABLE RENAME" statements executed within a virtual table xRename() method exhibit the legacy behaviour. (check-in: [71947337e9] user: dan branch: legacy-alter-table, size: 51887)
08:28
[5bca9ae02f] part of check-in [5acad2e92c] Add a PRAGMA that restores the legacy ALTER TABLE RENAME TO behaviour. (check-in: [5acad2e92c] user: dan branch: legacy-alter-table, size: 51887)
2018-09-19
20:14
[3a859149c1] part of check-in [24b0f66ac6] Reduce the size of Expr to 64-bytes. This works somewhat, but there are test failures. More importantly, the size reduction from 80- to 64-bytes has not lowered the schema memory usage, but it has made the code a little bigger and a little slower. So the initial evidence is that this Expr refactoring experiment is not working... (check-in: [24b0f66ac6] user: drh branch: expr-simplify, size: 51609)
2018-09-17
13:38
[2269dd2f37] part of check-in [4d8be404da] Minor modification to the fix on this branch to avoid adding extra conditional compilation macros. (check-in: [4d8be404da] user: dan branch: tkt-b41031ea, size: 51533)
2018-09-12
15:51
[3800f24c92] part of check-in [4396914f8e] Restrict the scope of internal-use functions in alter.c. (check-in: [4396914f8e] user: drh branch: trunk, size: 51466)
08:51
[b04e36e22f] part of check-in [572de7e4e3] Fix an invalid pointer comparison triggered by renaming a table column when there are views with explicit column names in the schema. (check-in: [572de7e4e3] user: dan branch: trunk, size: 51445)
2018-09-07
18:52
[eed847377b] part of check-in [8fa254aa63] Add assert() and ALWAYS() to identify two unreachable branches. (check-in: [8fa254aa63] user: drh branch: trunk, size: 50970)
15:50
[54146be02c] part of check-in [ceb60bd7e5] Fix a problem with renaming a non-temp table that has at least one temp trigger and shares its name with a temp table. (check-in: [ceb60bd7e5] user: dan branch: trunk, size: 50962)
11:51
[525d74d322] part of check-in [1a8aedc337] Minor fixes for problems revealed by releasetest.tcl. (check-in: [1a8aedc337] user: dan branch: trunk, size: 50919)
2018-09-06
17:47
[b4c7e8f75d] part of check-in [fa835145e6] Fix a problem in ALTER TABLE with SQLITE_OMIT_VIRTUALTABLE builds. (check-in: [fa835145e6] user: dan branch: trunk, size: 50847)
16:01
[9088b817d4] part of check-in [ffecfca511] Ensure that the tbl_name column in the sqlite_temp_master table is updated correctly as part of a RENAME TABLE operation. (check-in: [ffecfca511] user: dan branch: alter-table-rename-column, size: 50852)
2018-09-05
14:36
[900f64f083] part of check-in [2ec7e50cbc] Avoid comparing pointer values after the object that they point to has been deleted. (check-in: [2ec7e50cbc] user: dan branch: alter-table-rename-column, size: 50312)
08:28
[03195c21c2] part of check-in [18ba35b86f] Fix minor code issues in alter.c. (check-in: [18ba35b86f] user: dan branch: alter-table-rename-column, size: 48789)
2018-09-03
20:05
[8e6fc7ba56] part of check-in [6805b5900d] Improve the error messages emitted by RENAME TABLE. (check-in: [6805b5900d] user: dan branch: alter-table-rename-column, size: 46837)
2018-09-01
20:23
[f309bac1d1] part of check-in [336b8a0923] Fix a problem with renaming a column in a table that has a temp trigger that references another attached database. (check-in: [336b8a0923] user: dan branch: alter-table-rename-column, size: 46602)
20:02
[24c05a7bcc] part of check-in [41b8f38b97] Fixes for harmless compiler warnings. (check-in: [41b8f38b97] user: drh branch: alter-table-rename-column, size: 46529)
16:55
[f07588d9f0] part of check-in [2e2cf992f5] Fix some harmless compiler warnings and improve defenses against OOM errors. (check-in: [2e2cf992f5] user: drh branch: alter-table-rename-column, size: 46767)
16:05
[86affdc447] part of check-in [8d89ddc1a6] Have "ALTER TABLE ADD COLUMN" reload the entire db schema, as "RENAME COLUMN" and "RENAME TABLE" do. (check-in: [8d89ddc1a6] user: dan branch: alter-table-rename-table, size: 46859)
15:55
[245152daa1] part of check-in [22e785aa2b] Merge fixes from the alter-table-rename-column branch that occurred after this branch separated from that one. (check-in: [22e785aa2b] user: drh branch: alter-table-rename-table, size: 51005)
2018-08-31
18:23
[6fa0efb035] part of check-in [eac2aa7dce] Ensure b-tree mutexes are always held when sqlite3FindTable() is called. Do not invoke the authorizer callback when parsing schema items as part of ALTER TABLE commands. Fix test script issues. (check-in: [eac2aa7dce] user: dan branch: alter-table-rename-table, size: 50812)
2018-08-30
20:03
[5ff9eba02e] part of check-in [f3c27d916d] Test the schema after renaming a table. Ensure that temp database triggers and views are updated when renaming a column. (check-in: [f3c27d916d] user: dan branch: alter-table-rename-table, size: 50522)
16:26
[f46a4188f9] part of check-in [72cfb1be29] Fix an ALTER TABLE problem with processing temp schema views and triggers. (check-in: [72cfb1be29] user: dan branch: alter-table-rename-table, size: 48794)
2018-08-29
21:00
[78188ded77] part of check-in [01308bae3a] Extend RENAME TABLE to edit triggers and views. Still buggy. (check-in: [01308bae3a] user: dan branch: alter-table-rename-table, size: 48748)
2018-08-25
16:14
[cd45c47c74] part of check-in [fc293bcb34] Invoke the authorizer for ALTER TABLE RENAME COLUMN. (check-in: [fc293bcb34] user: drh branch: alter-table-rename-column, size: 50281)
02:04
[64dcb3cb53] part of check-in [f0eed21d4e] The implementation of sqlite_rename_column() must be holding the schema mutexes. (check-in: [f0eed21d4e] user: drh branch: alter-table-rename-column, size: 50088)
2018-08-24
20:20
[39c6b7f93d] part of check-in [83d5f5abce] Fix a problem by renaming a column when the schema contains an trigger program featuring an UPSERT that uses an "excluded.*" reference to a different table. (check-in: [83d5f5abce] user: dan branch: alter-table-rename-column, size: 49993)
20:10
[1e0fc6d05d] part of check-in [bb2f723496] Fix a problem with renaming a column that occurs as an "excluded.colname" construction in an UPSERT that is part of a trigger program. (check-in: [bb2f723496] user: dan branch: alter-table-rename-column, size: 50046)
17:55
[4433a45020] part of check-in [a0e06d2c5e] After modifying and reparsing the schema as part of an ALTER TABLE RENAME COLUMN, check that no new schema errors have been introduced (e.g. ambiguous column names in views) before committing the operation. (check-in: [a0e06d2c5e] user: dan branch: alter-table-rename-column, size: 49846)
16:04
[6b381569b1] part of check-in [ad072a835f] Avoid incorrectly replacing tokens that refer to a column being renamed via an alias. For example, do not overwrite "xyz" when "a" is renamed in "CREATE VIEW v1 AS SELECT a AS xyz FROM tbl WHERE xyz=1" (check-in: [ad072a835f] user: dan branch: alter-table-rename-column, size: 49221)
2018-08-23
19:32
[070bf02d14] part of check-in [a7dae59a7e] Fix harmless compiler warnings in the ALTER TABLE logic. Rephrase an error message to use active voice. (check-in: [a7dae59a7e] user: drh branch: alter-table-rename-column, size: 49190)
2018-08-21
16:32
[54c347c1f6] part of check-in [b9ae9a0a18] Rename internal function sqlite3RenameToken() to sqlite3RenameTokenMap() and sqlite3MoveRenameToken() to sqlite3RenameTokenRemap(). (check-in: [b9ae9a0a18] user: dan branch: alter-table-rename-column, size: 49165)
15:06
[0c27d981c6] part of check-in [5d2163c734] Rationalize some duplicated code in alter.c. Also improve error messages for ALTER TABLE RENAME COLUMN in some cases. (check-in: [5d2163c734] user: dan branch: alter-table-rename-column, size: 49113)
08:29
[d8882d67a1] part of check-in [479976955e] Minor changes to function tokenExpr() in order to claw back cycles lost to the rename-column change. (check-in: [479976955e] user: dan branch: alter-table-rename-column, size: 48932)
2018-08-20
20:01
[efe002e3fd] part of check-in [82c4c10a96] Add further tests for RENAME COLUMN. (check-in: [82c4c10a96] user: dan branch: alter-table-rename-column, size: 48916)
16:16
[bfd9803d8e] part of check-in [786b5991dc] Ensure that it is not possible to rename columns of system tables, views or virtual tables. (check-in: [786b5991dc] user: dan branch: alter-table-rename-column, size: 48838)
2018-08-18
18:27
[3c041ceedc] part of check-in [9d8e73bf71] Additional fixes for harmless compiler warnings that are specific to this branch. (check-in: [9d8e73bf71] user: drh branch: alter-table-rename-column, size: 47830)
17:35
[3342dba26f] part of check-in [7fa1faeaff] Improvements to error handling in ALTER TABLE RENAME COLUMN. (check-in: [7fa1faeaff] user: dan branch: edit-trigger-wrapper, size: 47749)
2018-08-17
18:08
[c81f6d8d4f] part of check-in [7b72b2360a] Allow an ALTER TABLE RENAME COLUMN to proceed even if the schema contains a virtual table for which the module is unavailable. (check-in: [7b72b2360a] user: dan branch: edit-trigger-wrapper, size: 45828)
2018-08-16
19:49
[c16b42be9a] part of check-in [3f47222b6e] Further progress on updating trigger programs as part of ALTER TABLE RENAME COLUMN. (check-in: [3f47222b6e] user: dan branch: edit-trigger-wrapper, size: 45783)
2018-08-15
20:28
[1452a35d16] part of check-in [e272dc2b1c] Have ALTER TABLE RENAME COLUMN edit trigger programs. Only partly working. (check-in: [e272dc2b1c] user: dan branch: edit-trigger-wrapper, size: 44875)
2018-08-14
21:05
[e1f3a71924] part of check-in [6e6a2bfdbb] Fix a problem when renaming an IPK column that is also part of a child key. (check-in: [6e6a2bfdbb] user: dan branch: edit-trigger-wrapper, size: 42386)
21:03
[35512b6c70] part of check-in [ad15486022] Fix a problem when renaming an IPK column that is also part of a child key. (check-in: [ad15486022] user: dan branch: alter-table-rename-column, size: 40156)
20:38
[b3f6b77543] part of check-in [f6d6b47271] Do not allow ALTER TABLE RENAME COLUMN on a virtual table. (check-in: [f6d6b47271] user: drh branch: alter-table-rename-column, size: 40157)
20:18
[03a90ab398] part of check-in [db829dc1a2] Have ALTER TABLE RENAME edit column references in CREATE VIEW statements. (check-in: [db829dc1a2] user: dan branch: edit-trigger-wrapper, size: 42391)
19:27
[ec59506ca0] part of check-in [37d11b8e82] Improved error messages when an ALTER TABLE RENAME COLUMN fails due to a duplicate column name. (check-in: [37d11b8e82] user: drh branch: alter-table-rename-column, size: 39938)
16:18
[918b76c607] part of check-in [32ca8418df] Fix ALTER TABLE RENAME COLUMN in cases where the column being renamed is an IPK declared with a separate PRIMARY KEY clause - "CREATE TABLE x(y INTEGER, PRIMARY KEY(y))". (check-in: [32ca8418df] user: dan branch: alter-table-rename-column, size: 39969)
2018-08-13
17:14
[9f8231841d] part of check-in [5fdb6b0aaf] Edit the WHEN and UPDATE OF clauses of trigger programs as part of ALTER TABLE RENAME COLUMN. (check-in: [5fdb6b0aaf] user: dan branch: edit-trigger-wrapper, size: 38805)
17:02
[5367a54838] part of check-in [87743ddef1] Make the sqlite_rename_column() SQL function resistant to problems caused by OOMs and/or malformed parameters submitted by hostile application code. Also add additional comments to the RENAME COLUMN logic. (check-in: [87743ddef1] user: drh branch: alter-table-rename-column, size: 40313)
15:09
[7a8e8f14b0] part of check-in [32edc89203] Fix legacy comments on Token. Begin commenting the new ALTER TABLE RENAME COLUMN code. Fix a memory leak in the sqlite_rename_column() SQL function. (check-in: [32edc89203] user: drh branch: alter-table-rename-column, size: 38170)
13:43
[cebb1e3377] part of check-in [0b28dd5c2e] Fix issues with ALTER TABLE RENAME COLUMN associated with OOM errors. (check-in: [0b28dd5c2e] user: drh branch: alter-table-rename-column, size: 35780)
2018-08-11
20:38
[87911da129] part of check-in [ca5184a25f] If the new column name in an ALTER TABLE RENAME COLUMN statement is quoted, then also use quotes for the column name in the edited SQL statements. (check-in: [ca5184a25f] user: dan branch: alter-table-rename-column, size: 35718)
17:49
[8c3ce11294] part of check-in [6595c8811f] Fix a bug causing ALTER TABLE RENAME COLUMN to fail when renaming an IPK column that is used in a CHECK constraint. (check-in: [6595c8811f] user: dan branch: alter-table-rename-column, size: 35624)
17:34
[26ddd5989e] part of check-in [ca644a2877] Fix a bug causing all ALTER TABLE RENAME COLUMN commands to fail if ANALYZE had been run on the database. Also prevent the user from renaming the columns of system tables. (check-in: [ca644a2877] user: dan branch: alter-table-rename-column, size: 35514)
13:40
[3a3e29b33b] part of check-in [f4497b0136] Reload the entire schema after renaming a column in order to ensure that the schema for any tables for which parent key definitions were changed are reloaded. (check-in: [f4497b0136] user: dan branch: alter-table-rename-column, size: 35427)
2018-08-10
20:19
[0b71fa1e9d] part of check-in [2dec9ea4ab] Ensure the schema cookie is changed when a column is renamed. (check-in: [2dec9ea4ab] user: dan branch: alter-table-rename-column, size: 35357)
19:33
[2be0bc29ef] part of check-in [9564d7008c] Fix harmless compiler warnings. (check-in: [9564d7008c] user: drh branch: alter-table-rename-column, size: 35316)
19:19
[f5c2b068f9] part of check-in [191079bd4f] When a column is renamed, update any references to it in REFERENCES clauses that belong to other tables. (check-in: [191079bd4f] user: dan branch: alter-table-rename-column, size: 35367)
2018-08-09
20:47
[94baeaee12] part of check-in [fa0fc01eb4] Experimental implementation of ALTER TABLE ... RENAME COLUMN. Still buggy. (check-in: [fa0fc01eb4] user: dan branch: alter-table-rename-column, size: 34649)
2018-06-30
20:00
[6beb476095] part of check-in [763e6c9e2b] Fix a minor problem in the code for determining whether or not an SQL statement is SQLITE_TOOBIG. (check-in: [763e6c9e2b] user: dan branch: exp-window-functions, size: 27153)
2018-06-06
23:31
[819b14b58e] part of check-in [71f97f0f82] Change a comma into a logically equivalent but semantically clearer semicolon. (check-in: [71f97f0f82] user: drh branch: trunk, size: 27133)
2017-08-09
20:35
[748950c55b] part of check-in [a625698048] Add experimental sqlite3_open_v2() flag SQLITE_OPEN_REUSE_SCHEMA. For sharing identical in-memory schema objects between connections. (check-in: [a625698048] user: dan branch: reuse-schema, size: 27144)
2017-07-26
19:59
[cf7a8af45c] part of check-in [3808a00f06] Add the new sqlite3.mDbFlags field. Factor out bits of sqlite3.flags that do not interact with PRAGMA statements into sqlite3.mDbFlags. (check-in: [3808a00f06] user: drh branch: trunk, size: 27134)
2017-06-28
01:12
[850ede4e60] part of check-in [bfc4e7f30e] Minor code simplification in the ALTER TABLE logic. (check-in: [bfc4e7f30e] user: drh branch: trunk, size: 27113)
2016-12-16
01:00
[3b23977620] part of check-in [8d646905b8] All temp.sqlite_master to be used as an alias for sqlite_temp_master. (check-in: [8d646905b8] user: drh branch: trunk, size: 27141)
2016-12-14
14:07
[0f83ee1d59] part of check-in [9cae4c2e30] Refactor the Table.nRef field as Table.nTabRef for easier grepping. (check-in: [9cae4c2e30] user: drh branch: trunk, size: 27159)
2016-08-18
14:33
[299117695b] part of check-in [92a22f0134] Rename the Db.zName field to Db.zDbSName to make it more descriptive and to distinguish it from all of the other "zName" variables scattered throughout the code. (check-in: [92a22f0134] user: drh branch: zDbSName, size: 27153)
2016-07-14
19:13
[cc28ab933a] part of check-in [a7db6e45ad] Fix ALTER TABLE so that it does not promote the schema version past 3, as that will cause DESC indexes to go corrupt. Ticket [f68bf68513a1c]. (check-in: [a7db6e45ad] user: drh branch: trunk, size: 27147)
2016-02-29
15:53
[1bb0709b30] part of check-in [842b211627] Reduce the amount of heap required to store many schemas by storing each column datatype appended to the column name, rather than as a separate allocation. (check-in: [842b211627] user: drh branch: schema-storage, size: 27136)
2016-02-27
21:16
[44e18dfd78] part of check-in [d8c94a46df] Eliminate the need for the Column.zDflt (using Column.pDflt instead) to reduce the amount of memory needed to hold the schema. (check-in: [d8c94a46df] user: drh branch: trunk, size: 27157)
2016-02-15
00:34
[7603afbd61] part of check-in [3201fbcc51] Improvements to the application-defined function mechanism so that it is more compact and runs faster, especially when the application defines thousands of new SQL functions. (check-in: [3201fbcc51] user: drh branch: many-app-functions, size: 27127)
2016-02-09
16:09
[1fbb01c26c] part of check-in [e1d8ec8554] Code simplification: ALTER TABLE ADD COLUMN always upgrades the file_format to 4 if is not there already. No need to upgrade to only 2 or 3 since format 4 has now been supported for over 10 years. (check-in: [e1d8ec8554] user: drh branch: trunk, size: 27302)
2016-02-06
14:14
[d50b7dbb49] part of check-in [a2952231ac] Fix an assert() to have a test instead of a side effect (check-in: [a2952231ac] user: pdr branch: trunk, size: 27882)
2016-02-05
01:55
[e4a5132e62] part of check-in [c3ef03478a] Improvements to the way that OOM errors are processed. (check-in: [c3ef03478a] user: drh branch: oom-handling, size: 27881)
2016-02-04
11:48
[b6e0befc17] part of check-in [b787165b25] Remove unnecessary sets of db->mallocFailed. (check-in: [b787165b25] user: drh branch: trunk, size: 27871)
2016-02-01
21:48
[3fe13e97ab] part of check-in [6d7d4703eb] Change the OP_SetCookie instruction to write the literal P3 value, not the value in register P3. (check-in: [6d7d4703eb] user: drh branch: trunk, size: 27865)
2015-10-10
14:41
[9d649e46c7] part of check-in [9ddef84d43] Compiler warning fixes: Rename some local variables from "j1" to avoid a name collision with the j1() bessel function in the math library. Omit a dummy initializer that gcc 4.6.3 does not like. (check-in: [9ddef84d43] user: drh branch: trunk, size: 27858)
2015-09-03
13:46
[4911e1f18f] part of check-in [847387ec8e] Add the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to help with code generation, especially on PRAGMAs. Rename sqlite3VdbeAddGoto() to just sqlite3VdbeGoto(). (check-in: [847387ec8e] user: drh branch: trunk, size: 27849)
2015-06-02
15:32
[48e14b8aea] part of check-in [bce3f04186] Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB. (check-in: [bce3f04186] user: drh branch: blob-affinity-rename, size: 27866)
2015-04-28
14:07
[8f6dc4a6dd] part of check-in [36e5152618] Fix an assert() failure that could occur if the internal sqlite3_rename_parent() SQL scalar function was invoked directly. (check-in: [36e5152618] user: dan branch: trunk, size: 27866)
2015-03-12
21:02
[d23d6b6991] part of check-in [a991bb1a9e] Always disallow functions as the DEFAULT of a column. Add assert()s and (check-in: [a991bb1a9e] user: drh branch: stat4-function, size: 27829)
2015-03-11
20:59
[809313ddb2] part of check-in [ff868e22ca] Allow the default value for columns added using ALTER TABLE ADD COLUMN to be a function in existing schemas loaded from disk. But prevent this version of SQLite from being used to create such a column. (check-in: [ff868e22ca] user: dan branch: stat4-function, size: 27780)
2014-09-06
16:39
[ba266a779b] part of check-in [e62aab5e92] Fix typos in comments. No code changes. (check-in: [e62aab5e92] user: peter.d.reid branch: trunk, size: 27744)
2014-05-19
15:16
[05664d9833] part of check-in [17349a49d2] Changes to help ensure that a multiplication does not overflow when computing the number of bytes needed for a memory allocation, and cause a malfunction. No problems existing problems were discovered. However, these changes should help to ensure that no problems arise in the future. (check-in: [17349a49d2] user: drh branch: safer-malloc, size: 27751)
2014-04-14
19:48
[b00900877f] part of check-in [c6fa8d0d82] Make sure the undocumented sqlite_rename_parent() function does not crash even if it is invoked with NULL arguments. Ticket [264b970c4379fd4b94] (check-in: [c6fa8d0d82] user: drh branch: trunk, size: 27746)
2014-02-20
19:23
[5d99edbac5] part of check-in [d5d973fedc] Make sure that the difference between two string pointers is passed into sqlite3_mprintf() as type "int". (check-in: [d5d973fedc] user: drh branch: trunk, size: 27709)
2014-02-19
14:20
[75a0b861e9] part of check-in [d2c047f304] Add the SQLITE_NOTNULL P5 code for comparison operations - really a composite of SQLITE_NULLEQ and SQLITE_JUMPIFNULL. This flag indicates that NULL operands are not possible and raises and assert() if NULL operands are seen. Also omit an unnecessary scan of the sqlite_sequence table when writing into an AUTOINCREMENT table. (check-in: [d2c047f304] user: drh branch: trunk, size: 27690)
00:53
[1a630c6579] part of check-in [b978256469] Tweaks in support of VDBE branch test coverage. (check-in: [b978256469] user: drh branch: trunk, size: 27689)
2014-02-17
22:40
[829d67a359] part of check-in [ce184c7bb1] Add logic to do test coverage measurements on the VDBE code. (check-in: [ce184c7bb1] user: drh branch: insert-optimization, size: 27646)
2014-02-06
23:56
[d5348d0f86] part of check-in [2f3376ebf1] Delete the OP_VerifySchema opcode. Enhance OP_Transaction to do the schema version checks that OP_VerifySchema used to do. (check-in: [2f3376ebf1] user: drh branch: trunk, size: 27629)
2013-08-06
20:01
[2af0330bb1] part of check-in [2973f5ca73] When possible, use the multi-column samples in sqlite_stat4 to estimate the number of index rows scanned by a query plan. (check-in: [2973f5ca73] user: dan branch: sqlite_stat4, size: 27655)
2012-10-26
13:34
[c3d9d0d673] part of check-in [325364a984] Backport the shared-cache-fix branch. (check-in: [325364a984] user: drh branch: branch-3.7.14, size: 27634)
2012-10-05
18:35
[ecf329684f] part of check-in [ac81ae493f] Backport fixes to shared-cache mode, from the shared-cache-fix branch, to version 3.7.9 (check-in: [ac81ae493f] user: drh branch: branch-3.7.9, size: 27619)
2012-10-04
19:33
[f8db986c03] part of check-in [2b370dea70] Shared-cache mode fixes for views and virtual tables. (check-in: [2b370dea70] user: dan branch: shared-cache-fix, size: 27651)
2012-09-13
14:22
[0c1716aa8d] part of check-in [4163f5f194] Change boolean fields in the Column object from unsigned characters into bits in a single bit mask variable. (check-in: [4163f5f194] user: drh branch: trunk, size: 27697)
2012-02-01
01:13
[149cc80d92] part of check-in [0d78ebb8e4] Fix ALTER TABLE RENAME so that it correctly handles triggers that attach to the table using the name in a different case. Ticket [ae6794effd404]. (check-in: [0d78ebb8e4] user: drh branch: trunk, size: 27680)
2011-06-03
20:11
[ac80a0f311] part of check-in [957b2ab67c] Create and use a function especially for adding the ParseSchema opcode. This gives a small reduction in code and a small performance increase. (check-in: [957b2ab67c] user: drh branch: trunk, size: 27665)
2011-04-01
15:15
[280f5c04b1] part of check-in [d9707ef8dc] Ensure that it is not possible to add a column to a system table using ALTER TABLE. (check-in: [d9707ef8dc] user: dan branch: trunk, size: 27713)
2010-09-28
19:16
[6a0c176e64] part of check-in [655991ec8a] Fix some problems that can occur if a trigger has the same name as another database object. (check-in: [655991ec8a] user: dan branch: trunk, size: 27139)
2010-07-25
02:12
[2b9a10affb] part of check-in [da2f62c502] Further examples of using automatic deallocation to replace "delete" methods. (check-in: [da2f62c502] user: drh branch: malloc-enhancement, size: 27018)
2010-07-23
15:41
[8dc27638e7] part of check-in [6eddc6e601] Remove the Table.dbMem variable, as it is no longer being used for its original purpose. (check-in: [6eddc6e601] user: dan branch: trunk, size: 26981)
2010-04-24
14:02
[a9ff6f14b3] part of check-in [0291ed974d] When commands such as ALTER TABLE and VACUUM use SQL internally, make sure they use only the built-in functions and not application-defined overrides for those functions. (check-in: [0291ed974d] user: drh branch: trunk, size: 27010)
2010-02-25
14:44
[f1c7a868b7] part of check-in [a255059786] Add some technically unnecessary variable initializations to silence compiler warnings. (check-in: [a255059786] user: dan branch: branch-3.6.1, size: 20654)
2010-02-15
18:03
[e6f4d11b1c] part of check-in [ab197d0aaf] Fix the ALTER TABLE RENAME command so that it converts FOREIGN KEY constraints in ATTACH-ed and in TEMP tables as well as in the main database. Ticket [13336e9c3c8c3f]. (check-in: [ab197d0aaf] user: drh branch: trunk, size: 26625)
2009-11-10
01:30
[92ba938565] part of check-in [f6c045f649] Remove the obsolete "$Id:$" RCS identifier strings from the source code. (check-in: [f6c045f649] user: drh branch: trunk, size: 26605)
2009-10-13
13:08
[9e4b52e6b1] part of check-in [5d381daa6e] Suppress some harmless compiler warnings. (check-in: [5d381daa6e] user: drh branch: trunk, size: 26669)
2009-10-08
01:43
[ee4c8b09a9] part of check-in [33973814c6] Fix a segfault that can occur following an OOM fault while renaming a table holding foreign key constraints. (check-in: [33973814c6] user: drh branch: trunk, size: 26640)
2009-09-29
06:33
[1b63d4f2a6] part of check-in [e4eb227b14] Various fixes so that "make test" works with OMIT_FOREIGN_KEY, OMIT_TRIGGER and OMIT_ALTER_TABLE. (check-in: [e4eb227b14] user: dan branch: trunk, size: 26610)
2009-09-26
17:51
[082657ce3a] part of check-in [b4a10c39e7] When ALTER TABLE RENAME TO is used to change the name of a table that is the parent table of a foreign key constraint, modify that foreign key constraint to use the new table name. (check-in: [b4a10c39e7] user: dan branch: trunk, size: 26454)
2009-09-25
11:26
[e771528da0] part of check-in [353b1b1825] Prevent ALTER TABLE from being used to add a column with a REFERENCES clause and a non-NULL default value while foreign key support is enabled. (check-in: [353b1b1825] user: dan branch: trunk, size: 22196)
2009-09-08
19:15
[0bbc342963] part of check-in [aec9dbd8d2] Combine the OP_Statement and OP_Transaction opcodes. (check-in: [aec9dbd8d2] user: dan branch: trunk, size: 22016)
2009-08-28
18:53
[55b601857d] part of check-in [9b9c192115] Changes to support recursive triggers. (check-in: [9b9c192115] user: dan branch: trunk, size: 21987)
2009-07-24
17:58
[8b42cace4f] part of check-in [5d9e767a05] Allow virtual tables to be used in shared-cache mode. (CVS 6928) (check-in: [5d9e767a05] user: danielk1977 branch: trunk, size: 21984)
2009-06-03
11:25
[95f41d957f] part of check-in [6dbf4eca00] Define a set of constants to use as the "index" argument to sqlite3BtreeGetMeta and UpdateMeta. This makes some parts of the code easier to follow. (CVS 6709) (check-in: [6dbf4eca00] user: danielk1977 branch: trunk, size: 21954)
2009-05-28
01:00
[88b8cc66c0] part of check-in [4ac2bdfbb4] Additional refinements to Expr handling. Restore compression of trigger expressions. Change Expr.zToken to Expr.u.zToken and added Expr.u.iValue. Remove an unnecessary ExprDup from CHECK constraint processing. And so forth. (CVS 6682) (check-in: [4ac2bdfbb4] user: drh branch: trunk, size: 21914)
2009-05-27
10:31
[accb3c77ef] part of check-in [7cb1c3ba07] Simplifications to the Expr object: Remove Expr.span completely and convert Expr.token into a char* Expr.zToken. Also simplify the Token object by removing the Token.dyn and Token.quoted fields. (CVS 6681) (check-in: [7cb1c3ba07] user: drh branch: trunk, size: 21914)
2009-05-12
17:46
[f0430ee68d] part of check-in [6fe3750a30] Move the sqlite3MinimumFileFormat() routine from build.c over to alter.c since alter.c is the only code that uses it. Additional changes and cleanup to build.c to facility coverage testing. (CVS 6630) (check-in: [6fe3750a30] user: drh branch: trunk, size: 21865)
2009-04-16
16:30
[8ab5824bde] part of check-in [6a91ab08a5] Changes to alter.c to enable full branch coverage testing. (CVS 6513) (check-in: [6a91ab08a5] user: drh branch: trunk, size: 20972)
2009-04-15
13:39
[cf3d0583b0] part of check-in [c0bba77ae6] Mark an branch in alter.c as always false. Only run the assert() on the sqlite3_aggregate_count() function in func.c if the SQLITE_OMIT_DEPRECATED compile-time option is off. (CVS 6508) (check-in: [c0bba77ae6] user: drh branch: trunk, size: 20965)
2009-03-24
15:08
[472c0a4733] part of check-in [ea74d8dc62] Changes to insure that lookaside memory allocations are never used to hold schema content. Ticket #3743. (CVS 6377) (check-in: [ea74d8dc62] user: drh branch: trunk, size: 20956)
2009-02-28
10:47
[b95815ccc9] part of check-in [3befe1ef7e] Instead of linking temporary triggers on non-temporary tables into the Table.pTrigger list, search the temp schema for them on demand. Fix for #3688. (CVS 6329) (check-in: [3befe1ef7e] user: danielk1977 branch: trunk, size: 20952)
2009-02-13
03:43
[f93d13aae6] part of check-in [dd179ff298] Correctly handle attempts to add a UNIQUE or PRIMARY KEY column using the ALTER TABLE statement. Ticket #3651. (CVS 6291) (check-in: [dd179ff298] user: drh branch: trunk, size: 20910)
2009-01-20
16:53
[0ec29744c3] part of check-in [1041abd678] When not compiling for an EBCDIC system, use built-in alternatives to the tolowe r(), toupper() and other ctype.h library functions. Ticket #3597. (CVS 6196) (check-in: [1041abd678] user: danielk1977 branch: trunk, size: 20590)
2008-12-10
19:26
[7eee66a6de] part of check-in [c872d55493] Never use strlen(). Use our own internal sqlite3Strlen30() which is guaranteed to never overflow an integer. Additional explicit casts to avoid nuisance warning messages. (CVS 6007) (check-in: [c872d55493] user: drh branch: trunk, size: 20611)
2008-11-19
09:05
[0a00c18405] part of check-in [88134322c3] Changes to avoid "unused parameter" compiler warnings. (CVS 5921) (check-in: [88134322c3] user: danielk1977 branch: trunk, size: 20604)
2008-10-30
17:21
[a03c923647] part of check-in [0996783b1b] Fix a crash that can follow a malloc failure in sqlite3ValueFromExpr(). Ticket #3468. (CVS 5851) (check-in: [0996783b1b] user: danielk1977 branch: trunk, size: 20539)
2008-08-08
14:19
[f462b637ba] part of check-in [4cedc641ed] Disallow the ON CONFLICT clause on CHECK constraints. The syntax used to be allowed but never worked, so this should not present compatibility problems. Other internal grammar simplifications. (CVS 5546) (check-in: [4cedc641ed] user: drh branch: trunk, size: 20511)
2008-07-28
19:34
[2c541aaa88] part of check-in [e48f9697e9] Implement the "lookaside" memory allocation cache. Use of this cache makes the speed1.test script run about 15% faster. Added new interfaces to control the cache. (CVS 5488) (check-in: [e48f9697e9] user: drh branch: trunk, size: 20532)
2008-07-15
14:47
[73ec449c29] part of check-in [c942a38e9a] Continuing work on improved test coverage. (CVS 5415) (check-in: [c942a38e9a] user: drh branch: trunk, size: 20483)
2008-07-07
12:44
[c74accc33d] part of check-in [3e558acd5e] Fix a comment in alter.c. No changes to code. (CVS 5347) (check-in: [3e558acd5e] user: drh branch: trunk, size: 20677)
2008-05-09
14:17
[cc38b9e2a8] part of check-in [ab18b4e759] Fix the ALTER TABLE RENAME algorithm so that it is not confused by comments in the CREATE TABLE statement. Ticket #3102. (CVS 5110) (check-in: [ab18b4e759] user: drh branch: trunk, size: 20700)
2008-03-19
21:45
[b42d782906] part of check-in [54c55cae55] Add a new interface, sqlite3_context_db_handle(), that returns the database connection pointer for an application-defined function. (CVS 4889) (check-in: [54c55cae55] user: drh branch: trunk, size: 20670)
2008-02-09
14:30
[b494a50f23] part of check-in [607247c27b] ALTER TABLE uses double-quotes for quoting table names. (CVS 4781) (check-in: [607247c27b] user: drh branch: trunk, size: 20663)
2008-01-25
15:04
[8a34c90081] part of check-in [50815a82e0] Error messages says "no such view" instead of "no such table" when trying to DROP a VIEW that does not exist. (CVS 4750) (check-in: [50815a82e0] user: drh branch: trunk, size: 20647)
2008-01-17
16:22
[2a101cb062] part of check-in [706b41b70b] Registerification of the VDBE is complete. The operand stack has been removed from the code. All instructions operate out of registers only. (CVS 4718) (check-in: [706b41b70b] user: drh branch: trunk, size: 20641)
2008-01-04
22:01
[5a54f58d94] part of check-in [fe057a88d0] Implement the out2-prerelease opcode design pattern. (CVS 4681) (check-in: [fe057a88d0] user: drh branch: trunk, size: 20639)
11:01
[b59c881008] part of check-in [8bb9f970dd] Add OP_MemSet, for setting a memory cell to a string value. (CVS 4674) (check-in: [8bb9f970dd] user: danielk1977 branch: trunk, size: 20777)
2008-01-03
18:39
[f95b19dab6] part of check-in [253ed40aa3] Modify VFilter and VRename to use registers instead of the vdbe stack for inputs. (CVS 4670) (check-in: [253ed40aa3] user: danielk1977 branch: trunk, size: 20668)
00:01
[b58ed3becc] part of check-in [027875e4d4] Refactoring the VM. The P3 parameter is changed to P4. A P5 parameter is added (though not currently used.) Add routines sqlite3VdbeAddOpX() where X is one of 0, 1, 2, 3, or 4. (CVS 4660) (check-in: [027875e4d4] user: drh branch: trunk, size: 20611)
2007-12-13
21:54
[23d18ec53e] part of check-in [4e91a267fe] Change all instances of "it's" in comments to either "its" or "it is", as appropriate, in case the comments are ever again read by a pedantic grammarian. Ticket #2840. (CVS 4629) (check-in: [4e91a267fe] user: drh branch: trunk, size: 20576)
08:15
[451da14ff9] part of check-in [19d56d997f] Return an error if the user attempts to rename a view. Related to (but not a fix for) #2831. (CVS 4623) (check-in: [19d56d997f] user: danielk1977 branch: trunk, size: 20586)
2007-10-20
20:58
[8512ed319a] part of check-in [82b08a3dc2] Use the 2-argument version of substr() in the SQL contained in the VACUUM and ALTER TABLE commands. Ticket #2737. (CVS 4499) (check-in: [82b08a3dc2] user: drh branch: trunk, size: 20418)
2007-08-29
14:06
[c9f30b4d6f] part of check-in [c790c234c3] Use the DbMalloc() and DbRealloc() functions more consistently. (CVS 4323) (check-in: [c790c234c3] user: danielk1977 branch: trunk, size: 20441)
04:00
[977eeee31a] part of check-in [e8060f85e7] Better asserts(). But now some of the tests are busted again. (CVS 4320) (check-in: [e8060f85e7] user: drh branch: trunk, size: 20427)
2007-08-25
13:09
[fd78c60054] part of check-in [e5ec170717] Fix bugs in the altermalloc.test and incrblob_err.test scripts. (CVS 4295) (check-in: [e5ec170717] user: danielk1977 branch: trunk, size: 20239)
2007-08-16
10:09
[f0aac0060a] part of check-in [77b1671351] More work on refactoring of malloc() interfaces. There are still many errors. (CVS 4233) (check-in: [77b1671351] user: danielk1977 branch: trunk, size: 20236)
04:30
[27b0c0d371] part of check-in [deb7ecd65f] Half-way through a major refactoring of the memory allocation. I have not even attempted to compile so I am certain there are countless errors. (CVS 4231) (check-in: [deb7ecd65f] user: drh branch: trunk, size: 20067)
2007-06-27
17:09
[24c81ed673] part of check-in [57840eba6a] Test error handling when renaming fts2 tables. (CVS 4144) (check-in: [57840eba6a] user: danielk1977 branch: trunk, size: 19961)
15:53
[3402b657de] part of check-in [37d1f9f37e] Allow ALTER TABLE on virtual tables. (CVS 4142) (check-in: [37d1f9f37e] user: danielk1977 branch: trunk, size: 19880)
2007-05-15
14:34
[1b1deeb974] part of check-in [262a3e6339] Relax the restriction on using bytes 0x80 through 0xbf as the first character of an identifier. Enhancements to ALTER TABLE tests for tables with strange names or stange column names. (CVS 4008) (check-in: [262a3e6339] user: drh branch: trunk, size: 19226)
03:56
[357378a0c0] part of check-in [9ff382f458] Fix problems in ALTER TABLE that occur when column or table names are invalid UTF encodings. (CVS 4000) (check-in: [9ff382f458] user: drh branch: trunk, size: 19316)
2007-05-08
12:37
[ca8fc4a3c7] part of check-in [c2f90b465e] Do not crash in the internal functions sqlite_rename_table() or sqlite_rename_trigger() if they are somehow passed unexpected input. (CVS 3944) (check-in: [c2f90b465e] user: danielk1977 branch: trunk, size: 18984)
2006-09-08
12:27
[2c79ec40f6] part of check-in [c81eaa0dc9] Bug fix in date/time computations. Ticket #1964. Some unrelated comment typos are also fixed and got accidently checked in at the same time. (CVS 3396) (check-in: [c81eaa0dc9] user: drh branch: trunk, size: 18731)
2006-06-21
12:36
[eba661e77b] part of check-in [6c3e8852ff] Add tests to make sure altering or adding an index to a virtual table is prohibited. (CVS 3280) (check-in: [6c3e8852ff] user: danielk1977 branch: trunk, size: 18753)
2006-02-09
02:56
[451b34fc4e] part of check-in [baef2f66be] Correctly handle COLLATE clauses in tables being modified by an ALTER TABLE ADD COLUMN command. Ticket #1665. (CVS 3060) (check-in: [baef2f66be] user: drh branch: trunk, size: 18414)
2006-01-31
14:28
[faf98b0405] part of check-in [461f586973] Authorization callback on the ALTER TABLE ADD COLUMN command. Ticket #1479. (CVS 3043) (check-in: [461f586973] user: drh branch: trunk, size: 18393)
2006-01-18
16:51
[90b779cf00] part of check-in [ac090f2ab3] Use a global variable protected by a mutex instead of thread-specific-data to record malloc() failures. (CVS 2972) (check-in: [ac090f2ab3] user: danielk1977 branch: trunk, size: 18225)
2006-01-17
13:21
[f1b66e9a6d] part of check-in [0505405fb9] Various fixes that allow the malloc() failure tests to pass again. (CVS 2963) (check-in: [0505405fb9] user: danielk1977 branch: trunk, size: 18265)
2006-01-11
21:41
[4139c8f1d0] part of check-in [5d9c6aa964] Automatically deallocate thread-specific data when it is no longer being used. Ticket #1601. Also implemented the suggestion of ticket #1603. Memory management is now off by default at compile-time. The sqlite3_enable_memory_management() API has been removed. (CVS 2919) (check-in: [5d9c6aa964] user: drh branch: trunk, size: 18263)
2006-01-09
06:29
[d0dd079b9e] part of check-in [82b81f69c7] Rename DbSchema to "Schema" and SqliteTsd to "ThreadData". (CVS 2893) (check-in: [82b81f69c7] user: danielk1977 branch: trunk, size: 18255)
2006-01-05
11:34
[e9deb3f4fd] part of check-in [deeda0dc06] Add the shared schema/pager modifications. Very few tests so far. (CVS 2859) (check-in: [deeda0dc06] user: danielk1977 branch: trunk, size: 18243)
2005-12-21
14:43
[5905a33723] part of check-in [7064433e5b] Basic functionality for descending indices is in place. Lots more testing needed. (CVS 2840) (check-in: [7064433e5b] user: drh branch: trunk, size: 17543)
2005-12-16
01:06
[7bc737c689] part of check-in [cd110aa225] Initial infrastructure for recognizing DESC indices and being able to read and write older databases that specify DESC indices but do not really use them. Nothing is close to working yet. (CVS 2822) (check-in: [cd110aa225] user: drh branch: trunk, size: 18100)
2005-12-09
20:02
[26e590618f] part of check-in [83a5915155] Clean up annoying (and pointless) compiler warnings about differing signedness. (CVS 2810) (check-in: [83a5915155] user: drh branch: trunk, size: 17887)
2005-12-06
12:52
[7ed4b794c2] part of check-in [e1606658f1] Some elements of the new malloc() failure handling. Not all cases work properly yet. Also, library is not threadsafe if malloc() fails right now. (CVS 2800) (check-in: [e1606658f1] user: danielk1977 branch: trunk, size: 17870)
2005-10-20
07:28
[149e871e1a] part of check-in [e261b8b09a] Changes to prevent various compiler warnings. (CVS 2750) (check-in: [e261b8b09a] user: drh branch: trunk, size: 17851)
2005-08-19
19:14
[26d755f214] part of check-in [b550d04d43] Increase test coverage of alter.c to 100%. Fix bugs found in the process. (CVS 2603) (check-in: [b550d04d43] user: drh branch: trunk, size: 17842)
2005-06-06
21:19
[03041f2464] part of check-in [e73d25c741] Reference count Table structures so that they are not deallocated too soon. Ticket #1210. (CVS 2498) (check-in: [e73d25c741] user: drh branch: trunk, size: 17709)
2005-03-28
00:07
[9570af388b] part of check-in [ccb9f4022b] Use SQL function substr() correctly from ALTER TABLE code. Ticket #1182. (CVS 2420) (check-in: [ccb9f4022b] user: danielk1977 branch: trunk, size: 17699)
2005-03-27
01:56
[f0b637b850] part of check-in [3c86e63389] Correctly allocate new columns array in ALTER TABLE .. ADD COLUMN. Ticket #1183. (CVS 2419) (check-in: [3c86e63389] user: danielk1977 branch: trunk, size: 17699)
2005-03-19
14:45
[8ee27ba2d0] part of check-in [90a00e9066] Preparations for the release of version 3.2.0. (CVS 2400) (check-in: [90a00e9066] user: drh branch: trunk, size: 17589)
2005-03-17
05:03
[85a23fc9a5] part of check-in [94185dd4f7] Add the ALTER TABLE ... ADD COLUMN command. (CVS 2393) (check-in: [94185dd4f7] user: danielk1977 branch: trunk, size: 17596)
2005-02-15
21:36
[6dab3d91aa] part of check-in [dbd11a0c58] Move the special built-in SQL functions used by ALTER TABLE out of func.c and into alter.c. (CVS 2343) (check-in: [dbd11a0c58] user: drh branch: trunk, size: 10740)
20:47
Added: [4e38440d44] part of check-in [90d6573c26] Split the logic for the ALTER TABLE command off into a separate source code file. (CVS 2342) (check-in: [90d6573c26] user: drh branch: trunk, size: 6021)