aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
Commit message (Collapse)AuthorAge
...
* Fix non-build for a test configurationlarrybr2021-09-15
| | | FossilOrigin-Name: c9a4ab059050a83d811149ff196ff16ea9e4c301627482800982b87cd30ddbbc
* Back out the change that allows typeless columns in strict tables. Replacedrh2021-08-23
| | | | | | that capability with an ANY type for strict tables that will accept any datatype with BLOB affinity. FossilOrigin-Name: d8fd1a2bfd51848ea612142d23475b268b3f5269e558f2e09713d1ac18b18274
* Enhance PRAGMA integrity_check so that it verifies the datatype ofdrh2021-08-19
| | | | | all columns in STRICT tables. FossilOrigin-Name: 97c9248b3b81facce569bfa3fb405d44a1d1041e87132e8f649458c95620ccb2
* Trying to insert an incorrect datatype into a STRICT table raises andrh2021-08-18
| | | | | | SQLITE_CONSTRAINT_DATATYPE error. Seems to work, though lots more testing is needed. FossilOrigin-Name: a19305e5cfedf5c472200d6e05c1396443e348f052a40a0979f860f2ff06851d
* What would it be like if you could add the keyword "STRICT" after a CREATEdrh2021-08-18
| | | | | | | | TABLE statement to cause the table to (1) allow only a few well-defined datatypes, (2) rigidly enforce those types, (3) require NOT NULL on PK columns, (4) always enforce foreign key constraint, and so forth? This branch seeks to explore that question. FossilOrigin-Name: 78732b9f98936693ae29c85a692c35a84c7d065aec79903af34b08d18f10a5e6
* Rename the Column.eType field to Column.eCType - with an extra "C".drh2021-08-18
| | | FossilOrigin-Name: b9b0dcd5af072c22f2ce71cf9584b5b572fbcfbce6410a7d703b586adb8938ba
* Further improvements to the eOpenState bit values.mistachkin2021-08-09
| | | FossilOrigin-Name: d44f74f14a387960ce105913526b572f4a3d1935351c6aab10cee85946488a9e
* Improved Hamming bit-distance between the SQLITE_STATE constants.drh2021-08-09
| | | FossilOrigin-Name: 5100b0456bc91f11e4a0bcf0d426ae4d8328cd9341ee2f9c83d0fa9f73047a83
* Fix comments associated with sqlite3.eOpenState. No logic changes.drh2021-08-09
| | | FossilOrigin-Name: fd8f498f5d5f7fcb78dd8f6f9323d20b9e2904b249ec735477a0f03cb47b8561
* Refactor sqlite3.magic into sqlite3.eOpenState.drh2021-08-07
| | | FossilOrigin-Name: e5d6512aa1fa0016a679c6e0cb665a0c67ad16f1daa0c18a96b2ebae1beefd15
* Fix harmless compiler warnings. Omit redundant copies of os_common.h anddrh2021-08-06
| | | | | hwtime.h from the amalgamation. FossilOrigin-Name: 091427007818537bb2f860c42dad867cb19050899186d4d180d195a1c6a98798
* 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
* 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
* Recognize certain standard datatypes ("INT", "INTEGER", "REAL", "TEXT", anddrh2021-07-30
| | | | | | "BLOB") and if a column has one of those datatypes, store the type part of the bit-field information in the Column structure to save space. FossilOrigin-Name: d2da62a9df63036b02dadca3798de9e623c2680b3ef0c37d2b18bb88693afd7f
* Avoid clownfeet in the names columns when the column names are quoteddrh2021-07-30
| | | | | in the original CREATE TABLE statement. FossilOrigin-Name: 980f7292afd45a8e73272e2139b55b99ab86167febec9fd0bf0356e8167b2ee9
* Complete warning-free build on old PPC iBook.drh2021-07-29
| | | FossilOrigin-Name: ef2a0850394b1c6c1fc84b26694a3712ae1e50d52bb78fea2ec40148a7d833de
* Try to omit the ORDER BY clause in subqueries if doing so does not changedrh2021-07-16
|\ | | | | | | | | | | | | the result in any way. See [forum:/forumpost/2d76f2bcf65d256a|Forum post 2d76f2bcf65d256a] for details and history. FossilOrigin-Name: 85ddaf1b59a19cbd9efe7724a163b30c14bafabfaf2cfced07b463e76f73e494
| * Minor comment improvements.drh2021-07-16
| | | | | | FossilOrigin-Name: 6854b5919beefa43da21ba739e82d583183c8cdfe5dd63e27a810ac1ffe2330b
| * Attempt to omit ORDER BY clauses from FROM-clause subqueries if those ORDER BYdrh2021-07-15
|/ | | | | | | | | clauses do not affect the output. See [forum:/forumpost/2d76f2bcf65d256a|forum thread 2d76f2bcf65d256a] for discussion. This can help the query flattener in some cases, resulting in faster query plans. The current implemention does not always work. FossilOrigin-Name: ef97c3e7c3ea2cf1a4db6591328fe7ce3f1d189afc2d578159135824ec89e620
* Rename optional SQLITE_CUSTOM_INC define to SQLITE_CUSTOM_INCLUDE.mistachkin2021-07-08
| | | FossilOrigin-Name: 060aec37accae858ced5b081a2ff76dccdd8f8bcefc63d1fe2e7478257c69e76
* Allow library build to #include a user-specified header.larrybr2021-07-08
| | | FossilOrigin-Name: 71e6490bbe59939cd15f0094e507dd8a2e167fdd8de675c3ebfeaf528a01f87a
* Improve the error message in cases where there is a row-value on the LHS of ↵dan2021-07-07
| | | | | an IN() operator, the RHS is a list (not a sub-select) and at least one element of the list is not a row-value with the correct number of elements. FossilOrigin-Name: 6b22f4e71dbc14c887ebbda67095b5faaa8079cac87cd4ab5a2ae90c71cd9633
* Handle "<vector> IN (<vector>, <vector> ...)" in the same way as "<vector> ↵dan2021-07-06
| | | | | IN (VALUES(<vector>, <vector>, ...)". FossilOrigin-Name: 981d230ece98ce89502dab02aa44f73699a9d0e4fce3e9e9dfd47444a5a9990f
* Add the ATOMIC_INTRINSICS compile-time output output. Move sqlite3Int.hdrh2021-07-05
| | | | | | in front of ctime.c so that default values that are not overridden are shown in PRAGMA compile-time option output. FossilOrigin-Name: e306952690bfb140e2c404a74b05ff2d070c487f7e52c62d62a004505fba0e15
* Revert [5204c2c4a7b73a64], restoring the old pre-processor logic for ↵dan2021-07-05
| | | | | determining the availability of the __atomic_store_n()/__atomic_load_n() primitives. FossilOrigin-Name: e690abb9e4e189c41182ac813115d55d811135013f5ce94ec0c45a547597f8ad
* Allow sub-queries in the FROM clause of an UPDATE...FROM statement to access ↵dan2021-07-05
| | | | | the object being updated without using an alias, as is required in the parent query. FossilOrigin-Name: 740cb43025449b7d7b47a97ad00885e54b7701cbcb14f4a50c7523022e3936d5
* Ensure that TK_SELECT_COLUMN Expr nodes always have their iTable field set todrh2021-07-05
| | | | | | to the number of columns in the vector. This is not strictly necessary. It just simplifies the state description and make the code easier to reason about. FossilOrigin-Name: 026f08d4cff19a95e0f38f2ef431cacd65c7c77ed92e30d7f2ded84651f47150
* Add the sqlite3_changes64() and sqlite3_total_changes64() API functions.dan2021-06-22
| | | FossilOrigin-Name: 48fdec22c966003f5577e0bf52906ef90df11e4e395723a646304e67ed976f37
* 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
* 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
* Revamp SQLITE_TESTCTRL_TUNE to provide visibility of current turningdrh2021-06-04
| | | | | parameter values. FossilOrigin-Name: 677e645e69e1f06487c26da6671fc03f0fb89a0f8e0d35712e6bdcf7279bdfc4
* Add support for SQLITE_TESTCTRL_TUNE and the ".testctrl tune ID VALUE" commanddrh2021-06-04
| | | | | in the CLI. FossilOrigin-Name: f1199d58b9cfdcddb83bc35544ce38299ac4ed50d7ab90d33463f6ccce526feb
* Add an optimization control bit to disable the OP_SeekScan optimization.drh2021-06-02
| | | FossilOrigin-Name: f674c41e5cbbb08ffc3cc00ab449229b672054c872e209337f12e7eacb531fe5
* Ensure that objects within view definitions are not incorrectly resolved to ↵dan2021-05-20
| | | | | CTEs that are part of the statement using the view. FossilOrigin-Name: f7dcc4b5197c6413be31384b390bb98a737d3f9edb7964433448c3b90b35a436
* Replace [0f0959c6f95046e8] with a new and better solution that also fixes thedrh2021-05-20
| | | | | | | CTE name resolution problem described in [forum:/forumpost/8590e3f6dc|forum post 8590e3f6dc]. Test cases for both problems added. FossilOrigin-Name: 5614279daff5007d6e047c5c1b3cc82ba80a5c91c529525b0fe68b79ee82dd2c
* Improved column name and column type determination for the RETURNING clause.drh2021-05-19
| | | FossilOrigin-Name: 699c33990a9438f28673ecf34f1e521d1af0b01c6ee30a608c0c91d2d593590e
* Fix problems with refering to CTEs from within sub-selects in PARTITION BY ↵dan2021-05-17
| | | | | or ORDER BY clauses of window frame definitions. Also a problem with renaming a column when the schema contains a trigger containing a correlated sub-select within a window frames PARTITION BY or ORDER BY clause. FossilOrigin-Name: 4c6cd54a8db78e5535912e76856bed4f797261aaca4248c69d2e2452194de297
* Enable the sqlite3_serialize() and sqlite3_deserialize() interfaces bydrh2021-05-08
| | | | | | default. Omit the SQLITE_ENABLE_DESERIALIZE option and replace it with the SQLITE_OMIT_DESERIALIZE option. FossilOrigin-Name: 6df3b03e00b1143be8fed3a39a58ce81063020275aa1ac13d87c84f1ceda6e27
* Back out the EXISTS-to-IN optimization. It slows things down rather thandrh2021-05-04
| | | | | | | | speeds them up depending on the query. And (see [forum:/forumpost/8692d94725|forum post 8692d94725]) it sometimes results in an incorrect answer. We may come back and revisit this optimization later, but for now it seems best just to disable it. FossilOrigin-Name: 16252d73fa73569fd7506676f6ffbbcd43addfb105384fb74449d30ca720904a
* Raise an error on an attempt to rename an eponymous virtual table.drh2021-04-22
| | | FossilOrigin-Name: c7909e8e0d0577c6109f13c0b14fb565239aae8af8963d659f363e124f3437fc
* An improvement to check-in [1a341378ab24a509] that omits the newdrh2021-04-19
| | | | | | Walker.bWalkWinDefn boolean (which is not always initialized) and uses a special value for xSelectCallback2 instead. FossilOrigin-Name: bef2238de9550de84d4cd1c970a542b43db288d73d09a3c3ced7f98bb3188fd3
* Ensure that variables are not used in the WINDOW clause of a query insidedrh2021-04-17
| | | | | of a trigger. dbsqlfuzz d9cf66100064952b66951845dfab41de1c124611 FossilOrigin-Name: 1a341378ab24a5091e6cf03b9e957d11b2bfe5c711835e8c583785f8fa0125d3
* Fix a segfault that could occur if the ORDER BY clause of a compound SELECT ↵dan2021-04-12
| | | | | contains a sub-select that uses one or more window functions. FossilOrigin-Name: 5ba15ebb34c3af85ef6c54bbb3acb57176d629cda83774881b2a6467e138e904
* Refactor NameContext.nErr into nNcErr to avoid confusion with Parse.nErr.drh2021-04-10
| | | | | | | Do not abandon sqlite3ResolveExprList() on nNcErr if nErr is still zero as we might have hit a problem with ORDER BY resolution that should be a suppressed error. dbsqlfuzz 41b9dad40919d3549ca7e52d893da81a6dded4ad FossilOrigin-Name: 7d674970741bd9b228b818c701c1ae010b90cc287a4c60a872f18b66353d164d
* Fix a crash in handling queries of the form "SELECT aggregate(DISTINCT ↵dan2021-04-03
| | | | | tbl.col) FROM ... LEFT JOIN tbl ...". Fixes a problem introduced by [ef4ac0ddd297bbd3]. FossilOrigin-Name: 0dcf808ddf23da834da724d88b1715ed06565f1f1290713ff42a3fcf6ffb802e
* Defer deletion of expressions that are optimized out by the AND optimizerdrh2021-03-31
| | | | | | | | | in the sqlite3ExprAnd() routine until the corresponding Parse object is deleted. This avoids a dangling pointer in AggInfo if sqlite3ExprAnd() is invoked by the push-down optimization. The dangling pointer appears to be harmless in release builds, only showing up in debug builds. Problem found by dbsqlfuzz. FossilOrigin-Name: c36b43589abd9f62a709bdb47b8748e0c1e8743487a3d83d1eb35eb06b65d763
* Omit the SQLITE_STOREP2 and SQLITE_KEEPNULL options from the comparisondrh2021-03-29
| | | | | | | opcodes, allowing them to run faster. This required refactoring the vector comparison logic, which in turn required changing OP_ElseNotEq into OP_ElseEq. FossilOrigin-Name: 380b46054b6a9b67e57357815e8e94057253fa3cce838ae76e5d5031c6bd26b2