Commit Graph

11086 Commits

Author SHA1 Message Date
dan
1d1f07df58 Fix a typo in main.c: SQLITE_DEAULT_AUTOMATIC_INDEX -> SQLITE_DEFAULT_AUTOMATIC_INDEX
FossilOrigin-Name: cc78e21c7794948a187e694773735058fc7460d7
2013-07-25 16:41:39 +00:00
drh
0d1961e91c Enhance the progress handler so that it keeps track of the number of VDBE
cycles across sqlite3_step() calls and issues callbacks when the cumulative
instruction count reaches threshold.

FossilOrigin-Name: 4698a82ef855a8e56163622283fb25317d7efdc4
2013-07-25 16:27:51 +00:00
mistachkin
036acf3644 Add 'queryplantest' target to the MSVC makefile.
FossilOrigin-Name: ad0551e039ccaa9e7a28682b756b56ac2b8fef0d
2013-07-20 00:34:31 +00:00
mistachkin
9ed04ebc8f Fixes to test numbering.
FossilOrigin-Name: f755b4b21c885f3e897c2a79fc7ac1220210e653
2013-07-19 23:58:41 +00:00
drh
af66433625 Remove unused "codec" code from the command-line shell.
FossilOrigin-Name: 37abfe0c1e5da63342389c527a9f7cbe0f8392d9
2013-07-18 20:28:29 +00:00
drh
6b75329ae1 Improved documentation for sqlite3_set_auxdata().
Ticket [406d3b2ef91c].

FossilOrigin-Name: 62465ecba7431e1d71e17a61f1af7dc65fe4fe97
2013-07-18 18:45:53 +00:00
dan
6447827e3b Ensure that all auxiliary data registered by calls to sqlite3_set_auxdata() is destroyed when the VM is halted.
FossilOrigin-Name: 153deac8faca3bcc95f6f37e500b659b39b3e872
2013-07-18 18:29:24 +00:00
dan
28f8aebf75 Fix a typo in the previous commit.
FossilOrigin-Name: cd9096e64b86c8d45f6744e6eb6ced2aa1a18279
2013-07-18 18:28:04 +00:00
dan
0c5477997b Ensure that all auxiliary data registered by calls to sqlite3_set_auxdata() is destroyed when the VM is halted. Partial fix for [406d3b2ef9].
FossilOrigin-Name: 71effa59c98d167e6e4b269e59ad5f468e664ac1
2013-07-18 17:12:08 +00:00
drh
1ac87e1e81 Fix a 8-byte alignment problem in the query planner that might cause
problems on sparc when compiled with -m32.

FossilOrigin-Name: 5dcffa671f592ae9355628afa439ae9a2d26f0cd
2013-07-18 14:50:56 +00:00
drh
b8c068329d Documentation changes to warn that sqlite3_set_auxdata() might call the
destructor even before it returns.  Also fix the regexp extension to deal
with that case.  Ticket [406d3b2ef91c].

FossilOrigin-Name: 7acc8cd32d593a473c9e9adaf323220a7a46480a
2013-07-18 14:16:48 +00:00
drh
47af6e76d6 Fix copy/paste errors in comments in the transitive_closure virtual table.
No changes to code.

FossilOrigin-Name: b1b0de29fdf7de83722bb85b748f058b9901e77a
2013-07-17 21:08:49 +00:00
drh
cc0713057f Enhance the sqlite3_analyzer tool to give reports on the sizes of individual
indices.

FossilOrigin-Name: 3b4096cc8a3b4517cdf49dcfe1f33279a5eb8efb
2013-07-17 18:12:15 +00:00
drh
9f01e582be Clear the error string pointer in sqlite3_vtab object after the error string
is transferred to SQLite.  Ticket [78588b938a11].

FossilOrigin-Name: 64bf8148b84e0ebb45c12b629f49bc9b316aceba
2013-07-17 11:54:47 +00:00
drh
7232ad0700 Make sure the sqlite3_prepare16 and sqlite3_prepare16_v2 interfaces do not
read past a zero-terminator if the nBytes parameter is too large.

FossilOrigin-Name: 20dba3a7fb3e7078b95af3beca948467a3af6a89
2013-07-16 23:26:43 +00:00
drh
aa32e3c60a Enhance the query planner so that it looks at multiple solutions to OR
expressions in the WHERE clause.

FossilOrigin-Name: 5e19d054105fb16ff52d265d48cc87a418603f6f
2013-07-16 21:31:23 +00:00
drh
425e27db12 Add the sqlite3_cancel_auto_extension(X) interface which will undo a prior
call to sqlite3_auto_extension(X).

FossilOrigin-Name: cdce87eb889a43dafcc560d5f97ab517d0266860
2013-07-15 17:02:28 +00:00
drh
8dd675e43f Make sure the shell does not try to put a zero terminator on the end of an
unallocated zero-length string when running ".import" on an empty file.

FossilOrigin-Name: 92adaee5bd31c152dbc1592f4aeb5d8da957a1ea
2013-07-12 21:09:24 +00:00
drh
a95882ff39 Change the description of how sqlite3_progress_handler() works so that
the N parameter is "approximate".  This aligns with the current implementation.
This is a documentation change only.  No changes to code.

FossilOrigin-Name: 7d829bdea3adcda50fbe930acb4e1ce73fd874e6
2013-07-11 19:04:23 +00:00
drh
b1eaa718fd Add the experimental "query_only" pragma.
FossilOrigin-Name: 6557c407983b067449deb76bc4c5248de64e07dc
2013-07-11 15:22:31 +00:00
drh
648e264342 Add the "defer_foreign_keys" pragma and the SQLITE_DBSTATUS_DEFERRED_FKS
value for sqlite3_db_status().  This is a cherry-pick of a sequence of five
checkins in the sessions branch between [1d44e5d3c2] and [d39e65fe70].

FossilOrigin-Name: 527121ac3cdc96ac33ad975c227a6685a2f7e999
2013-07-11 15:03:32 +00:00
drh
8f8c65f79b Fix harmless compiler warnings in the progress callback logic.
FossilOrigin-Name: 908141d5bf7a9ad8f40c2332476847733eca7fdc
2013-07-10 18:14:29 +00:00
drh
13447bf6c7 Experimental "PRAGMA query_only=BOOLEAN" statement that is able to turn
write capabilities on and off.

FossilOrigin-Name: ece960c496717a3a6c25526ef77dd76b08d607bc
2013-07-10 13:33:49 +00:00
drh
49afe3aaa0 Run progress callback checks less frequently in the main VDBE evaluation
loop.  This makes up for the extra CPU cycles used to increment the cycle
counter for SQLITE_STMTSTATUS_VM_STEP.

FossilOrigin-Name: 3e8b02011db2f393d4850115a471709b0a88594f
2013-07-10 03:05:14 +00:00
drh
580d7dc71d Adjust the costs in the xBestIndex function of the spellfix1 virtual table
to force the use of the MATCH term if it is available.

FossilOrigin-Name: f003bea9fe1b79e2b4d18fbef86c1d8f0f60e4b6
2013-07-09 15:56:44 +00:00
drh
1f10c28618 Modify several extensions to use the new exported function naming.
Fix some shared library compilation issues.

FossilOrigin-Name: 1e39f85077f1f2b96c3a656c5b6334bafb005908
2013-07-09 12:36:30 +00:00
drh
5e128b235b Make sure the schema is verified prior to processing a "WHERE 0" on the
first term of a compound SELECT statement.
Fix for ticket [490a4b723562429]

FossilOrigin-Name: 52a49cbc1621094b2fe2b021209b768d29e0426b
2013-07-09 03:04:32 +00:00
drh
e8c13bf262 Make sure an adequate number of digits are shown for binary-to-text rendering
of very small floating point values.

FossilOrigin-Name: 776e65f98ce80a8ed56cb73ef56c751702698612
2013-07-08 22:33:20 +00:00
drh
b5246e518b Fix an adverse interaction between the IS NOT NULL optimization (available
only with SQLITE_ENABLE_STAT3) and the transitive constraint processing.
Fix for ticket [d805526eae253]

FossilOrigin-Name: 3b30b75b342bb6b424ad2bf7cd841b2c88bdad44
2013-07-08 21:12:57 +00:00
drh
d4b473b2cf Add an optional 5th parameter to the next_char() function that is the
collating sequence to use for comparison.

FossilOrigin-Name: 9415db6ef255d27ca8473c17e65749a197c30455
2013-07-08 01:27:43 +00:00
dan
3492f4f9af Fixes for test cases running in the "mmap" permutation.
FossilOrigin-Name: cdb97d41abf4a3b8e22fa8ca9f3aab4a3f968d27
2013-07-06 18:07:57 +00:00
dan
789efdb966 Drop any existing mapping of the database file when exiting the pager "error state", as it may at this point be too large for the database file. Do not invoke file-control MMAP_LIMIT if the database file handle does not support xFetch and xUnfetch (on the grounds that xUnfetch(0) calls to invalidate the mapping cannot be made).
FossilOrigin-Name: 0ae7e75b215b0d75920769da9146c54ce2ad3ce0
2013-07-06 17:57:39 +00:00
dan
c1f19f95b8 Fix two test script problems revealed by permutations.test.
FossilOrigin-Name: 60cf7e44871ca8d2136ddad02188f0b9f9c380c1
2013-07-05 19:16:58 +00:00
dan
d903154e3a Replace an erroneous SQLITE_OMIT_VIRTUAL_TABLE in vdbeaux.c with SQLITE_OMIT_WAL. Also fix some test script problems.
FossilOrigin-Name: ff8c3f7840a0a8d87453b94b9884ee26d5d92da5
2013-07-05 16:54:30 +00:00
dan
b2cfc14670 Add missing "static" qualifier to functions in where.c.
FossilOrigin-Name: 5c906e914b63eb00e62c6c2a535e234a75d95030
2013-07-05 11:10:54 +00:00
dan
ed20073b8d Make a couple of implicit casts explicit to fix compiler warnings.
FossilOrigin-Name: 9676280a9387b8bfba82cfc0087318863d05d4f3
2013-07-05 10:46:08 +00:00
mistachkin
049d487e2e Modify several extensions to use the new exported function naming. Fix some shared library compilation issues.
FossilOrigin-Name: f2ab8747825ab5131ffab174aa0ffe5e474f6811
2013-07-04 23:53:56 +00:00
drh
0d08b93673 Remove a surplus local variable
FossilOrigin-Name: 91bc840eea2099273bd2c5d41a8410d628986643
2013-07-02 15:25:22 +00:00
dan
51576f4791 Fix a minor typo in a comment in where.c.
FossilOrigin-Name: 4a9d51e792d7c4297bd18af7b7c757c93a3a1cd1
2013-07-02 10:06:15 +00:00
drh
aaf528e09f Fix harmless typos in comments of two extensions.
FossilOrigin-Name: 1c3ed47b71844d062c4e9a315f2f368b382684cc
2013-07-02 00:06:31 +00:00
drh
05ef18c84d Add a query planner test case submitted by Elan Feingold and
based on the Plex project.

FossilOrigin-Name: 3d49c593dc12d72323ca525372a15e58c591940b
2013-07-01 20:02:31 +00:00
drh
cdc2e43d8e Add a missing test that prevented double LEFT JOINs with transitive
constraints from working correctly.  Fix for ticket [868145d012].

FossilOrigin-Name: 72919ec34f0d663d551c1070285ad93b932bcb74
2013-07-01 17:27:19 +00:00
drh
9443342ee9 Further minor comment corrections and enhancements in where.c.
FossilOrigin-Name: 0d68d4d018e73dcbbc08786071aac6228fca1a8c
2013-07-01 11:05:50 +00:00
drh
be4fe3afc0 Make a trivial comment fix in where.c.
FossilOrigin-Name: 0ffaab3b9c97f4dba0f0ca6e146c8dc2775f7b1c
2013-07-01 10:38:35 +00:00
drh
d0a64dc75a Fix an issue in the command-line shell with CSV import of rows with
empty columns.

FossilOrigin-Name: 60b65e5ee3828c2a814bf035b57b3e8681af9397
2013-06-30 20:24:26 +00:00
drh
12cd6cfd6e Fix the build of the command-line shell on windows. Windows uses "_pclose"
rather than "pclose" as the pointer to the function that closes a popen pipe.

FossilOrigin-Name: b003b2b2b6ddbfc6ec508b47904e6d095c5f6940
2013-06-29 15:40:22 +00:00
drh
8d56e2059c Issue the new SQLITE_WARNING_AUTOINDEX warning on the SQLite log whenever
an automatic index is created.

FossilOrigin-Name: 338826ef3f8a209b14f8d42370855cab9ac9ed45
2013-06-28 23:55:45 +00:00
drh
986b38792f Add the SQLITE_DEFAULT_AUTOMATIC_INDEX compile-time option, which if set to
zero turns automatic indices off by default.  Increase the estimated cost
of an automatic index.  Additional minor refactoring of the automatic
index code.

FossilOrigin-Name: 459b3179023c2c45994ea4acbf34ed5f87cf3c18
2013-06-28 21:12:20 +00:00
dan
c0537fe59b Allow read transactions to be freely opened and closed by SQL statements run from within the implementation of user-functions if the user-function is called by a SELECT statement that does not access any database tables (e.g. "SELECT user_function();").
FossilOrigin-Name: f308c4851726b4b75636f714466f2314f56e3ec0
2013-06-28 19:41:43 +00:00
drh
40aa936f7f Add a bit to the SQLITE_TESTCTRL_OPTIMIZATIONS option for sqlite3_file_control()
that will disable the use of SQLITE_STAT3 information in the query planner.

FossilOrigin-Name: 60c19b86797fb8a37f175545929883ebeff7f307
2013-06-28 17:29:25 +00:00