]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoMinor change to TEA extension docs in an attempt to make links work correctly. teaDoc
mistachkin [Fri, 31 Jan 2014 06:35:37 +0000 (06:35 +0000)] 
Minor change to TEA extension docs in an attempt to make links work correctly.

FossilOrigin-Name: 492585c8208457120dde24f5fbf4db7e4e10ae73

11 years agoUpdate evidence marks on SELECT tests. Comment changes only.
drh [Thu, 30 Jan 2014 17:47:02 +0000 (17:47 +0000)] 
Update evidence marks on SELECT tests.  Comment changes only.
No changes to code or tests.

FossilOrigin-Name: 1973d80e474cb95d053e04415b22154897d4d710

11 years agoFix requirements marks only. No changes to code or tests.
drh [Thu, 30 Jan 2014 15:03:50 +0000 (15:03 +0000)] 
Fix requirements marks only.  No changes to code or tests.

FossilOrigin-Name: 4a34378b9b02e463081729186dcb9b0404dbcd06

11 years agoUpdate a requirement mark and add some additional test cases to cover
drh [Thu, 30 Jan 2014 14:10:00 +0000 (14:10 +0000)] 
Update a requirement mark and add some additional test cases to cover
the requirement associated with ORDER BY and LIMIT on compound SELECT
statements.

FossilOrigin-Name: 8560091e85f2f99a24810648868bf2e081c32698

11 years agoEnhance the MSVC makefile for better debugging symbol support.
mistachkin [Thu, 30 Jan 2014 12:45:32 +0000 (12:45 +0000)] 
Enhance the MSVC makefile for better debugging symbol support.

FossilOrigin-Name: c9bef0f29a5a7f04914d80e58105104babd4168c

11 years agoDo not run test script mmapfault.test as part of the "inmemory_journal" permutation...
dan [Thu, 30 Jan 2014 12:16:23 +0000 (12:16 +0000)] 
Do not run test script mmapfault.test as part of the "inmemory_journal" permutation test.

FossilOrigin-Name: b222b61a98dc1f3c2c48ea06efe7d82d9fcf4d75

11 years agoEnhance the MSVC makefile for better debugging symbol support. msvcDebug
mistachkin [Thu, 30 Jan 2014 11:12:52 +0000 (11:12 +0000)] 
Enhance the MSVC makefile for better debugging symbol support.

FossilOrigin-Name: c723ec2784d6b60c9781a435c84800b2bc7818d5

11 years agoMake sure that sqlite3SelectDup() initializes the nSelectRow of the
drh [Wed, 29 Jan 2014 01:46:12 +0000 (01:46 +0000)] 
Make sure that sqlite3SelectDup() initializes the nSelectRow of the
duplicate Select object.

FossilOrigin-Name: 5bb29b82109224a2ad02920658fabd8fb0f27b3f

11 years agoFix harmless compiler warnings in the showdb utility program.
drh [Tue, 28 Jan 2014 20:36:22 +0000 (20:36 +0000)] 
Fix harmless compiler warnings in the showdb utility program.

FossilOrigin-Name: 27c27daa3324b7c9323acfb972330367630bb64e

11 years agoFix a potential over-size and hence undefined shift operation.
drh [Tue, 28 Jan 2014 18:53:29 +0000 (18:53 +0000)] 
Fix a potential over-size and hence undefined shift operation.

FossilOrigin-Name: 6379b0729521146bc4ec27a9924492c7dc1d8a31

11 years agoMinor bugfix in main.c so that the library builds with SQLITE_OMIT_WSD defined.
dan [Tue, 28 Jan 2014 17:49:13 +0000 (17:49 +0000)] 
Minor bugfix in main.c so that the library builds with SQLITE_OMIT_WSD defined.

FossilOrigin-Name: 5e3b9ecc7b2b2e50952de819b99bafdb7b9ff59e

11 years agoFix a couple of problems with new test scripts causing the permutations test to fail.
dan [Mon, 27 Jan 2014 16:35:15 +0000 (16:35 +0000)] 
Fix a couple of problems with new test scripts causing the permutations test to fail.

FossilOrigin-Name: 48d736c0ee1ac0879bd12d2f1901f208e87e538a

11 years agoUpdate some requirements marks to conform with improvements
drh [Mon, 27 Jan 2014 15:02:07 +0000 (15:02 +0000)] 
Update some requirements marks to conform with improvements
in the documentation.

FossilOrigin-Name: be1acb610f7e594b417dd8409b7a7aa8f3af5f77

11 years agoFix a problem in pagerfault.test causing an assert() to fail.
dan [Mon, 27 Jan 2014 14:19:22 +0000 (14:19 +0000)] 
Fix a problem in pagerfault.test causing an assert() to fail.

FossilOrigin-Name: ba8d2d507f82e2baaceadcf7ac6d71bb91f7e06b

11 years agoFix (harmless) duplicate variable declaration.
drh [Mon, 27 Jan 2014 13:58:58 +0000 (13:58 +0000)] 
Fix (harmless) duplicate variable declaration.

FossilOrigin-Name: 94ed9bc4207873e0f3f8114009002f56d5aff359

11 years agoFix some problems in test scripts. No code changes.
dan [Mon, 27 Jan 2014 08:48:10 +0000 (08:48 +0000)] 
Fix some problems in test scripts. No code changes.

FossilOrigin-Name: 08acfc65877e207f1a62d31a14afb4add20c4c35

11 years agoFix a problem causing SQLITE_OMIT_COMPOUND_SELECT builds to fail.
dan [Sat, 25 Jan 2014 12:16:53 +0000 (12:16 +0000)] 
Fix a problem causing SQLITE_OMIT_COMPOUND_SELECT builds to fail.

FossilOrigin-Name: b30db0ac3096b43d55a6da40cafc7de569082bf8

11 years agoFixes for various clang warnings.
drh [Fri, 24 Jan 2014 22:58:00 +0000 (22:58 +0000)] 
Fixes for various clang warnings.

FossilOrigin-Name: 87bf60637e5863c54c5e2d05aaaca0835b7aace8

11 years agoSelect collation sequences for ORDER BY expressions attached to recursive CTEs in...
dan [Fri, 24 Jan 2014 20:37:18 +0000 (20:37 +0000)] 
Select collation sequences for ORDER BY expressions attached to recursive CTEs in the same way as they are selected for other compound SELECT statements.

FossilOrigin-Name: 9554519c126c5e714421a82fd2e8aa9b19e11493

11 years agoFix harmless compiler warnings in the Tcl interface.
mistachkin [Fri, 24 Jan 2014 17:03:55 +0000 (17:03 +0000)] 
Fix harmless compiler warnings in the Tcl interface.

FossilOrigin-Name: 35bc81f5ad4503c0db03127ba3c2ee4ce5227448

11 years agoAdd test cases for LIMIT and ORDER BY on recursive CTEs.
dan [Fri, 24 Jan 2014 16:57:42 +0000 (16:57 +0000)] 
Add test cases for LIMIT and ORDER BY on recursive CTEs.

FossilOrigin-Name: 67d6c42d44cb191368ce20f553b32fcb14bfc4d7

11 years agoUse an unsigned integer to accumulate the string hash. Avoids compiler
drh [Fri, 24 Jan 2014 16:36:18 +0000 (16:36 +0000)] 
Use an unsigned integer to accumulate the string hash.  Avoids compiler
warnings.

FossilOrigin-Name: b1824344ea4918a13abbda4a3b7134d35fd867c4

11 years agoAdd a few more CTE test cases to closure.test.
drh [Fri, 24 Jan 2014 15:42:51 +0000 (15:42 +0000)] 
Add a few more CTE test cases to closure.test.

FossilOrigin-Name: 1b6405d9788c1bb89761b2bcdce560a5020ff503

11 years agoAdd test cases that compare the performance of the transitive_closure
drh [Fri, 24 Jan 2014 14:37:44 +0000 (14:37 +0000)] 
Add test cases that compare the performance of the transitive_closure
virtual table again common table expressions for walking a tree.

FossilOrigin-Name: 9a23f020e8ed0e7a1ad227b4ab379fdf5e2de222

11 years agoAdd test cases showing the use of ORDER BY on a recursive query to control
drh [Fri, 24 Jan 2014 11:16:01 +0000 (11:16 +0000)] 
Add test cases showing the use of ORDER BY on a recursive query to control
depth-first versus breath-first search of a tree.

FossilOrigin-Name: 83b0b2916589db0184435dbd4c304387f393ed60

11 years agoModifications to test files to omit any tests that intentionally access out-of-bounds...
dan [Thu, 23 Jan 2014 14:44:08 +0000 (14:44 +0000)] 
Modifications to test files to omit any tests that intentionally access out-of-bounds locations in clang -fsanitize=address builds.

FossilOrigin-Name: f4a701d55f5c4e1e62ed64b779ad4fff89dd31b7

11 years agoAvoid an extra seek when inserting records into the epheremal index used to ensure...
dan [Wed, 22 Jan 2014 19:23:30 +0000 (19:23 +0000)] 
Avoid an extra seek when inserting records into the epheremal index used to ensure that rows returned by UNION recursive queries are unique.

FossilOrigin-Name: 72c4b3f07a3faacb5b62d5bc374b4e125a0bd8b3

11 years agoFix harmless compiler warnings.
drh [Wed, 22 Jan 2014 18:31:27 +0000 (18:31 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: dea2ca6a159d5dcfd8deceedf1c2a73fb4ac1cfc

11 years agoChange the WITH RECURSIVE implementation to use a queue instead of a pair of
drh [Wed, 22 Jan 2014 18:16:27 +0000 (18:16 +0000)] 
Change the WITH RECURSIVE implementation to use a queue instead of a pair of
tables.  Add support for ORDER BY, LIMIT, and OFFSET on recursive queries.

FossilOrigin-Name: b6cea42006910d590373e8f9e296d7672edb114b

11 years agoAdd support for LIMIT and OFFSET in a recursive query. cte-via-queue
drh [Wed, 22 Jan 2014 18:07:04 +0000 (18:07 +0000)] 
Add support for LIMIT and OFFSET in a recursive query.

FossilOrigin-Name: 1945484e6b9769c1943f750f5b09860417fb190a

11 years agoUpdate the spellfix virtual table to optimize queries of the form "SELECT ... FROM...
dan [Wed, 22 Jan 2014 17:43:16 +0000 (17:43 +0000)] 
Update the spellfix virtual table to optimize queries of the form "SELECT ... FROM tbl WHERE rowid=?".

FossilOrigin-Name: a0ba55ff0596c5f15e9cdb254c68ef50df2dfaad

11 years agoGet ORDER BY working for recursive queries.
drh [Wed, 22 Jan 2014 17:28:35 +0000 (17:28 +0000)] 
Get ORDER BY working for recursive queries.

FossilOrigin-Name: 37b343b01841b338954ddfa9b76d92aa50037aec

11 years agoAdd new SelectDest codes, SRT_Queue and SRT_DistQueue in anticipation of adding
drh [Wed, 22 Jan 2014 13:35:53 +0000 (13:35 +0000)] 
Add new SelectDest codes, SRT_Queue and SRT_DistQueue in anticipation of adding
ORDER BY support on recursive queries.  Factor out the recursive query
code generator into a separate procedure.

FossilOrigin-Name: 3eb5f9f8d6ac1ee145cb4119087c516f66fe1456

11 years agoFix a typo in a comment. No changes to code or tests.
dan [Wed, 22 Jan 2014 10:22:25 +0000 (10:22 +0000)] 
Fix a typo in a comment. No changes to code or tests.

FossilOrigin-Name: cceacc0e79c4e54682daddf2056c6bb8e88d9484

11 years agoRemove an unnecessary parameter from selectInnerLoop(). Clean up comments.
drh [Wed, 22 Jan 2014 00:23:49 +0000 (00:23 +0000)] 
Remove an unnecessary parameter from selectInnerLoop().  Clean up comments.

FossilOrigin-Name: 5e6c4a55f6df30da9dbaa8170f3223613cc86f65

11 years agoChange the recursive common table expression algorithm to use a queue instead
drh [Tue, 21 Jan 2014 22:25:45 +0000 (22:25 +0000)] 
Change the recursive common table expression algorithm to use a queue instead
of a pair of tables.  Runs about 25% faster on the sudoku solver query.
The OP_SwapCursors opcode is no longer required.  The current implementation
uses just a fifo, but the plan is to change it into a queue that will support
ORDER BY and LIMIT in a recursive query.

FossilOrigin-Name: b2671e1133d2f1fbd36e7cd4b86d6cc7b528aa97

11 years agoRemove the undocumented requirement for applications that use an SQLITE_ENABLE_SQLLOG...
dan [Tue, 21 Jan 2014 15:04:47 +0000 (15:04 +0000)] 
Remove the undocumented requirement for applications that use an SQLITE_ENABLE_SQLLOG build to define a sqlite3_init_sqllog() function.

FossilOrigin-Name: 5e43bf013253921e4dfbe71de11ee7ed4b3e7eae

11 years agoIn where.c, do not allocate space in sqlite3_index_info structures for the internal...
dan [Mon, 20 Jan 2014 19:55:33 +0000 (19:55 +0000)] 
In where.c, do not allocate space in sqlite3_index_info structures for the internal WHERE clause "terms" generated to record column equivalencies.

FossilOrigin-Name: 7d9e22187daaa3160b875a1df17b924969bf718e

11 years agoHandle a few obscure problems that could manifest if a database corrupted in a certai...
dan [Mon, 20 Jan 2014 18:25:44 +0000 (18:25 +0000)] 
Handle a few obscure problems that could manifest if a database corrupted in a certain way was written by a connection in the middle of a SELECT statement on the same db.

FossilOrigin-Name: eba8a564e62f84a9620008beead80081fe90a1b7

11 years agoRemove an unused #define and add an assert(), both associated with WITH logic.
drh [Mon, 20 Jan 2014 14:58:55 +0000 (14:58 +0000)] 
Remove an unused #define and add an assert(), both associated with WITH logic.

FossilOrigin-Name: a06235e0f6aa1e8fefa3f2873ee035eac9dac750

11 years agoDo not run the tests in with2.test with SQLITE_OMIT_CTE builds.
dan [Mon, 20 Jan 2014 14:17:08 +0000 (14:17 +0000)] 
Do not run the tests in with2.test with SQLITE_OMIT_CTE builds.

FossilOrigin-Name: 8a973912e98c9b1bb9d3f914527d35c1e7f2011a

11 years agoAdd a sudoku solver to the recursive query tests in with1.test.
drh [Sat, 18 Jan 2014 18:33:44 +0000 (18:33 +0000)] 
Add a sudoku solver to the recursive query tests in with1.test.

FossilOrigin-Name: 679eff8759aa25368b977c0d26b78a9fcd9486f5

11 years agoAdd extra test cases. No changes to code.
dan [Sat, 18 Jan 2014 15:59:35 +0000 (15:59 +0000)] 
Add extra test cases. No changes to code.

FossilOrigin-Name: d38d485e581dab99a3ee6b348da8ddaf9b379ff2

11 years agoAdd asserts() for a couple of unreachable conditions. Add the Mandelbrot Set
drh [Sat, 18 Jan 2014 15:22:53 +0000 (15:22 +0000)] 
Add asserts() for a couple of unreachable conditions.  Add the Mandelbrot Set
query as a test case.

FossilOrigin-Name: 2ad4583c0cc7988f0dfe78fd0a2eb0fdb92d835a

11 years agoAvoid spurious "no such table" errors in statements of the form "INSERT INTO tbl...
dan [Sat, 18 Jan 2014 08:27:02 +0000 (08:27 +0000)] 
Avoid spurious "no such table" errors in statements of the form "INSERT INTO tbl WITH xxx AS (...) SELECT * FROM xxx".

FossilOrigin-Name: cccff8a0b427feb05cc8952a765b829e731394fd

11 years agoAdd extra tests to with2.test.
dan [Fri, 17 Jan 2014 20:36:17 +0000 (20:36 +0000)] 
Add extra tests to with2.test.

FossilOrigin-Name: eecc325afd72e37d7d565787c8cea68aad6d7a5c

11 years agoMinor simplification of error message text for a couple of errors associated
drh [Fri, 17 Jan 2014 18:34:28 +0000 (18:34 +0000)] 
Minor simplification of error message text for a couple of errors associated
with WITH clause processing.

FossilOrigin-Name: 2031004d960526d6426d50d7b732f37b281534e2

11 years agoResolve table names within CTEs in the context in which the CTE is declared, not...
dan [Fri, 17 Jan 2014 17:40:46 +0000 (17:40 +0000)] 
Resolve table names within CTEs in the context in which the CTE is declared, not the context in which it is used.

FossilOrigin-Name: a7323838bbd354a1c2f339e5e0f164f0eada47b3

11 years agoAdd tests that verify that keywords WITH, WITHOUT, and RECURSIVE can still
drh [Fri, 17 Jan 2014 16:19:01 +0000 (16:19 +0000)] 
Add tests that verify that keywords WITH, WITHOUT, and RECURSIVE can still
be used as table and column names.

FossilOrigin-Name: 9ca18a0191db6a9b0763e2f0b3b35d23099fb71b

11 years agoFix a compiler warning in selectPopWith().
drh [Fri, 17 Jan 2014 15:27:00 +0000 (15:27 +0000)] 
Fix a compiler warning in selectPopWith().

FossilOrigin-Name: c8eb11635a356182611ce2ccb8f358b6c453486e

11 years agoAdd support for common table expressions (WITH clauses).
dan [Fri, 17 Jan 2014 15:15:10 +0000 (15:15 +0000)] 
Add support for common table expressions (WITH clauses).

FossilOrigin-Name: 0171e3bb4f663a9414b0e8b64c87b5d0683855b5

11 years agoFix some problems to do with WITH clauses and name resolution. common-table-expr
dan [Fri, 17 Jan 2014 14:59:27 +0000 (14:59 +0000)] 
Fix some problems to do with WITH clauses and name resolution.

FossilOrigin-Name: 6a549187ed8b5ed50daefa676ff666ae2ed43346

11 years agoRemove some code from resolve.c that was only required for recursive cte references...
dan [Fri, 17 Jan 2014 11:48:24 +0000 (11:48 +0000)] 
Remove some code from resolve.c that was only required for recursive cte references in sub-queries. Also a stray "finish_test" command in pagerfault.test.

FossilOrigin-Name: f68c6c4d36481526a9348244adc571ea282dc9eb

11 years agoAdd the ability for the authorizer callback to disallow recursive
drh [Thu, 16 Jan 2014 22:40:02 +0000 (22:40 +0000)] 
Add the ability for the authorizer callback to disallow recursive
queries.

FossilOrigin-Name: 9efc120a1548c03f3d8aabbadf1050ff2a119c31

11 years agoTweaks to error message text.
drh [Thu, 16 Jan 2014 21:59:51 +0000 (21:59 +0000)] 
Tweaks to error message text.

FossilOrigin-Name: 090a77d97808b86d1e9f5c63c743a2b159a15f5d

11 years agoImprove the error messages used to report illegal recursive cte references.
dan [Thu, 16 Jan 2014 21:02:02 +0000 (21:02 +0000)] 
Improve the error messages used to report illegal recursive cte references.

FossilOrigin-Name: 54eee9fe99290e59469bd3e1a66bb749887d37ee

11 years agoAllow only a single recursive reference in a recursive CTE. Also require that this...
dan [Thu, 16 Jan 2014 18:34:33 +0000 (18:34 +0000)] 
Allow only a single recursive reference in a recursive CTE. Also require that this reference is not part of a sub-query.

FossilOrigin-Name: a296b73360d34c9364eceb2cc09a9a92adc4abb8

11 years agoAlways use available indices to optimize LIKE operators even if the pattern
drh [Thu, 16 Jan 2014 15:31:41 +0000 (15:31 +0000)] 
Always use available indices to optimize LIKE operators even if the pattern
of the LIKE operator has a COLLATE modifier.  This fixes an ineffiency that
was introduced into 3.7.15 by check-in [8542e6180d4] on 2012-12-08.

FossilOrigin-Name: 16bd54783a3f5531c55564ddefdada657c078eb0

11 years agoDisable the flattening optimization if the parent query is the recursive part of...
dan [Thu, 16 Jan 2014 10:58:39 +0000 (10:58 +0000)] 
Disable the flattening optimization if the parent query is the recursive part of a recursive CTE and the sub-query is a compound query.

FossilOrigin-Name: 6bfa387e82de47ca1f40225fe28d873e29d6f481

11 years agoMerge trunk changes. Fix a possible NULL-pointer deference in WITH clause
drh [Thu, 16 Jan 2014 04:37:13 +0000 (04:37 +0000)] 
Merge trunk changes.  Fix a possible NULL-pointer deference in WITH clause
name resolution.

FossilOrigin-Name: 7f953b568baa3eede0b9c144be0b9bc86496341a

11 years agoRemove an ALWAYS() that is no longer always true.
drh [Wed, 15 Jan 2014 20:10:15 +0000 (20:10 +0000)] 
Remove an ALWAYS() that is no longer always true.

FossilOrigin-Name: c95823cd451f7721174393817a801403647467db

11 years agoFixes so that SQLITE_OMIT_CTE builds work.
dan [Wed, 15 Jan 2014 19:42:23 +0000 (19:42 +0000)] 
Fixes so that SQLITE_OMIT_CTE builds work.

FossilOrigin-Name: 3908e2ea2e7e5f466cbbbffdc27e0fe8dc9751ac

11 years agoFurther comments on WITH-clause processing routines in select.c.
drh [Wed, 15 Jan 2014 18:35:52 +0000 (18:35 +0000)] 
Further comments on WITH-clause processing routines in select.c.

FossilOrigin-Name: c948384dfdd9f68a832d5a452af44f35337f66e7

11 years agoAdd a header comment to the searchWith() routine.
drh [Wed, 15 Jan 2014 18:23:00 +0000 (18:23 +0000)] 
Add a header comment to the searchWith() routine.

FossilOrigin-Name: d9ae0f5d9f8230ca7ca10ebed300e2f6635a0614

11 years agoDisable automatic indices on recursive CTE references.
dan [Wed, 15 Jan 2014 18:21:41 +0000 (18:21 +0000)] 
Disable automatic indices on recursive CTE references.

FossilOrigin-Name: 28aa6db8c878655255dbfb618f8d65be78e3d7e5

11 years agoWhen resolving names, consider a reference to a recursive CTE column as equivalent...
dan [Wed, 15 Jan 2014 18:12:00 +0000 (18:12 +0000)] 
When resolving names, consider a reference to a recursive CTE column as equivalent to a reference to the outermost name-context. This ensures that correlated sub-queries are correctly identified as such.

FossilOrigin-Name: 61be2da0ae623c1572819481508b044e9d32f294

11 years agoReturn an error if a CTE specifies a different number of columns than its SELECT...
dan [Wed, 15 Jan 2014 15:27:51 +0000 (15:27 +0000)] 
Return an error if a CTE specifies a different number of columns than its SELECT statement returns.

FossilOrigin-Name: 9a514b50e4b01f109fbdb0aabcbfe1ddab129b44

11 years agoDon't try to verify the schema of transient table (such as generated inside
drh [Wed, 15 Jan 2014 14:40:41 +0000 (14:40 +0000)] 
Don't try to verify the schema of transient table (such as generated inside
a WITH clause) when generating code for "IN table" operators.

FossilOrigin-Name: 860aa936634a60d68e3954fc408a96a9260394e0

11 years agoDisable the flattening optimization if the sub-query is a recursive CTE.
dan [Wed, 15 Jan 2014 14:17:31 +0000 (14:17 +0000)] 
Disable the flattening optimization if the sub-query is a recursive CTE.

FossilOrigin-Name: 9472f6d820a7fb233936d9b8f7a39c9d4c4d6d73

11 years agoUse the user-supplied table name in WITH RECURSIVE tables as the internal
drh [Wed, 15 Jan 2014 02:40:11 +0000 (02:40 +0000)] 
Use the user-supplied table name in WITH RECURSIVE tables as the internal
name of the table and the name of the table in VDBE comments.

FossilOrigin-Name: a29330238be6366444269a0b1b328475b2d01ae2

11 years agoAdd code to handle recursive CTEs.
dan [Tue, 14 Jan 2014 20:14:09 +0000 (20:14 +0000)] 
Add code to handle recursive CTEs.

FossilOrigin-Name: a5c2a54a07d35166911abc792008c05dea897742

11 years agoFix harmless compiler warning in LEMON.
mistachkin [Tue, 14 Jan 2014 10:17:21 +0000 (10:17 +0000)] 
Fix harmless compiler warning in LEMON.

FossilOrigin-Name: f61a70589ac7e05008a362bd9d5b7bde5d07a758

11 years agoFor the Win32 VFS, defining winShmMutexHeld should be controlled by NDEBUG, not SQLIT...
mistachkin [Tue, 14 Jan 2014 10:17:02 +0000 (10:17 +0000)] 
For the Win32 VFS, defining winShmMutexHeld should be controlled by NDEBUG, not SQLITE_DEBUG.

FossilOrigin-Name: 1e131094b522103a0829f72193b067b04e42ce82

11 years agoIn the command-line shell, defend against a NULL-pointer dereference in the
drh [Mon, 13 Jan 2014 20:38:35 +0000 (20:38 +0000)] 
In the command-line shell, defend against a NULL-pointer dereference in the
case where sqlite3_column_name() returns NULL (as might happen following an
OOM error).

FossilOrigin-Name: ac15455abcb9bdb88b53129348668a1442f6899f

11 years agoFor statements of just an unadorned VALUES clause, assign column names
drh [Mon, 13 Jan 2014 20:32:18 +0000 (20:32 +0000)] 
For statements of just an unadorned VALUES clause, assign column names
as "columnN" for increasing whole numbers N.

FossilOrigin-Name: 260587d2727f66d7fd65ef672ee46c92024f1d30

11 years agoFix some memory leaks and crashes that could follow an OOM condition during WITH...
dan [Mon, 13 Jan 2014 16:36:40 +0000 (16:36 +0000)] 
Fix some memory leaks and crashes that could follow an OOM condition during WITH clause parsing.

FossilOrigin-Name: 8839850c44a8938883e493eacd752fa686e542df

11 years agoAdd code to handle non-recursive CTEs in the same way as SQL views.
dan [Mon, 13 Jan 2014 15:12:23 +0000 (15:12 +0000)] 
Add code to handle non-recursive CTEs in the same way as SQL views.

FossilOrigin-Name: a26f399ba485e8127c276c5f103ec6c555e11734

11 years agoUpdate the parser so that sub-queries and CTEs may have WITH clauses.
dan [Sat, 11 Jan 2014 19:19:36 +0000 (19:19 +0000)] 
Update the parser so that sub-queries and CTEs may have WITH clauses.

FossilOrigin-Name: 704d3931b855562a619769955969d439c42ca406

11 years agoParse common table expressions. But do not do anything with them (yet).
drh [Sat, 11 Jan 2014 13:22:17 +0000 (13:22 +0000)] 
Parse common table expressions.  But do not do anything with them (yet).

FossilOrigin-Name: da98b7205eb3d7ec2ddbf8a8e24eee0b2ff499a5

11 years agoIn LEMON, limit the size of the grammar file to 100MB. This ensures that
drh [Sat, 11 Jan 2014 12:52:25 +0000 (12:52 +0000)] 
In LEMON, limit the size of the grammar file to 100MB.  This ensures that
the program will never experience integer overflow.  To be doubly sure,
use calloc() instead of malloc() when allocating arrays.

FossilOrigin-Name: 29ba458d849ad8864711cbe59fb10447a947e06a

11 years agoOptimizations to the SQL language grammar that result in a small size
drh [Sat, 11 Jan 2014 03:54:05 +0000 (03:54 +0000)] 
Optimizations to the SQL language grammar that result in a small size
reduction and speed increase.

FossilOrigin-Name: cb5d1f83e0a33d546d4c0cb817ef1f8440d1f738

11 years agoAdd the "%token_class" directive to the LEMON parser generator. This opens up
drh [Sat, 11 Jan 2014 03:27:37 +0000 (03:27 +0000)] 
Add the "%token_class" directive to the LEMON parser generator.  This opens up
the possibility of simplifying the parser.  Also remove all calls to
sprintf(), strcpy(), and strcat() from LEMON to avoid compiler warnings
on OpenBSD.  (Aside:  It is this change to avoid harmless compiler warnings
that was the cause of the reason spat of bugs.)

FossilOrigin-Name: 8eb48c04bd0a14031488b3160fde67307eb8b35d

11 years agoIn LEMON, fix a bug in the text formatter introduced by the previous lemon-updates
drh [Sat, 11 Jan 2014 03:06:18 +0000 (03:06 +0000)] 
In LEMON, fix a bug in the text formatter introduced by the previous
commit.  Also add the new "%token_class" directive for defining symbolic
names that stand any one of a collection of tokens.

FossilOrigin-Name: da7890ca6b1d8e511377a469047120220e8c3b2d

11 years agoDo not use sprintf(), strcpy() or strcat() in the implementation of the
drh [Fri, 10 Jan 2014 23:21:00 +0000 (23:21 +0000)] 
Do not use sprintf(), strcpy() or strcat() in the implementation of the
lemon parser generator tool, to avoid compiler warnings in OpenBSD.

FossilOrigin-Name: e43c522dde01e134f1adc94f534d2b3eda74afc2

11 years agoRemove unused structure definition from parse.y.
drh [Fri, 10 Jan 2014 20:51:16 +0000 (20:51 +0000)] 
Remove unused structure definition from parse.y.

FossilOrigin-Name: 7f1e7ae313c7625ef2623d78883dce776eecca30

11 years agoAllow a VALUES clause to be used any place that a SELECT statement can be
drh [Fri, 10 Jan 2014 20:46:55 +0000 (20:46 +0000)] 
Allow a VALUES clause to be used any place that a SELECT statement can be
used.

FossilOrigin-Name: c9ea7d199f06a7801ab639e7ac98ebeb98706f24

11 years agoFix CREATE TABLE ... AS so that it works with column names that are empty
drh [Fri, 10 Jan 2014 20:38:12 +0000 (20:38 +0000)] 
Fix CREATE TABLE ... AS so that it works with column names that are empty
strings.

FossilOrigin-Name: 632045f21c553e10f59a14c772d50d7824ca0c2c

11 years agoFix another harmless compiler warning in unixUnfetch().
dan [Fri, 10 Jan 2014 16:40:21 +0000 (16:40 +0000)] 
Fix another harmless compiler warning in unixUnfetch().

FossilOrigin-Name: 0484549bb82ca5246488330c8d266e429ccd19b9

11 years agoFix harmless compiler warning in unixUnfetch().
drh [Thu, 9 Jan 2014 13:39:07 +0000 (13:39 +0000)] 
Fix harmless compiler warning in unixUnfetch().

FossilOrigin-Name: 618f248f4ea9fb0b6ff019a4c2cd72857389301f

11 years agoFix an typo that breaks the build when SQLITE_ENABLE_TREE_EXPLAIN is defined.
drh [Sat, 4 Jan 2014 20:00:14 +0000 (20:00 +0000)] 
Fix an typo that breaks the build when SQLITE_ENABLE_TREE_EXPLAIN is defined.

FossilOrigin-Name: f461e2b3973d0fe6a7b8cb7a3aaab8a30b3e16c0

11 years agoAdd the usual "fts3" prefix to new static method setEstimatedRows() in fts3.c. This...
dan [Sat, 4 Jan 2014 19:58:29 +0000 (19:58 +0000)] 
Add the usual "fts3" prefix to new static method setEstimatedRows() in fts3.c. This fixes a problem when compiling the amalgamation, as the r-tree module also contains a static method named setEstimatedRows.

FossilOrigin-Name: d6fcfc8890489b942e5b3f1bc271835d77c5ef96

11 years agoAvoid redundant register loads during index key generation when doing a
drh [Sat, 4 Jan 2014 19:27:05 +0000 (19:27 +0000)] 
Avoid redundant register loads during index key generation when doing a
DELETE or INTEGRITY_CHECK on a table with multiple indices.

FossilOrigin-Name: 8f6e6149a165f516be6395fd753e163d52ffd52e

11 years agoOmit OP_Close operations that occur immediately prior to OP_Halt and which
drh [Sat, 4 Jan 2014 16:49:02 +0000 (16:49 +0000)] 
Omit OP_Close operations that occur immediately prior to OP_Halt and which
cannot be jumped over.

FossilOrigin-Name: 874b7e9999811c288ad41d07709f88e458d2d497

11 years agoImprovements to the column-cache for nested AND/OR operators.
drh [Sat, 4 Jan 2014 15:17:04 +0000 (15:17 +0000)] 
Improvements to the column-cache for nested AND/OR operators.

FossilOrigin-Name: 4e725f53131d3584319c710c8710a068989543c6

11 years agoHave FTS assign extremely high costs to plans that feature unusable MATCH constraints...
dan [Sat, 4 Jan 2014 14:46:39 +0000 (14:46 +0000)] 
Have FTS assign extremely high costs to plans that feature unusable MATCH constraints. This discourages the planner from choosing such plans, which lead to "unable to use function MATCH in the requested context" errors.

FossilOrigin-Name: fa8be488a3ad290722dae7a1a7396c77277b2149

11 years agoInstead of having the planner ignore plans with unusable MATCH constraints, have... avoid-unusable-match
dan [Sat, 4 Jan 2014 14:42:14 +0000 (14:42 +0000)] 
Instead of having the planner ignore plans with unusable MATCH constraints, have FTS assign extremely high costs to such plans in order to discourage the planner from using them.

FossilOrigin-Name: 24f84b38131866f7b435ffe641bb2f6991a70db2

11 years agoHave the planner detect cases where a MATCH constraint is applied to a virtual table...
dan [Sat, 4 Jan 2014 14:16:06 +0000 (14:16 +0000)] 
Have the planner detect cases where a MATCH constraint is applied to a virtual table, and ignore any plans that do not allow the virtual table implementation to implement the MATCH filtering.

FossilOrigin-Name: 19f3208b26597625728d1ef716d4e44407cf96ac

11 years agoAvoid some unnecessary OP_SCopy operations when inserting into a table
drh [Fri, 3 Jan 2014 16:03:43 +0000 (16:03 +0000)] 
Avoid some unnecessary OP_SCopy operations when inserting into a table
with multiple indices.

FossilOrigin-Name: 429018b19cb525a4bb0843d20955457b53900d4b

11 years agoTry to factor constant subcomponents of the WHERE clause out of the loop.
drh [Thu, 2 Jan 2014 21:05:10 +0000 (21:05 +0000)] 
Try to factor constant subcomponents of the WHERE clause out of the loop.

FossilOrigin-Name: 9d05777fe24e1a5ce71762de38db840931ef0bc8

11 years agoAvoid unnecessary affinity transformations when building indices using
drh [Thu, 2 Jan 2014 19:35:30 +0000 (19:35 +0000)] 
Avoid unnecessary affinity transformations when building indices using
data from a table.

FossilOrigin-Name: 10d851353c2abeadbd2852c210a7ff9f7f513e5d