Commit Graph

39 Commits

Author SHA1 Message Date
drh
d7dc0a36cc Add the extra "hidden" column to the end of the PRAGMA table_vinfo output.
FossilOrigin-Name: cf1b76135f511530dcc7b82f78c952bf97ebcddb40be06f713f9f2326915fabe
2018-10-01 18:28:42 +00:00
drh
5612ef1057 Bring the PRAGMA table_vinfo statement up to date with trunk.
FossilOrigin-Name: 6f606f99231f88ae5ff719d0ce21afc4b844490102c27ac20aa606baaf78d8d6
2018-10-01 17:15:17 +00:00
drh
15fc988ce0 Add the PRAGMA table_vinfo command (with an extra "v" before "info") that
works like PRAGMA table_info (without the "v") except that it also shows
hidden columns on virtual tables.

FossilOrigin-Name: 8bcd1a59560aa7ea73e6529e5c14ece8ac09bf7e99efdcfd388fead39846b6bf
2018-09-29 19:38:42 +00:00
dan
674b894269 Add a PRAGMA that restores the legacy ALTER TABLE RENAME TO behaviour.
FossilOrigin-Name: 5acad2e92c11c209bedc6ac8a709595e8070eed028ffc82af61499e5ceaa5e2b
2018-09-20 08:28:01 +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
ab53bb635c Add new pragmas: "function_list" and "module_list"
FossilOrigin-Name: e5f01d7fde05fdb547f35816ff15c31a92c170b31877f4c640b7bc2be3f580b3
2017-07-07 15:43:22 +00:00
drh
169dd928c5 Add the SQLITE_DBCONFIG_ENABLE_QPSG option to activate the query planner
stability guarantee.  This involves refactoring the sqlite3.flags bitvector
to carve out a free bit to use.

FossilOrigin-Name: 7076e8283ebae1b45a5d85d9538b49b6da399d38c3c6935de100f948f814f6a9
2017-06-26 13:57:49 +00:00
drh
c45fdb2a7f Enable pragma virtual tables for the integrity_check, quick_check, and
foreign_key_check pragmas.

FossilOrigin-Name: 118f7bb33a6f78951bbffa957f48015d1bce5aaf9246a99262a90bc8ad52e5a3
2017-06-21 01:36:30 +00:00
drh
761f691d0e Force a schema load prior to "PRAGMA optimize".
FossilOrigin-Name: 86897c24c0b35ffea8df72d86a099addf67de210c6568aaba22ef92f1a60c3cf
2017-04-03 13:33:51 +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
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
72052a73a3 Add the "PRAGMA analyze_as_needed" command.
FossilOrigin-Name: e93db2373127d31d33ec46ef918fa9386bb664a6
2017-02-17 16:26:34 +00:00
drh
a3928dd7be Set the TF_StatsUsed flag on tables when the query planner outcome is
affected by the sqlite_stat1 data.  Also, change the column names of the
"PRAGMA stats" command so that they are not keywords.

FossilOrigin-Name: fb2b8ae8310e4ea4b42354bbf36c3084a9d5c6d7
2017-02-17 15:26:36 +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
dan
e1ff3f5e11 Ensure that "PRAGMA case_sensitive_like" and "PRAGMA shrink_memory" set the
number of output columns to 0 (as they are statements that return no data).

FossilOrigin-Name: 6696cd1878be4bd44a24841b04163e52d847711e
2017-01-06 13:49:40 +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
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
3592680734 Add the SQLITE_OMIT_PARSER_TRACE compile-time option.
FossilOrigin-Name: 2fda43e6e097a4a5510cce7784c31ceedc3d6e6d
2015-12-15 13:50:22 +00:00
drh
8d4482da96 Always parse the schema *before* running "PRAGMA cache_size", not after.
FossilOrigin-Name: 12e7d9ec023db4dd837f76006c87defc5a3e9388
2015-11-12 22:15:18 +00:00
drh
9b0cf34f81 First attempt at enhancing the "PRAGMA cache_spill" statement to accept a
cache threashold size.

FossilOrigin-Name: 549d42be0dac87dc04c3eeccfdc60615c3a6ad3f
2015-11-12 14:57:19 +00:00
drh
957026ac78 Defer the bulk pcache1 memory allocation until the first page allocation
request.  Limit the size of the pcache1 bulk allocation to the cache_size
setting.  Deallocate the bulk allocation on a sqlite3_db_release_memory()
request, if the bulk allocation is completely unused.

FossilOrigin-Name: b79a4affe44bd0c8e155cae19f3f62c715684cd6
2015-07-16 18:18:19 +00:00
drh
1421d980c5 Add the "PRAGMA cell_size_check=ON" command.
FossilOrigin-Name: 2ead43f074d01312c7642e1df9abccc95547f019
2015-05-27 03:46:18 +00:00
drh
4bb8cb0927 Merge all recent trunk changes, including the movement of the pragma
table into the separate pragma.h header file.

FossilOrigin-Name: 3af19f84446ba5fc1ed754d0d73f6a6d7fb2f365
2015-02-04 23:13:48 +00:00
drh
67e65e55ab Break out the (script-generated) pragma parsing tables into a separate file,
pragma.h, to make editing easier.

FossilOrigin-Name: 32c0325bcb083fe3f0f0cfe999d00f754e15299e
2015-02-02 21:34:54 +00:00
drh
c228be5b1f Add the "index_xinfo" pragma. Add new columns to the "index_info" and
"index_list" pragmas.

FossilOrigin-Name: 30f51d7b3b292191e8351223242e708bb7f3dfa6
2015-01-31 02:00:01 +00:00
drh
9161856495 Experimental "PRAGMA data_version" command for detecting when another process
has changed the database file.

FossilOrigin-Name: 43db1f44bce5a0ee50197b95ab0d844540b69d86
2014-12-19 19:28:02 +00:00
drh
8e755e7e19 Simplify the implementation of the "header-value" pragmas (schema_version,
user_version, freelist_count, and application_id) by making them more
table-driven.

FossilOrigin-Name: da27a09d1d991583b59997f6cc67efa28ffd9d6a
2014-12-19 18:49:55 +00:00
drh
034596153d Query or change the maximum number of worker threads allowed on each
database connection separately using the "PRAGMA threads" command.

FossilOrigin-Name: 29c5e8a7c9d7ce349a1e1d72082d23450e877b45
2014-08-25 15:13:22 +00:00
drh
84e55a80db Add the "PRAGMA vdbe_eqp" command, only available with SQLITE_DEBUG. Simplify
some of the other debugging logic.

FossilOrigin-Name: 8ce33f4c818e1c785a1c176f6f631b8184e1166b
2013-11-13 17:58:23 +00:00
mistachkin
dd19783225 Improve support for the SQLITE_OMIT_FLAG_PRAGMAS compile-time option.
FossilOrigin-Name: f1d8c3b07e61c5a8b39675d0d62876ca15e207f3
2013-10-21 23:17:23 +00:00
drh
3ef261567a Restore the index_list pragma back to its former operation. Create a new
PRAGMA stats used to access the table and index widths and heights.

FossilOrigin-Name: f0cf8c85dcbcc7778aed2816792c368d777f79cb
2013-10-12 20:22:00 +00:00
drh
8ab88326cb Restore the hexrekey pragma which was accidently deleted during the
pragma refactoring.  Make sure the hexkey and hexrekey pragmas do not
overflow buffers with a over-length key.

FossilOrigin-Name: 0aca31e1514b3df254c049b4251bcb199831681a
2013-10-07 00:36:01 +00:00
drh
f63936e805 Rework the PRAGMA implementation to only call sqlite3ReadSchema() from a single
place, based on a flag in the pragma table, rather than separately from each
case which needs the schema.

FossilOrigin-Name: 8338232a111be16d6c2ab57176d0a23a001f02ad
2013-10-03 14:08:07 +00:00
drh
77ff23f9c7 Fix the "const" qualifiers on the pragma name table.
FossilOrigin-Name: b74e6be818fa7d19f1af6d86ad1d2ecba334b01b
2013-09-13 21:03:45 +00:00
drh
55e85ca5f5 Add the soft_heap_limit pragma.
FossilOrigin-Name: c326356f9a18bff5cf36bd59331e2cc207e349fa
2013-09-13 21:01:56 +00:00
drh
d49c358e39 Tweak the new PRAGMA name parser to achieve full branch test coverage.
FossilOrigin-Name: c82e05c4b8e000684d95ac8417afaef5e4d633e6
2013-09-13 19:00:06 +00:00
drh
6bb64f6a31 Enhance the pragma lookup table generator script to output a comment that
gives the number of pragmas.

FossilOrigin-Name: ca05205050752b5d5f583421b7813fba62f5085c
2013-09-13 16:56:17 +00:00
drh
9ccd8659ff Change the PRAGMA parser to use a binary search for the pragma name.
Also:  Minor performance enhancement to sqlite3DbFree() and to the
token dequoter.

FossilOrigin-Name: 870c030b4e1854e6e0d39907fadbd82774c16f56
2013-09-13 16:36:46 +00:00