drh
b18b3df1da
Further to the previous check-in, remove the "harmless()" macro definition as
...
it is no longer used.
FossilOrigin-Name: b8c9a54664a87ac464b413390572c3feb912e1efc9c8a78c61f1b370e2165c05
2021-10-08 18:15:50 +00:00
drh
074a131245
Minor improvements to comments in the data structure definitions. No
...
changes to code.
FossilOrigin-Name: e77ac4050cf6c24118ce2af4c075f60e3eeb2dafe6d222c848bc4e541eef7172
2021-10-08 10:25:06 +00:00
drh
dbfbb5a0c5
New assert() statements to protect the u1 and u2 unions of SrcList.
...
FossilOrigin-Name: 9b91fbcfcc14048f7d0755d47d9b7f9212fa2eaa6f3c04f417fa16c3a47943bf
2021-10-07 23:04:50 +00:00
drh
477572b9f1
Protect access to the Expr.y union using nearby assert()s and branches.
...
FossilOrigin-Name: 87e2f5eb436fc448427b0e24fb70f29688796b513b8c7b12f1a21540dae1e56d
2021-10-07 20:46:29 +00:00
drh
a4eeccdfdf
Protect all accesses to the Expr.x union using nearby assert()s and branches.
...
FossilOrigin-Name: 8eaa1d4a98b24adf245bbd2fe9212aa6a924a0f09c445906d7f87574f36a7423
2021-10-07 17:43:30 +00:00
drh
f975107437
Protect all accesses to the FuncDef.u and Expr.u unions using nearby
...
assert()s or branches.
FossilOrigin-Name: 9af863f065e0bef491c2ab7525194505f9516f4e6dfc789d2e3a9d2c2438533a
2021-10-07 13:40:29 +00:00
drh
16a8f28e49
Fix a macro typo introduced by [5da112c02f9e8d0b] that prevented coverage
...
tests from working.
FossilOrigin-Name: 566e6974892ebd3d3de8d77b24655257a5efe14434c553e1a25fc680b201b336
2021-10-06 10:36:56 +00:00
drh
11a9ad5669
Fix harmless static analyzer warnings in sessions, rtree, fts3 and fts5.
...
Add the -DSQLITE_OMIT_AUXILIARY_SAFETY_CHECKS compile-time option to cause
ALWAYS() and NEVER() macros to be omitted from the build.
FossilOrigin-Name: 1c67f957fc77e37ce8f0d447c41ca975e8e79a35d332739c24a633649b5b0387
2021-10-04 18:21:14 +00:00
drh
5bf4715e01
Add the sqlite3ResultStrAccum() internal interface to simplify the
...
the implementation of functions that return strings.
FossilOrigin-Name: e548e9299d3fd6ce5b647cf0dd93ff8e917a5eda43076c6a02389c52640e2e50
2021-10-03 00:12:43 +00:00
drh
260ff08133
Fix a problem with group_concat() when it is used as a window function with
...
a sliding window, as described by
[forum:/forumpost/f3eb24a6c0|forum thread f3eb24a6c0].
FossilOrigin-Name: f47f7f78227830c065d9ce715b8456eab81a38d680f76bf4ff08f298d84f9c7a
2021-10-01 22:48:52 +00:00
dan
37f3ac8faa
Change things so that SQLITE_OMIT_VIRTUALTABLE implies SQLITE_OMIT_ALTER_TABLE.
...
FossilOrigin-Name: 2f7c946c5f25a858167f5193ca06e53310394c8cff15426ab8a1327a1ec835fd
2021-10-01 20:39:50 +00:00
drh
f06db3e892
Fixes to the version of "varsep" group_concat so that (1) it builds under
...
separate compilation and (2) omits tabs in source code and (3) runs faster
than trunk. This variant of the group_concat_varsep branch might be preferred
over the tip because it preserves (undocumented) legacy behavior about the
position of separators relative to terms.
FossilOrigin-Name: 04399cf9645e04b171090ff8a3c27752929c10d2cd8778e26f8f3337aa902ab6
2021-10-01 00:25:06 +00:00
drh
1580d50b76
Add const to parameters on various internal interfaces.
...
FossilOrigin-Name: 70c221c5cf7b4d9ed34f16d045f262f99d16aa3db84f80cf0b03ee82ba28d075
2021-09-25 17:07:57 +00:00
drh
b6dad520e5
Add lots of new "const" on internal function parameters. There is opportunity
...
for many more - this is a work in progress.
FossilOrigin-Name: a3c71a673ddd1c299bdae550fb955077b77088329a8ca2895dfb23538b524a8e
2021-09-24 16:14:47 +00:00
drh
2a6a72a81c
Ensure that the db->init.azInit array is initialized at all times.
...
dbsqlfuzz 0ad6d441f9bf3dfc32626a9900bc1700495b16f9
FossilOrigin-Name: c7560c1329965ab57cd71393c044b110561b83641d08677bc51044df9e377882
2021-09-24 02:14:35 +00:00
larrybr
998e910346
Fix non-build for a test configuration
...
FossilOrigin-Name: c9a4ab059050a83d811149ff196ff16ea9e4c301627482800982b87cd30ddbbc
2021-09-15 14:48:02 +00:00
drh
b9fd0101bd
Back out the change that allows typeless columns in strict tables. Replace
...
that capability with an ANY type for strict tables that will accept any
datatype with BLOB affinity.
FossilOrigin-Name: d8fd1a2bfd51848ea612142d23475b268b3f5269e558f2e09713d1ac18b18274
2021-08-23 10:28:02 +00:00
drh
9e1209d111
Enhance PRAGMA integrity_check so that it verifies the datatype of
...
all columns in STRICT tables.
FossilOrigin-Name: 97c9248b3b81facce569bfa3fb405d44a1d1041e87132e8f649458c95620ccb2
2021-08-19 02:58:15 +00:00
drh
72532f52bc
Trying to insert an incorrect datatype into a STRICT table raises an
...
SQLITE_CONSTRAINT_DATATYPE error. Seems to work, though lots more testing
is needed.
FossilOrigin-Name: a19305e5cfedf5c472200d6e05c1396443e348f052a40a0979f860f2ff06851d
2021-08-18 19:22:27 +00:00
drh
44183f83d0
What would it be like if you could add the keyword "STRICT" after a CREATE
...
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
2021-08-18 13:13:58 +00:00
drh
b70f2eabb4
Rename the Column.eType field to Column.eCType - with an extra "C".
...
FossilOrigin-Name: b9b0dcd5af072c22f2ce71cf9584b5b572fbcfbce6410a7d703b586adb8938ba
2021-08-18 12:05:22 +00:00
mistachkin
bdf15bbd62
Further improvements to the eOpenState bit values.
...
FossilOrigin-Name: d44f74f14a387960ce105913526b572f4a3d1935351c6aab10cee85946488a9e
2021-08-09 18:13:38 +00:00
drh
c806917441
Improved Hamming bit-distance between the SQLITE_STATE constants.
...
FossilOrigin-Name: 5100b0456bc91f11e4a0bcf0d426ae4d8328cd9341ee2f9c83d0fa9f73047a83
2021-08-09 17:36:22 +00:00
drh
687d74dfcc
Fix comments associated with sqlite3.eOpenState. No logic changes.
...
FossilOrigin-Name: fd8f498f5d5f7fcb78dd8f6f9323d20b9e2904b249ec735477a0f03cb47b8561
2021-08-09 13:06:59 +00:00
drh
5f9de6ecf4
Refactor sqlite3.magic into sqlite3.eOpenState.
...
FossilOrigin-Name: e5d6512aa1fa0016a679c6e0cb665a0c67ad16f1daa0c18a96b2ebae1beefd15
2021-08-07 23:16:52 +00:00
drh
15482bc3f3
Fix harmless compiler warnings. Omit redundant copies of os_common.h and
...
hwtime.h from the amalgamation.
FossilOrigin-Name: 091427007818537bb2f860c42dad867cb19050899186d4d180d195a1c6a98798
2021-08-06 15:26:01 +00:00
drh
65b400931d
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.
FossilOrigin-Name: 832ac4c1ee384be0de72a4bdd55ed87e0f8294e7df5eefcf6b4942db3d85a69e
2021-08-05 15:27:19 +00:00
drh
cf9d36d1b3
Refactor field names in the Column object, zCnName and zCnColl, to make them
...
unique and thus easier to find amid all the other code.
FossilOrigin-Name: 8b781dcaf68e0cf12a844708c82eee00193e340195cbca915d077e4846983bf3
2021-08-02 18:03:43 +00:00
drh
f38524d20d
Refactor the Table object to reduce its memory footprint.
...
FossilOrigin-Name: bbb6759bcf6e01d36dfc787a82a610d359f50aaeac8104b73883a84906d54e1f
2021-08-02 16:41:57 +00:00
drh
79cf2b7120
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.
FossilOrigin-Name: 8646547e54211d44c415663c33775c4268550f8332949c4731a4bb6ec9cc663a
2021-07-31 20:30:41 +00:00
drh
c2df4d6adb
Recognize certain standard datatypes ("INT", "INTEGER", "REAL", "TEXT", and
...
"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
2021-07-30 23:30:30 +00:00
drh
77441faff5
Avoid clownfeet in the names columns when the column names are quoted
...
in the original CREATE TABLE statement.
FossilOrigin-Name: 980f7292afd45a8e73272e2139b55b99ab86167febec9fd0bf0356e8167b2ee9
2021-07-30 18:39:59 +00:00
drh
5025cb581f
Complete warning-free build on old PPC iBook.
...
FossilOrigin-Name: ef2a0850394b1c6c1fc84b26694a3712ae1e50d52bb78fea2ec40148a7d833de
2021-07-29 17:23:23 +00:00
drh
ef8344c6a5
Try to omit the ORDER BY clause in subqueries if doing so does not change
...
the result in any way. See
[forum:/forumpost/2d76f2bcf65d256a|Forum post 2d76f2bcf65d256a] for
details and history.
FossilOrigin-Name: 85ddaf1b59a19cbd9efe7724a163b30c14bafabfaf2cfced07b463e76f73e494
2021-07-16 22:43:00 +00:00
drh
ee612e2a5d
Minor comment improvements.
...
FossilOrigin-Name: 6854b5919beefa43da21ba739e82d583183c8cdfe5dd63e27a810ac1ffe2330b
2021-07-16 20:16:19 +00:00
drh
bb30123178
Attempt to omit ORDER BY clauses from FROM-clause subqueries if those ORDER BY
...
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
2021-07-15 19:29:43 +00:00
mistachkin
b523159f40
Rename optional SQLITE_CUSTOM_INC define to SQLITE_CUSTOM_INCLUDE.
...
FossilOrigin-Name: 060aec37accae858ced5b081a2ff76dccdd8f8bcefc63d1fe2e7478257c69e76
2021-07-08 23:35:20 +00:00
larrybr
f382e1dc59
Allow library build to #include a user-specified header.
...
FossilOrigin-Name: 71e6490bbe59939cd15f0094e507dd8a2e167fdd8de675c3ebfeaf528a01f87a
2021-07-08 22:12:27 +00:00
dan
74777f994d
Improve the error message in cases where there is a row-value on the LHS of 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
2021-07-07 13:53:55 +00:00
dan
9289f5103d
Handle "<vector> IN (<vector>, <vector> ...)" in the same way as "<vector> IN (VALUES(<vector>, <vector>, ...)".
...
FossilOrigin-Name: 981d230ece98ce89502dab02aa44f73699a9d0e4fce3e9e9dfd47444a5a9990f
2021-07-06 20:44:32 +00:00
drh
a612c1c9bc
Add the ATOMIC_INTRINSICS compile-time output output. Move sqlite3Int.h
...
in front of ctime.c so that default values that are not overridden are
shown in PRAGMA compile-time option output.
FossilOrigin-Name: e306952690bfb140e2c404a74b05ff2d070c487f7e52c62d62a004505fba0e15
2021-07-05 18:37:37 +00:00
dan
0f56f891dd
Revert [5204c2c4a7b73a64], restoring the old pre-processor logic for determining the availability of the __atomic_store_n()/__atomic_load_n() primitives.
...
FossilOrigin-Name: e690abb9e4e189c41182ac813115d55d811135013f5ce94ec0c45a547597f8ad
2021-07-05 17:15:38 +00:00
dan
5daf69e5f4
Allow sub-queries in the FROM clause of an UPDATE...FROM statement to access the object being updated without using an alias, as is required in the parent query.
...
FossilOrigin-Name: 740cb43025449b7d7b47a97ad00885e54b7701cbcb14f4a50c7523022e3936d5
2021-07-05 11:27:13 +00:00
drh
10f08270e1
Ensure that TK_SELECT_COLUMN Expr nodes always have their iTable field set to
...
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
2021-07-05 01:11:26 +00:00
dan
2c7188732d
Add the sqlite3_changes64() and sqlite3_total_changes64() API functions.
...
FossilOrigin-Name: 48fdec22c966003f5577e0bf52906ef90df11e4e395723a646304e67ed976f37
2021-06-22 18:32:05 +00:00
dan
ac67f56726
Fix an ALTER TABLE problem with handling infinite loops of CTEs in the database schema.
...
FossilOrigin-Name: c09d90eec2a49b948c60971294d146db5c82438855cd3fa48ddc3d2e6b44c26c
2021-06-14 20:08:48 +00:00
drh
24ce9446a8
This is an alternative approach to the use-after-free problem fixed
...
by [193b14a58e378ab3], saved here for historical reference.
FossilOrigin-Name: 6796b7a2485eca279db9d777595a886bc0d1dd7ec9551e1797e0032ef5493559
2021-06-12 17:45:32 +00:00
dan
26d61e5adf
Fix problems with ALTER TABLE and schemas that contain views with some recursive CTEs, or CTEs that reference other CTEs.
...
FossilOrigin-Name: 8b1f9a51e962cd9a5593a1ecf4da6c86e34c4f9ff96ffcea0fb421880c8836cb
2021-06-11 11:14:24 +00:00
drh
2d26cfcc4a
Revamp SQLITE_TESTCTRL_TUNE to provide visibility of current turning
...
parameter values.
FossilOrigin-Name: 677e645e69e1f06487c26da6671fc03f0fb89a0f8e0d35712e6bdcf7279bdfc4
2021-06-04 13:40:26 +00:00
drh
f3c1256a4d
Add support for SQLITE_TESTCTRL_TUNE and the ".testctrl tune ID VALUE" command
...
in the CLI.
FossilOrigin-Name: f1199d58b9cfdcddb83bc35544ce38299ac4ed50d7ab90d33463f6ccce526feb
2021-06-04 13:16:46 +00:00