drh
e995d2c226
Proposed optimization to the IS NULL and NOT NULL operators that avoids
...
loading the entire content of larges strings and BLOBs. Response to
[forum:/info/3c08d4715dc05b00|forum post 3c08d4715dc05b00].
FossilOrigin-Name: 45f171565442f9fd6574fb93ae7abe83c168b20be68af42531bc55571450d3ab
2022-10-13 12:47:33 +00:00
drh
c9ef12f62b
Code clean-up for the integrity_check enhancement.
...
FossilOrigin-Name: a140173102febe9ef8064ee9b95bee489db54caba149e577d69e4d75161bf390
2022-10-10 21:21:04 +00:00
drh
db6940ab45
Fix corner-case bugs in the new integrity_check logic. All tests pass now.
...
FossilOrigin-Name: dbab9d52a842085da67f5d0b8e96c665adc16331accf380b4c234e9b05bdb7fb
2022-10-10 19:38:01 +00:00
drh
49d77ee642
An attempt to enhance PRAGMA integrity check so that it does data type
...
checking on non-STRICT tables. Specifically: (1) Columns with TEXT affinity
should not contain numeric values, and (2) columns with numeric affinity should
not contain text values that can be converted to numeric.
FossilOrigin-Name: 8b1e7f0524637728cebe81c7d3ff8ad8a5a55782eac6409b425dad538024f596
2022-10-10 18:25:05 +00:00
drh
18a3a48db1
Experimental changes to put sqlite3_temp_directory behind a mutex.
...
FossilOrigin-Name: 5ee3515fbb88bf1ae5f8b507844f82dcc429380b6ebeab9b09b52b25ee60a60d
2022-09-02 00:36:16 +00:00
drh
16b03c0196
Enhance the "PRAGMA integrity_check" statement so that it verifies the rows of
...
a WITHOUT ROWID table are in the correct order.
FossilOrigin-Name: 62f934bff495850d0763e07ffa44a557f066ecba9d039363f32287213cba819f
2022-08-17 18:07:52 +00:00
drh
0348fc722f
Minor code simplification in the code generator for PRAGMA integrity check.
...
FossilOrigin-Name: a3b9c7a6c9be5c78a93e5125f16237d2d84b977eca81f527af0198e96435a995
2022-08-17 17:14:36 +00:00
drh
058e99502a
Small performance increase and size reduction by splitting out the
...
sqlite3VdbeGetLastOp() from sqlite3VdbeGetOp().
FossilOrigin-Name: 92ac01d41d46ab73e189b1e5596ea63e5edb5b15639c5d7bdb981b95366c069b
2022-07-25 19:05:24 +00:00
drh
36d2d09023
Use unpacked keys for OP_Found in foreign key processing.
...
FossilOrigin-Name: 328dc76657eb5317f0201859d2b3abe6918103b894f7beaed0aca3058a9f2b64
2022-04-04 18:17:59 +00:00
drh
00946d7953
Avoid a harmless uninitialized variable warning in PRAGMA incremental_vacuum.
...
FossilOrigin-Name: 6d976f90dfe4886c3f4c062151af5c5ca7454d34b71172401b8c67acd2d663a0
2022-04-01 16:22:41 +00:00
drh
ceff761521
Fix a harmless compiler warning.
...
FossilOrigin-Name: 6497997aa80419688890ed5dbbb7d6acc26bf3732305ff4a728cba1fe4d1626b
2022-03-02 01:02:16 +00:00
drh
9606a13432
Invoking SQLITE_TESTCTRL_INTERNAL_FUNCTIONS causes the flags field of the
...
PRAGMA function_list to show all bits, including internal-use-only bits,
rather than just the bits that are part of the API.
FossilOrigin-Name: ad1be34828726bfef0dbc0ce16090400cf3530e7b5077849af96774d7428387b
2022-02-25 01:23:17 +00:00
drh
0c7d3d399d
Remove many redundant checks for sqlite3.mallocFailed now that any OOM should
...
cause Parse.nErr to be non-zero.
FossilOrigin-Name: 1f7fa46126ea33ed30e93186aff3df51068aeb4be6f79a102bfe8c4e44941d71
2022-01-24 16:47:12 +00:00
drh
a4a871c286
Show the preferred schema table names in the output of "PRAGMA table_list".
...
FossilOrigin-Name: 9147390d9885a37a62edc1058f313434627f1b59965c890877d2cb119e355c78
2021-11-04 14:04:20 +00:00
drh
5c9290423d
Fix an issue in PRAGMA integrity_check associated reporting NULL values in
...
a NOT NULL column of type ANY in a STRICT table.
FossilOrigin-Name: 5dff1f66731ae35daf9633f8bb3ea942a7c29f4240e57bd2023ee7fc116e7c92
2021-11-03 11:43:09 +00:00
drh
dc88b40285
Fix the previous check-in so that it works with virtual tables that add new
...
shadow tables the first time they are referenced.
FossilOrigin-Name: f73b499e539b9551a70deecec4fc10c3a4af3830324977861cd0558f9782a1d3
2021-10-21 19:48:14 +00:00
drh
8ef0b84c37
Fix the new "table_list" pragma so that it shows the correct number of
...
columns for views and virtual tables even when the object has not been
previously used.
FossilOrigin-Name: fb0ed8c55f6362d2639687392a72cc3ed9dc318929e11893edd2a0f023929f7e
2021-10-21 17:01:10 +00:00
drh
bc98f904e3
Update requirement marks. No changes to code.
...
FossilOrigin-Name: 3a6887a543ac348d1a0d4b7f54b13c9dae929c3fa3408c5a44420943ba8c116f
2021-10-14 17:30:32 +00:00
drh
9966621da1
Use the IsOrdinaryTable() macro, not a test of tnum, to distinguish tables
...
from views and virtual tables.
FossilOrigin-Name: 6189b7809d774bf697d14e27a4bd961df5c318d261dce97db7801ce83f12c59a
2021-10-11 15:21:42 +00:00
drh
635e6a92a0
Add support for "PRAGMA writable_schema=RESET".
...
FossilOrigin-Name: a51b305bd068f8d8e85b9fc38d61cdf5957f3a2ad2eb2e77015547910088e681
2021-10-08 16:39:33 +00:00
drh
9d43db5b5c
Fix an incorrect assert() on PRAGMA table_xinfo added by the previous check-in.
...
FossilOrigin-Name: f85cb287c52baa729aeb223038e979a3b74a1eb3d97bf59c01f5417998204f84
2021-10-07 14:19:32 +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
78b2fa8610
Protect every access to the Table.u union using a nearby assert() or branch.
...
FossilOrigin-Name: 50e08338aed7ac0cee600098d2ecd4b3b7bfd31a597bb26773badf3d2e2582c8
2021-10-07 12:11:20 +00:00
drh
2e50f67073
Add the "PRAGMA table_list" command with its corresponding eponymous
...
table-valued function: "pragma_table_list".
FossilOrigin-Name: 2c0e7ae541e9ecb86aa58fa7e7057def8aac1b1af1af1aa80b8bf2d260f9a2f9
2021-09-21 17:26:23 +00:00
drh
94b70d8343
Fix PRAGMA integrity_check so that it does not try to enforce types on
...
ANY columns in a STRICT table.
FossilOrigin-Name: 57384fda8db43964871be5e48ae1c72c67533046b523f161d60a41fdc8e96b9e
2021-09-08 19:25:21 +00:00
drh
71c770fbda
Improved comments. Fewer opcodes for integrity_check on strict tables.
...
FossilOrigin-Name: 4ee57fb588b41ab76649c605f57c7bcf5b7b638435af458d69f69a8ccbb121e8
2021-08-19 16:29:33 +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
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
4f16ff9d06
Follow-up to [68db1ff9c44fa9c3]: The number of registers needed by
...
PRAGMA foreign_key_check was increased too late for an assert() deep
down inside of sqlite3ExprCode(). So move the size increase a little
earlier.
[forum:/forumpost/79c9e4797d|Forum post 79c9e4797d].
FossilOrigin-Name: 7072404ad0267b8ee774b2804ea59ea28e29316521d76d76a701595e51d1be97
2021-07-07 16:48:24 +00:00
drh
5c46a7e555
In the PRAGMA foreign_key_check, ensure that sufficient registers are
...
allocated for the virtual machine, even if one or more foreign keys reuses
the same column multiple times and has more columns than the table it is part
of. [forum:/forumpost/a6b0c05277|Forum post a6b0c05277].
FossilOrigin-Name: 68db1ff9c44fa9c37690ce55ad304d4263ba6fac490063d9e08470de6c17cfe6
2021-07-03 02:55:47 +00:00
drh
099b385d17
Do not confuse the constant SQLITE_MAX_ATTACHED with the maximum number of
...
schemas. Add the new SQLITE_MAX_DB constant for the maximum number of
schemas. [forum:/forumpost/a006d86f72|Forum post a006d86f72].
FossilOrigin-Name: 7b65fb9f7bd616f834633afd64b3448bf9ca2b6e4cc6d6c01e75d1d877c88a79
2021-03-10 16:35:37 +00:00
drh
d96e3821e4
Fix a pair of assert()s in "PRAGMA foreign_key_check" that might have given
...
a false-positive following an OOM.
FossilOrigin-Name: 9ea3039b538ffd0f348c8fbc9452af1fbf899a1f668af9a2404bdd0f8dd21351
2020-09-16 19:48:23 +00:00
drh
99744fa4ab
Add support for the sqlite3_txn_state() interface.
...
FossilOrigin-Name: ad195e3dd89d0f33b50070c18fb8f43c4eb24162515dfdd7c04d9e7d96b902a2
2020-08-25 19:09:07 +00:00
drh
ed109c06e1
Merge support for partial integrity checks.
...
FossilOrigin-Name: b5443b47af95f4f0ef527bee90f186ee25faa5df197dbcc3e14d48eee095e4aa
2020-07-23 09:14:25 +00:00
drh
17d2d592fb
Add the ability to do a PRAGMA integrity_check (or quick_check) on a single
...
table by specifying the table name as the argument.
FossilOrigin-Name: 65dd321432e8f80bc1cb11be8ca06656b41ac997a74a5eb271c797cf0fbb764e
2020-07-23 00:45:06 +00:00
drh
e9261dbd53
Initial changes to allow database up to 281TB in size.
...
FossilOrigin-Name: 9cb7da9bdb666ea40771513b89591dca275f1e92092b39190df747e3797178a3
2020-07-20 12:47:32 +00:00
drh
a78d2c0528
Fix the table_info pragma so that it always checks the schema version and
...
reprepares, even if it is a no-op.
FossilOrigin-Name: 6da77973abc325ae8baf64615267a614a0b8bb8dfd0a01a9f7d6c3a8f359564f
2020-07-04 20:29:56 +00:00
drh
ec1650a239
Fix a problem with "PRAGMA foreign_key_check" where if a table in one
...
schema appears to have foreign key constraints against another table in
a different schema, the pragma will try to check the constraints even though
they do not apply because they are in different schemas.
FossilOrigin-Name: 81bc4b65ae2a68128b0be75a7a3d4f47f05cc588ff130ba56366ab9b16289228
2020-07-03 12:15:59 +00:00
drh
e3863b5176
Ensure that the "PRAGMA schema_version" command causes the schema to be
...
reparsed and reloaded.
FossilOrigin-Name: 27d4a9a7b530c77a5b2593d1a5232b10746da9906f8d12890de7a8fbd7270256
2020-07-01 16:19:14 +00:00
drh
e937df81f0
Fix the handling of reserve-bytes so that the maximum value of 255 can be used.
...
FossilOrigin-Name: 99749d4fd4930ccf15227f67c732266af9e09dd3cabdc0834fb450ef98196441
2020-05-07 01:56:57 +00:00
drh
49a76a8fe5
Add "PRAGMA analysis_limit=N;" to limit the number of rows visited by
...
ANALYZE when N is positive. Positive N also disables collecting stat4.
FossilOrigin-Name: a279b151c1623807774daf4975175c62ea252eefb71f9820ced6773769b392c5
2020-03-31 20:57:06 +00:00
drh
e50478d727
Remove the SQLITE_OMIT_BTREECOUNT option. Btree count is required.
...
FossilOrigin-Name: a9bfa47aeea27e91611ba913d33e6635d2016e2c2ab78f9b0657f1bd8933e1a8
2020-03-17 13:41:51 +00:00
dan
0ea2d42ac3
Report an error if the main, or any other, database encoding is modified by an external process (perhaps using the backup API) after the db has been opened.
...
FossilOrigin-Name: 895bd20b29e223496e1585483c6ce3335ae9050f2e5de4d6b69d0e40df396862
2020-03-05 18:04:09 +00:00
drh
42a630b1da
Change the sqlite3.pDfltColl (the default collating sequence for the
...
database connection) so that it is the collating sequence appropriate for
the database encoding, not the UTF8 collating sequence. This helps to
ensure that the database encoding collation is always used, even for
expressions that do not have an defined collating sequence.
Ticket [1b8d7264567eb6fc].
FossilOrigin-Name: 4a5851893c3d71cc823b6ab5df5e58a852cd322fff26290f1ea05b63d67f564a
2020-03-05 16:13:24 +00:00
drh
b48c0d59fa
Simplify the code by removing the unsupported and undocumented
...
SQLITE_HAS_CODEC compile-time option
FossilOrigin-Name: 5a877221ce90e7523059353a68650c5fdd28ed032807afc2f10afbfbf864bdfe
2020-02-07 01:12:53 +00:00
drh
b5f0e40578
Do not allow the "PRAGMA encoding" statement to change the database
...
encoding if TEMP content exists, or content in any other attached
database. Formerly, encoding changes were allowed if just the main
database file was empty. Ticket [a08879a4a476eea9].
FossilOrigin-Name: 03b003c988d27f3aa1b1e44972ee5a3c7e44ad667ec7f2b8a31d0411c66583d3
2020-01-15 16:20:16 +00:00
drh
b84fda37ef
Fix a problem in the encoding display in the updated PRAGMA function_list.
...
FossilOrigin-Name: 318ff7720bc60c30c0826becce424226e9cec25c1d59cb2cdb75793739322760
2020-01-09 16:28:50 +00:00
drh
2eeca2046e
Performance improvements and test cases added. Allow "PRAGMA trusted_schema=ON"
...
FossilOrigin-Name: 30882ca80f6c51f6bb7b2692c1ac3f19a7c61a23aa8730be79aec0ae3ef08d54
2020-01-08 20:37:45 +00:00