aboutsummaryrefslogtreecommitdiff
path: root/src/alter.c
Commit message (Collapse)AuthorAge
* Always ignore comments in the schema of a database, even ifdrh2025-03-05
| | | | | SQLITE_DBCONFIG_ENABLE_COMMENTS is turned off. FossilOrigin-Name: 373ae3f4de526c636c35db03d6b5c84526d6f144c1c3bebcbb257e52f563a203
* Tamp down various harmless compiler warnings. Use "int" in places insteaddrh2025-02-22
| | | | | | of "u16" or "i16" since the compiler complains less and generates faster code. FossilOrigin-Name: 742827f049768c4f69ccdfaadfad339aaad3bc126d3a68b90cfea01d825bf7ce
* Fix an incorrect assert added by [d7729dbbf231d57c].drh2025-02-22
| | | FossilOrigin-Name: eeea11278bdebe336f0c30fbad79e30e3456ab67dae46abdd5f9951ea1b61bed
* Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would needdrh2025-02-21
| | | | | | to use more than SQLITE_LIMIT_COLUMN columns and raise an error. Also include some unrelated compiler warning fixes. FossilOrigin-Name: d7729dbbf231d57cbcaaa5004d0a9c4957f112dd6520052995b232aa521c0ca3
* Use the sqlite3ColumnIndex() routine to look up a column in a table, ratherdrh2025-02-08
| | | | | | than using a custom loop. Performance improvement, size reduction, and complexity decrease. FossilOrigin-Name: 351dbbc2bf0b23efdc625ddaa5dc2239cf2990addf071a04bd41612b341de8c8
* Refactor the SrcItem object so that information about subqueries is storeddrh2024-08-19
| | | | | | | | | 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. FossilOrigin-Name: 8ff5dda8448d7e1a533d7f27db2573ce68fa9956b9d9847ced45e83c1f06bab0
* Give unique names to fields in the SrcItem object, to facilitate analysis ofdrh2024-08-17
| | | | | how those fields are used using "grep". FossilOrigin-Name: 9f5aeef3cbc2c95267c8f7bf60d5c66971a76789669fb0e8f853273ff6f616f2
* Fix another instance where ALTER TABLE was returning SQLITE_INTERNAL insteaddrh2024-08-09
| | | | | of SQLITE_ERROR one malformed input. FossilOrigin-Name: b416756320dfb46ad72b843a7fbf18807d3fd1966251c320de626280b5238a5c
* Avoid expanding integer values in columns with real affinity to the full ↵dan2024-03-26
| | | | | 8-byte representation when editing records as part of a DROP COLUMN command. FossilOrigin-Name: a49296de0061931badaf3db6b965131a78b1c6c21b1eeb62815ea7adf767d0b3
* Do not allow an ALTER TABLE ADD COLUMN on a STRICT table if the added columndrh2023-10-14
| | | | | contains a DEFAULT clause that would violate the type of the added column. FossilOrigin-Name: 75b075863eaa56e36635a1d27740d37de8600ba92099b3fad9378a1e6ce12c0e
* Address various harmless compiler warnings fromdrh2023-06-16
| | | | | [forum:/forumpost/d526da8ee4|forum post d526da8ee4]. FossilOrigin-Name: 365caf2f97e8f15842f52536e8d05d359e9d6e863182e020ce14a9a9f27ee057
* Add a C-source spell-checking facility. make misspell (on Nix)larrybr2023-06-07
| | | FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
* Fix an obscure issue with ALTER TABLE RENAME that comes up with triggersdrh2023-04-13
| | | | | | that have UPDATE statements that contain errors. [forum:/forumpost/ff3840145a|Forum post ff3840145a]. FossilOrigin-Name: c4845a7c5f7f219848d3ee32eef0f9c69ad6dc6e8509da84d612f41e1e05f007
* Additional fixes for yet more completely harmless compiler warnings.drh2022-12-23
| | | FossilOrigin-Name: 7d3772f0bd0e2602fe919573b49001da4e2b9f3874cb0183dea675204afa7abd
* Minor simplification to ALTER TABLE logic.drh2022-05-27
| | | FossilOrigin-Name: 01beb0365c529481605f1864b1b6760e2484fad08d56a72e00e34acff37e23f8
* Fix another problem with ALTER TABLE and UPDATE...FROM in triggers.dan2022-05-27
| | | FossilOrigin-Name: 33cf12235e6469ba17cfb72cef0e480dfd0dea81ed412fb1fb24b05dbeb8dc02
* Fix further issues with ALTER TABLE and triggers that contain UPDATE..FROM ↵dan2022-05-27
| | | | | statements. FossilOrigin-Name: 53fbc269ddbabc4a97d297e881e5f9cd2bfbcd24af4af1b7cf9db412a3a51813
* Omit an unnecessary branch.drh2022-05-27
| | | FossilOrigin-Name: f56473f9cc1b476b3219fe5b70ba2e4b269b20c880b99ba34c744ed893042081
* Fix issues with ALTER TABLE and triggers containing "UPDATE...FROM" statements.dan2022-05-26
| | | FossilOrigin-Name: 2fba0d41b781d226915fa2bf888a7bc640c046ce22670ceb53f62a09f3975259
* Organize the various flag bits of the ExprList_item object into a substructuredrh2022-05-02
| | | | | so that the whole lot can be copied all at once. Faster and smaller code. FossilOrigin-Name: 5341d4bbe9a943f9cdbbdea829e18f108e98972ebb706396c50fc62fcc6a6328
* Improved technique for parsing the ON and USING clauses of a join is fasterdrh2022-04-07
| | | | | and uses less memory. FossilOrigin-Name: 158156a3e3d50042cafc75dea3aaaa68b1f2efb9c3d178518ea6e68e32e0d21c
* Stronger defenses against corrupt schemas in the ALTER TABLE logic.drh2022-03-10
| | | FossilOrigin-Name: 13fbde28173332522a7ad307c1aad2b83c9aa1fe737583afa2b29f6da4de6370
* Provide sqlite3_error_offset() data for some new errors.drh2022-02-08
| | | FossilOrigin-Name: 1269206db810460e55a52e178ba3332add42a11f66c5f292f8f0d29ccd61a4b8
* With the new ALTER TABLE under PRAGMA writable_schema=ON processing, do notdrh2022-02-06
| | | | | ignore non-parser errors such as OOMs. FossilOrigin-Name: 36653ccef68cf61b6001000a713b06e951cb6fddced6b6a906c3b17d70a8af87
* Fix a NULL pointer dereference that can occur after OOM. Problemdrh2022-02-05
| | | | | introduced by check-in [197cbabf1767d060]. FossilOrigin-Name: d4e6b9f0f7567b76760a667a701bca4d6158ade39f9a69d205b583c5a1c0c7f4
* One more case of disabling errors for ALTER TABLE RENAME whendrh2022-02-04
| | | | | writable_schema=ON. FossilOrigin-Name: c52d0dd8f4f8fab4c3f33cbd26b4012569e76562282e85654018c836dca7b564
* Allow ALTER TABLE RENAME COLUMN to proceed even if there are errors indrh2022-02-04
| | | | | the schema, as long as PRAGMA writable_schema=ON is active. FossilOrigin-Name: 197cbabf1767d0603928462fb75cf8100f6999f725e0db60d096c7ca20e3da28
* Remove many redundant checks for sqlite3.mallocFailed now that any OOM shoulddrh2022-01-24
| | | | | cause Parse.nErr to be non-zero. FossilOrigin-Name: 1f7fa46126ea33ed30e93186aff3df51068aeb4be6f79a102bfe8c4e44941d71
* Make it so that any Parse object is always linked into the database conenctiondrh2022-01-24
| | | | | while it is active. Hence, an OOM will cause Parse.nErr to be set. FossilOrigin-Name: 6a45d8fe8bfbc11a5b86d25237e1f8bccfb0f22f3dcaf004ba797aeb57b365ec
* Fix ALTER TABLE DROP COLUMN so that it invokes the authorizer. Fix fordrh2022-01-18
| | | | | [forum:/forumpost/fd82b85947541dec|forum post fd82b85947541dec]. FossilOrigin-Name: aca6c61d79215519fb006af19d9011029df68f195a4ce65aff7a1bf4e36efb94
* Fix ALTER TABLE so that it works even when compiled using -DSQLITE_DQS=0.drh2022-01-16
| | | | | [forum:/forumpost/3c1a00b66fca81fe|Forum post 3c1a00b66fca81fe]. FossilOrigin-Name: 092ad64faa4ae93b1e09ccd52159621d619e6817bcb4573331e9053d97f731fd
* Simplify the sqlite3RunParser() routine by omitting the third parameter.drh2021-12-31
| | | | | Results in a binary that is about 100 bytes smaller and 1.4M cycles faster. FossilOrigin-Name: 6fb2a1bb0280d6e31291e3fd06bbcbbb28ef5fb27d3898e2327a50ac738ae1f3
* Show the preferred schema table names in the output of "PRAGMA table_list".drh2021-11-04
| | | FossilOrigin-Name: 9147390d9885a37a62edc1058f313434627f1b59965c890877d2cb119e355c78
* Improved the error message that results when a schema parse fails afterdrh2021-11-03
| | | | | ALTER TABLE ADD COLUMN. FossilOrigin-Name: b007a39dd3a46d13fe06f2a1eeb4e3fd4cad1a77892be6d175b31db1edd6f6a8
* Ensure that ALTER TABLE RENAME recognizes OOM errors while parsingdrh2021-11-02
| | | | | | dependent triggers and handles them appropriately. dbsqlfuzz 53e245eee15d3f19639d773048aa955c30708785. FossilOrigin-Name: 1d9004cd015073853ce0ca811a68ea5411733eedee993b97a38a42ba139d7590
* Remove an incorrect assert() added 4 days ago by check-in [9e2f06b84f994277].drh2021-10-17
| | | | | Replace it with a testcase() macro. FossilOrigin-Name: 03dff7196bb00f8e32f574f65745ceafb33ee3fdd169263121342859c362eca5
* Remove a NEVER() macro in ALTER TABLE due to andrh2021-10-13
| | | | | | obscure case of a nested CTE inside an UPDATE within a trigger. dbsqlfuzz e89174cbfad2d904f06b5e24df0a22510b6a1c1e FossilOrigin-Name: 9e2f06b84f9942772c30bed2ac71b3296c9adf9661dbf8916d56996253ee8d28
* Protect access to the Expr.y union using nearby assert()s and branches.drh2021-10-07
| | | FossilOrigin-Name: 87e2f5eb436fc448427b0e24fb70f29688796b513b8c7b12f1a21540dae1e56d
* Protect every access to the Table.u union using a nearby assert() or branch.drh2021-10-07
| | | FossilOrigin-Name: 50e08338aed7ac0cee600098d2ecd4b3b7bfd31a597bb26773badf3d2e2582c8
* Add NEVER() macros on branches that are not reachable since [a0df216f7c3f8963].drh2021-09-29
| | | FossilOrigin-Name: 5d771f3554f3c98872cd0c9f12f415e685f26fcb923e3fb7f1a7a760c7a53255
* Fix a potential ALTER TABLE problem with expressions like ( (<sub-select>) ↵dan2021-09-28
| | | | | IN () ). FossilOrigin-Name: df0d7e36dbf98ab5405d8366ce92fb85176d4388b47a57b0ca1aa1ba6ae5212e
* Fix a problem in ALTER TABLE causing table or column references in ↵dan2021-09-27
| | | | | sub-selects ton the RHS of a vector SET clause in an UPDATE within a trigger (i.e. "SET (a,b) = ( (SELECT...), <expr> )"). FossilOrigin-Name: 255b0eeed113d83b474efc5bc8fc790a270bc43ee598df4b2c378e1ad2d729b7
* Add lots of new "const" on internal function parameters. There is opportunitydrh2021-09-24
| | | | | for many more - this is a work in progress. FossilOrigin-Name: a3c71a673ddd1c299bdae550fb955077b77088329a8ca2895dfb23538b524a8e
* For ALTER TABLE RENAME COLUMN, do not try to filter virtual tables out ofdrh2021-09-16
| | | | | | | | 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. FossilOrigin-Name: 7c82b43b7cdb825f431d3a778f8b34e32666ccb3b067f1f2533d3b3dcca7bdc9
* Store the collating sequence name for each column of a table as andrh2021-08-05
| | | | | | extension to the column name, for an additional savings in the heap space needed to hold the schema. FossilOrigin-Name: 832ac4c1ee384be0de72a4bdd55ed87e0f8294e7df5eefcf6b4942db3d85a69e
* Always prefer built-in SQL functions over app-defined SQL functions withindrh2021-08-04
| | | | | | sqlite3NestedParse(). Formerly this was the case for a few calls to sqlite3NestedParse(), but not for all of them. FossilOrigin-Name: 164662ef01ad45ca570c44631a1117cccce6e34b00dbba7f422c089e8ffaa932
* Refactor field names in the Column object, zCnName and zCnColl, to make themdrh2021-08-02
| | | | | unique and thus easier to find amid all the other code. FossilOrigin-Name: 8b781dcaf68e0cf12a844708c82eee00193e340195cbca915d077e4846983bf3
* Refactor the Table object to reduce its memory footprint.drh2021-08-02
| | | FossilOrigin-Name: bbb6759bcf6e01d36dfc787a82a610d359f50aaeac8104b73883a84906d54e1f
* Refactor the way that DEFAULT expressions are stored on columns, in orderdrh2021-07-31
| | | | | to save memory in the common case where the column has no DEFAULT clause. FossilOrigin-Name: 8646547e54211d44c415663c33775c4268550f8332949c4731a4bb6ec9cc663a
* 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