drh
d5eae667f4
Add new PRAGMAs: "function_list", "module_list", and "pragma_list". All are
...
enclosed within #ifdef SQLITE_INTROSPECTION_PRAGMAS. The compile-time option
is not on ctime.c yet, since these are still experimental and one can always
test "PRAGMA pragma_list" and see whether or not it returns an empty set.
FossilOrigin-Name: e0b6ae92adfae46f64fc2e2719e22e5467c34d49c1aeaec5cc5faf04258de0f7
2017-07-07 17:43:30 +00:00
drh
8ae11aac93
Add the "Pragma_list" pragma. Put all three pragmas created on this branch
...
inside of #ifdef SQLITE_INTROSPECTION_PRAGMAS.
FossilOrigin-Name: 2f3c3781ef3d66ecafef083d7144287ff23eea5a6d93b014dfeb2a8ac71f757e
2017-07-07 17:33:07 +00:00
drh
40cf27cb63
Enhance the sqlite3VdbeMultiLoad() interface to automatically generate the
...
OP_ResultRow opcode on PRAGMA implementations, for a small reduction in the
library footprint.
FossilOrigin-Name: c46f0f076c674891e20240bad56693d891aedc43004bcf980a5d199515f23413
2017-07-07 16:00:53 +00:00
drh
ab53bb635c
Add new pragmas: "function_list" and "module_list"
...
FossilOrigin-Name: e5f01d7fde05fdb547f35816ff15c31a92c170b31877f4c640b7bc2be3f580b3
2017-07-07 15:43:22 +00:00
drh
a5907a86b8
Experimental "PRAGMA secure_delete=FAST" pragma. The intent is to overwrite
...
deleted content with zeros without increasing the amount of disk I/O.
FossilOrigin-Name: f1682f0faf1a93ded066464b1ddd5f987e21ee0f6bb5e828ed31c3ad903cf2c3
2017-06-19 11:44:22 +00:00
dan
c42a0056d7
Merge latest trunk changes into this branch.
...
FossilOrigin-Name: b1533bc455f52f570c0f4b8aaa0da802757dc89b0e45b9a9b31aa591a44bf7bd
2017-04-20 17:35:46 +00:00
dan
4bee5599c0
Consolidate two branches of code in the "PRAGMA foreign_key_check"
...
implementation.
FossilOrigin-Name: 69f51f838abcf57b35e41f7a10fbb45f56536f93825aac865debc3c8315930be
2017-04-17 18:42:33 +00:00
dan
940464b1dc
Fix a problem in "PRAGMA foreign_key_check" in handling a WITHOUT ROWID child
...
table with an INTEGER PRIMARY KEY parent key. Also, if an FK violation is
detected in a WITHOUT ROWID child table, do not try to read and return the
rowid. The third column returned by "PRAGMA foreign_key_check" in this case
(WITHOUT ROWID child table) is now always set to NULL.
FossilOrigin-Name: 690870bd7b2e607b7992c4496c9f08c29eb72a36af002c606fd7aa3dcf94a2a4
2017-04-17 18:02:41 +00:00
dan
2b78dd2359
Merge latest trunk with this branch.
...
FossilOrigin-Name: e051e8f21b909c5e89a7203eef6501fecd64f82a634c4e10398b5ef7d716eb37
2017-04-08 19:00:37 +00:00
dan
75f9558808
Fix a problem causing "PRAGMA integrity_check" to disable the xfer
...
optimization for subsequent VACUUM operations on tables with one or more CHECK
constraints. This could result in VACUUM producing slightly larger database
files.
FossilOrigin-Name: e5bb7db51cdfd8124c60329782798cea398733545594dab55cb892b2a08c4d29
2017-04-04 19:58:54 +00:00
dan
fbf3bdcdbc
Merge latest trunk into this branch.
...
FossilOrigin-Name: cb721d0b36268a7b0ef493fa4d7f6bcbaa9ead8b1990e3c3fae015fa1d545226
2017-03-31 11:20:20 +00:00
drh
a3b2da9889
Fix a problem in the enhanced PRAGMA integrity_check where it verifies
...
CHECK constraints: Do not be confused by the reuse of the Table.pCheck field
by VIEWs with named columns. Problem discovered by OSS-Fuzz.
FossilOrigin-Name: 019dd3d5ba4a596c4ec3b5f0de8402c72196af0faca9138edbc0f1f4957cae60
2017-03-17 03:21:14 +00:00
drh
7553c82894
Make "PRAGMA temp.synchronous=N" a no-op to ensure that the TEMP schema
...
always has synchronous=OFF. This fixes an issue discovered by OSS-Fuzz.
FossilOrigin-Name: bcf6bb08d8b07d3c4567bcd367f8d4011ce8baad28c25d4e8870bdf347dd48bd
2017-03-15 14:04:03 +00:00
drh
59dbe3a5ef
Make the default MASK argument for "PRAGMA optimize" be 0xfffe, to allow for
...
future expansion of up to 14 new default-on optimizations.
FossilOrigin-Name: 73019a8bba29fd07f73559cd00d5346fa822b439
2017-03-06 23:51:16 +00:00
drh
e1f1c0802c
Fix a typo in a comment. No changes to code.
...
FossilOrigin-Name: ec529bf11b16c801ea438e57d208ff7e4cedf1f9
2017-03-06 20:44:13 +00:00
drh
1cfaf8eafb
Add an optional bitmask of allowed optimizations on the "PRAGMA optimize"
...
command. The 0x01 bit is Debug Mode.
FossilOrigin-Name: a35388eef4096c1856b025dbd90143409d4a72d3
2017-03-02 14:17:21 +00:00
drh
bce0414844
Do a single OP_Expire at the very end of "PRAGMA optimize", and omit the
...
OP_Expire on ANALYZE commands invoked by the pragma.
FossilOrigin-Name: 188300a337c87b7ee0dd1f4b9a4f1bd80e70cca4
2017-02-23 00:58:36 +00:00
drh
2ead47cb49
Change the name of the analyze_as_needed pragma to "optimize". Enhance the
...
comment (which will become documentation, assuming these changes land on trunk)
to explain that the optimize pragma is likely to be enhanced in various ways
in future releases and that applications should not depend upon the current
behavior.
FossilOrigin-Name: 9fced545a6f80c55d6dc4a6106cb2d3569566b3e
2017-02-22 20:24:10 +00:00
drh
114ce7a4b1
Merge integrity_check and other improvements from trunk.
...
FossilOrigin-Name: fe073905081b421405ca425ca03c5b8b0ff5f2c8
2017-02-22 19:49:54 +00:00
drh
66accfc56b
Cleanup and simplification of the output row count limit control of
...
PRAGMA integrity_check.
FossilOrigin-Name: 5af7d72ed9ec758283d78ceb46627d72021c1c60
2017-02-22 18:04:42 +00:00
drh
8b174f2916
Fix integrity_check so that it verifies NOT NULL constraints even for tables
...
that have no indexes. Enhance quick_check so that it verifies NOT NULL and
CHECK constraints.
FossilOrigin-Name: 5264844b069cdc20f456acee9f5b2b97c986120d
2017-02-22 15:11:36 +00:00
drh
8a284dcefe
Enhance "PRAGMA integrity_check" so that it verifies CHECK constraints.
...
FossilOrigin-Name: 549bae0856004ff65b505175460abd598b30fe57
2017-02-22 14:15:37 +00:00
drh
99d5b4cde6
Updated comments. No code changes.
...
FossilOrigin-Name: e842ad391e62df273a5b1ed569d42ea46d03a99b
2017-02-18 22:52:40 +00:00
drh
4a54bb5794
Add the OP_SqlExec opcode and use it to implement "PRAGMA analyze_as_needed",
...
invoking ANALYZE subcommands as necessary. This simplifies the implementation.
FossilOrigin-Name: d386015f5e7ecdd951d70db56b7bbd858be7ad90
2017-02-18 15:58:52 +00:00
drh
182e84c116
In the analyze_as_needed pragma, avoid running unnecessary OP_LoadAnalysis
...
and OP_Expire opcodes. Make the analyze_as_needed pragma responsive to the
schema name.
FossilOrigin-Name: 882599a4a7ea92c9e7752e0745475508e58a11c3
2017-02-18 02:19:02 +00:00
drh
72052a73a3
Add the "PRAGMA analyze_as_needed" command.
...
FossilOrigin-Name: e93db2373127d31d33ec46ef918fa9386bb664a6
2017-02-17 16:26:34 +00:00
drh
33bec3f5e8
Enhance the Index and Table objects so that they remember if their stats come
...
from the sqlite_stat1 table. Make the "PRAGMA stats" an SQLITE_DEBUG only
pragma. Add the flags column to "PRAGMA stats". These are all preliminary
steps toward a "PRAGMA analyze_ifneeded;" feature.
FossilOrigin-Name: 85026c8ee143bbd46565660fff8346ef81421546
2017-02-17 13:38:15 +00:00
mistachkin
2e52532217
Fix harmless compiler warnings seen with MSVC.
...
FossilOrigin-Name: 997f765bc6706769ae15f3e719354473e02bd78b
2017-02-01 22:43:08 +00:00
dan
9e1ab1a8a4
Ensure that sqlite3_column_count() returns 0 for the "set" mode of "get/set"
...
PRAGMA statements that do not return a value in that case (e.g. page_size,
cache_size, auto_vacuum).
FossilOrigin-Name: 5c05d8ec5e895661dae2de30c73dfdeaff93511e
2017-01-05 19:32:48 +00:00
drh
344a1bf133
Fix harmless compiler warnings.
...
FossilOrigin-Name: fa86db2f915c0a189c3be02b1aaa7f24d339d7d6
2016-12-22 14:53:25 +00:00
drh
d8b7200b84
Fix an error in the way the "schema" argument to some pragma virtual tables
...
is handled.
FossilOrigin-Name: 546821e29edb0282a4b1d8f49512e36027a6bf6d
2016-12-16 04:20:27 +00:00
drh
9a63f09204
Minor bug fixes and enhancements to the pragma eponymous virtual tables.
...
FossilOrigin-Name: 3f8f461504139a4efea0e033e3a274cc4b2d3072
2016-12-16 02:14:15 +00:00
drh
ae7045cd53
Fix the cost estimation in the BestIndex method of the eponymous pragma
...
virtual table implementation.
FossilOrigin-Name: 7126807a186746a8663fbaa267d63214d06476e4
2016-12-15 21:33:55 +00:00
drh
d7175ebeaf
The pragma as eponymous virtual table mechanism now appears to work.
...
FossilOrigin-Name: 2c274a1a7b57ef1208901fbc1d96d39c0d492652
2016-12-15 21:11:15 +00:00
drh
2fcc1590c4
Code to automatically create eponymous virtual tables for read-only pragmas.
...
Compiles, but does not yet work.
FossilOrigin-Name: 988a61e8b03f302c69d11898d1ea95f002cba1a5
2016-12-15 20:59:03 +00:00
drh
c232aca184
Do more pragma processing from tables rather than in-line code.
...
FossilOrigin-Name: a88ca3524b97f296dffc68335466b3767a681747
2016-12-15 16:01:17 +00:00
drh
69c338263a
Rename the Db.zName field to Db.zDbSName to make it more descriptive and to
...
distinguish it from all of the other "zName" variables scattered throughout
the code.
FossilOrigin-Name: 92a22f01343a898455fd61c3b8e7d7c954f5b569
2016-08-18 14:33:11 +00:00
drh
4d249e6128
Enhance "PRAGMA table_info" to that it provides information about eponymous
...
virtual tables.
FossilOrigin-Name: 53a1e5d51304cb3de700c1807a2c945a40240576
2016-06-10 22:49:01 +00:00
drh
eeb9565a3e
Add a new OP_SeekRowid opcode, that combines the functions of OP_MustBeInt
...
and OP_NotExists. This makes the code slightly smaller and faster.
FossilOrigin-Name: ffe80a1bfa014943a614fc6993c1749b9bfec4c1
2016-05-26 20:56:38 +00:00
drh
01c736db40
Use sqlite3VdbeAddOp0() to code OP_Expire, to save a few bytes.
...
FossilOrigin-Name: 3d55d24dcb27f07d1e645738ee4707e4df923036
2016-05-20 15:15:07 +00:00
drh
d7564865ad
The sqlite3_column_decltype() routine should return NULL, not an empty string,
...
if the column has no declared type.
FossilOrigin-Name: 605eba4a756e7185119088e2242f82691d078b01
2016-03-22 20:05:09 +00:00
drh
bb9b5f2608
Fix a register allocation bug in the VDBE code generator for
...
PRAGMA integrity_check;
FossilOrigin-Name: 88439a866b3b16ad7c308ebe59198662a05e7eeb
2016-03-19 00:35:02 +00:00
drh
f71a366407
Some pragmas can be reused without an automatic reprepare.
...
FossilOrigin-Name: db1ce7e13e656fcd2766f1b1f225cbfefe8f73ad
2016-03-16 20:44:45 +00:00
drh
e459bd4986
Fix a comment on the freelist_count and data_version pragmas.
...
FossilOrigin-Name: 10a3e2a01db9f80452a2a3369fd25b6fd9798274
2016-03-16 20:05:57 +00:00
drh
98968b22c5
Change the OP_IntegrityCk opcode to accept the list of root pages as an
...
intarray argument in P4. Slightly smaller and faster.
FossilOrigin-Name: 15e4a272df46cbad8e71b21551dc06a126d64d46
2016-03-15 22:00:39 +00:00
dan
85a18faff9
Merge latest trunk changes with this branch.
...
FossilOrigin-Name: 59caca4387e97231834a3bffdbed8636be4e8e19
2016-03-09 08:08:51 +00:00
drh
50a1a5aaca
Add compile-time options SQLITE_DEFAULT_SYNCHRONOUS and
...
SQLITE_DEFAULT_WAL_SYNCHRONOUS used to specify the default synchronous
settings for all database connections.
FossilOrigin-Name: 1fefa967aa93372d232b96b1e0232b7b855d6d00
2016-03-08 14:40:11 +00:00
drh
94eaafa9ce
Reduce the amount of heap required to store many schemas by storing each
...
column datatype appended to the column name, rather than as a separate
allocation.
FossilOrigin-Name: 842b21162713bb141b845b01c136457a31af4ab0
2016-02-29 15:53:11 +00:00
drh
94fa9c414a
Eliminate the need for the Column.zDflt (using Column.pDflt instead) to reduce
...
the amount of memory needed to hold the schema.
FossilOrigin-Name: d8c94a46dfa94930732c2de2aa79675c5087d36e
2016-02-27 21:16:04 +00:00
drh
d566c95179
Change the "PRAGMA stats" command to report size values in LogEst units.
...
The eliminates the need for sqlite3LogEstToInt() unless non-standard
compile-time options are used, so leave it out except in those cases.
FossilOrigin-Name: 832c237fcbe83dd4f5a18a06acb0aeb7e2b9e712
2016-02-25 21:19:03 +00:00