aboutsummaryrefslogtreecommitdiff
path: root/src/alter.c
Commit message (Collapse)AuthorAge
...
* Fix ALTER TABLE DROP COLUMN so that it generates valid bytecode even whendrh2021-07-22
| | | | | | operating on a corrupt database and using PRAGMA writable_schema=ON. dbsqlfuzz 5f09e7bcc78b4954d06bf9f2400d7715f48d1fef FossilOrigin-Name: b65f4f763979ee9e0b943c787609ea22d6f7e01d41dfc1e084ec50a085a3550c
* Fix issues in the new ADD COLUMN constraint checking. Add preliminarydrh2021-07-20
| | | | | test cases. FossilOrigin-Name: 48434ad3fa9504c063d812d119bc8f622548fd02b3d478ff247b11474c4ce5db
* Demonstration code to show how NOT NULL and CHECK constraints can bedrh2021-07-20
| | | | | verified after an ALTER TABLE ADD COLUMN. FossilOrigin-Name: 039f540373b03af9e0c87499e5e0423eb093d1d343829282a5ac1de2d600b881
* Enhanced defense against integer overflow in ALTER TABLE.drh2021-06-16
| | | FossilOrigin-Name: fb7f094e4e0f03622c2e7fa02483c17671a8899c7ad8aba8659177180f406704
* Fix typos in testcase() macros from check-in [c09d90eec2a49b94].drh2021-06-14
| | | FossilOrigin-Name: d4d9869c30710914b7ba51221b2c2223a9cf16b913bd6f3866ae747494a116af
* Fix an ALTER TABLE problem with handling infinite loops of CTEs in the ↵dan2021-06-14
| | | | | database schema. FossilOrigin-Name: c09d90eec2a49b948c60971294d146db5c82438855cd3fa48ddc3d2e6b44c26c
* This is an alternative approach to the use-after-free problem fixeddrh2021-06-12
| | | | | by [193b14a58e378ab3], saved here for historical reference. FossilOrigin-Name: 6796b7a2485eca279db9d777595a886bc0d1dd7ec9551e1797e0032ef5493559
* Reapply two recent ALTER TABLE error checks that turned out to be necessarydrh2021-06-11
| | | | | after all. dbsqlfuzz fc5a9deefda00dda914748985155a6d4c44174e5. FossilOrigin-Name: 230fedd923c87741d20caf55f29e8464cc6df344536f9b89331e0a0059a926f7
* Fix a crash in new ALTER TABLE code that could follow an OOM.dan2021-06-11
| | | FossilOrigin-Name: 6f1f2a0a9cd75ca43b81cc325296b843ccefe6f8040da8f2e873f49928423f10
* Remove an unreachable branch added by the previous commit.dan2021-06-11
| | | FossilOrigin-Name: 852ee0e91ceae090157c4ab2805530f5d7985a490ce77f54d7b148f56e466f79
* Fix problems with ALTER TABLE and schemas that contain views with some ↵dan2021-06-11
| | | | | recursive CTEs, or CTEs that reference other CTEs. FossilOrigin-Name: 8b1f9a51e962cd9a5593a1ecf4da6c86e34c4f9ff96ffcea0fb421880c8836cb
* A better fix for the problem addressed by [4eb80b0cc61526c1]. This fixdrh2021-06-04
| | | | | also avoids reading uninitialized variables. FossilOrigin-Name: 1c71de43dbc68002c4a6229e7efffb019655baff67a51fe922571fe420c95835
* Remove a NEVER that is reachable following OOM in writable_schema=ON modedrh2021-05-27
| | | | | with a corrupt schema. FossilOrigin-Name: 4eb80b0cc61526c1ff7478b1b855b29fa4326daee61facd1d85e4297bb32ac9d
* Back out the NEVER() inserted by [c7309ed3c7588c7e] because it is reachabledrh2021-05-01
| | | | | after all. dbsqlfuzz bc17a306a09329bba0ecc61547077f6178bcf321 FossilOrigin-Name: 20a4f3f12cdd8823d53d91025fa41e284c9f629b1d049eb486ff8dc4a1736e1f
* Raise an error on an attempt to rename an eponymous virtual table.drh2021-04-22
| | | FossilOrigin-Name: c7909e8e0d0577c6109f13c0b14fb565239aae8af8963d659f363e124f3437fc
* Improved handling of errors in ALTER TABLE RENAME.drh2021-04-22
| | | | | dbsqlfuzz 3e3e2e076e53d02288f80af41a11143a6ddf8c88 FossilOrigin-Name: 9c7a449f52a391506ebf4a8efa4ff27e6e97bd8da4b300a5c0dd942a209fe474
* In the sqlite3SelectDup() routine, do not do an incomplete duplication duedrh2021-04-20
| | | | | | to OOM. This in turn requires several new NEVER() and ALWAYS() macros for unreachable branches. FossilOrigin-Name: a61c0e6b78bd39f55464fafd257e68effded64995a66e8fa2d686e8c507ebe43
* Ensure that all records are updated by setting the OPFLAG_SAVEPOSITION flag ↵dan2021-04-18
| | | | | when updating records as part of ALTER TABLE DROP COLUMN. FossilOrigin-Name: 354a4db5cb769c6aed386f43ee26d7e42342e92f781eef100c09751dc5b51751
* Modify the drop column code to handle WITHOUT ROWID tables for which a ↵dan2021-04-06
| | | | | single column appears more than once in the primary key. FossilOrigin-Name: e0d2507021c5a04016c442f954b542c0920678737ae7c710eb8ac50d6337db1c
* Fix a harmless compiler warning.drh2021-03-24
| | | FossilOrigin-Name: 26b005a95e4f3e378e3bc40f57321ffbab72b6fc990d13b56b3121990d325f63
* Fix a problem with renaming a column when there is a quoted string ↵dan2021-03-23
| | | | | immediately following the column name somewhere in the schema. FossilOrigin-Name: 4719fae6262aa3563f3df6aca0170c6d847bb18ab7b0e6e7609a0e7b6f0c6b1b
* Add tests for sqlite_rename_quotefix(). Fix a memory leak in the same.dan2021-03-16
| | | FossilOrigin-Name: 531550056c38589c99c9a97b6afdbf8f34ff8d2131d74e9d42af3506e8045064
* Have ALTER TABLE RENAME COLUMN and DROP COLUMN use sqlite_rename_quotefix() ↵dan2021-03-16
| | | | | to convert any double-quoted strings in the database schema to their single-quoted equivalents. FossilOrigin-Name: 6446c0961077396086251670102ea7bf17d54a6b0f0ca56c6af89028a1ff9039
* Merge trunk changes into this branch.dan2021-03-16
|\ | | | | FossilOrigin-Name: f15d51054afb1e3fec87938f2b04a5a0d0611b08248367850450de7c4166e3d1
| * Fix a problem with ALTER TABLE RENAME COLUMN when used on a schema that ↵dan2021-03-16
| | | | | | | | | | features generated columns. FossilOrigin-Name: 0e255b26872b50581d470952dd98e21dd82d081885006f58d49daa4b4576b35d
| * An alternative approach for fixing ticket [1c24a659e6d7f3a1].drh2021-03-14
| | | | | | FossilOrigin-Name: a2adae907a28e169e64cfe69d97d7b68cb94e6ba07d2dfa995e3fbc6672fafdd
* | Add internal SQL function sqlite_rename_quotefix(). For converting ↵dan2021-03-15
|/ | | | | double-quoted strings to their single-quoted counterparts in DDL statements. FossilOrigin-Name: d874b300463ce0bbb53b7e2f88c6a12893e4fd751fcc7f810077ba108f4061ef
* Fix a bad assert in RENAME COLUMN.drh2021-03-08
| | | | | dbsqlfuzz 3f0a7245b69cd08617d7d7781ebaedb0fe765a93. FossilOrigin-Name: f13e0d12f137cd6b4e83e92bd36652431d8416e6eed4797313e061f2e390d39b
* Fix a possible NULL pointer dereference when applying a DROP COLUMN to adrh2021-03-06
| | | | | corrupt database schema. dbsqlfuzz 419aa525df93db6e463772c686ac6da27b46da9e FossilOrigin-Name: 349ccf58ae4bb770805066102fc8e9e478d4da1f7a6a728223bd74eabf7b7843
* Mark the NotUsed parameter to the dropColumnFunc() function as unused,drh2021-03-04
| | | | | to avoid a harmless compiler warning. FossilOrigin-Name: 23459071091248e94202e609bb8031c3e34722b8ae8ff5a66851dcc528a2d2c2
* Rename the "struct SrcList_item" object to the more succinct "SrcItem".drh2021-02-21
| | | | | This is a symbolic change only. The logic is unmodified. FossilOrigin-Name: bfd5bf2c73110fcb36db9ba2a949ff516131fbd3e89325f88fe9f5c2b4ed87b2
* Fix another problem handling corrupt database files in the ALTER TABLE DROP ↵dan2021-02-19
| | | | | COLUMN code. FossilOrigin-Name: 9edf2ddc4799c8830c4b7b91d7aacee50029a4b9db329fd4c5674fbedea33034
* Fix a crash that could occur in ALTER TABLE DROP COLUMN if the sqlite_schema ↵dan2021-02-19
| | | | | table was corrupt. FossilOrigin-Name: 126ee1ec4f3565c0cccca98885fa3665a641ea3df251511de16eed2a1c396124
* Omit an branch made unreachable by the improved error message from droppingdrh2021-02-19
| | | | | the last column of a table. FossilOrigin-Name: c5719fc5aa04c50bb01533f1cedb73dc80c4bf5315ff6a7206c8a10504afca8b
* Give a better error message on DROP COLUMN when attempting to dropdrh2021-02-19
| | | | | the last column of a table. FossilOrigin-Name: 5e1f362bc3e53c60f9e6f771346d10c6e6a6cb3ff1eec5608101f9c5d6d2a5a4
* Add a NEVER() to an unreachable branch in the DROP COLUMN logic.drh2021-02-19
| | | FossilOrigin-Name: 963f498ae64cf7530fb7a405fa476c411ad66523f62f5eefa5a16596cd19a481
* Add missing VdbeCoverage() macros.drh2021-02-18
| | | FossilOrigin-Name: 9bb720e6590482bc9c2fbb273738808209e9651710dbee7572b0348cadf87e68
* Enhance renameParseSql() to better handle OOMs.drh2021-02-18
| | | FossilOrigin-Name: 68bcde7ab57b2d4bdcfb2f6c7134a0b01a504b2e7cdf6ee5bf0df70fb4a517b0
* Fix DROP COLUMN so that it works even if the user has registered an ↵dan2021-02-18
| | | | | authorizer callback. FossilOrigin-Name: e5f144182bbb3ba10c77151cf63c8bddf86374049fb6866387f85e335df298cb
* Fix a problem with schema error detection when processing ALTER TABLE DROP ↵dan2021-02-18
| | | | | COLUMN commands. FossilOrigin-Name: 565a6fd0c95b438fea7bf84913b38de1718117e16e0d685534a8650e1dc8421b
* Fix a problem with OOM error handling in the new code on this branch.dan2021-02-17
| | | FossilOrigin-Name: ea999c9db59e4193b306a2e1b15fc94f8f04cb05e852bb0d068b7d5243a0849b
* Fix various issues with the changes on this branch. Add test cases for the same.dan2021-02-17
| | | FossilOrigin-Name: 10538ec6fc1642dfc2ca6cef06ce6cb9e124847b421ccf01f5842064fad379ab
* Add experimental implementation of ALTER TABLE DROP COLUMN. Only some cases ↵dan2021-02-16
| | | | | work so far. FossilOrigin-Name: f0217937d7306fb595727e61e871e8b03d8c881d339a0865bfd0117d90d42e4e
* Ensure that the ALTER TABLE statements return 0 fordrh2021-02-15
| | | | | sqlite3_column_count(). FossilOrigin-Name: 29c1932a47cd46c2585ebbf937c03544a8a355014776129662789e15db9ed4de
* Change the unions of the Table.addColOffset field from characters to bytes.drh2021-01-01
| | | | | | | | 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. FossilOrigin-Name: 6f25f2529f1495a26129d7d407979906e4962b2de351f901d41cb037d05ba780
* Update the ALTER TABLE command to correctly handle UPDATE ... FROM ↵dan2020-10-31
| | | | | statements within trigger programs. FossilOrigin-Name: 3e6af890406b58da1c4aebec4d483be7ab0fdb589ef7a4c4e987d6bde18d6b97
* Improvement on the previous fix.drh2020-08-12
| | | FossilOrigin-Name: f6cffa2d50bfebe5b025f412b7a49b7fdafb798aaf1ddc80e6656ccd1f012a7f
* Fix an assertion() fault in ALTER TABLE found by OSSFuzz. Test case in TH3.drh2020-08-12
| | | FossilOrigin-Name: 41de742c5713ab1a0c0c15c44af3ffac40bbc527ae2dc11d829ba9773eb4c84a
* More harmless compiler warning fixes.drh2020-07-18
| | | FossilOrigin-Name: 4c0d208c455abb983217a6dfea7634f677f8360fb57857e1421334fe7a5a23e2
* Support UPDATE...FROM statements in trigger programs.dan2020-07-14
| | | FossilOrigin-Name: 4f6d8d0ebf40029218a1d3b05ea657c0c5953b01c6f0b6a628465aa44c67e7f3