]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
12 years agoMake the 'fs' virtual table module portable to Windows. fsVfsWin
mistachkin [Thu, 17 Jan 2013 03:18:14 +0000 (03:18 +0000)] 
Make the 'fs' virtual table module portable to Windows.

FossilOrigin-Name: dd473cae5b6ea02b73168b30365f0af5556ee24d

12 years agoFix the activate_extensions pragma so that it is a no-op when the required
drh [Wed, 16 Jan 2013 20:33:02 +0000 (20:33 +0000)] 
Fix the activate_extensions pragma so that it is a no-op when the required
argument is omitted.

FossilOrigin-Name: 6195ebd83323eaad92a0aa095cce1094bf8e2ba6

12 years agoImprovements to query planning for joins: Avoid unnecessary calls to
drh [Wed, 16 Jan 2013 00:46:09 +0000 (00:46 +0000)] 
Improvements to query planning for joins:  Avoid unnecessary calls to
"optimal scan" checks in cases where table reordering is not possible.
Make sure optimal scan checks are carried out for CROSS JOINs and LEFT
JOINs.

FossilOrigin-Name: d5ebb7877885839e93eee3b322624d4c4215c1c4

12 years agoFix a missing word in a comment. Enhance the "wheretrace" debugging output
drh [Tue, 15 Jan 2013 18:49:07 +0000 (18:49 +0000)] 
Fix a missing word in a comment.  Enhance the "wheretrace" debugging output
to show the estimated cost of each table option while planning the join order.

FossilOrigin-Name: ac4e119a87497f2e422ff1cb711112ed8594bfa9

12 years agoClarification to a comment in where.c. No code changes.
drh [Tue, 15 Jan 2013 16:15:28 +0000 (16:15 +0000)] 
Clarification to a comment in where.c.  No code changes.

FossilOrigin-Name: 04507c176330a06b09dcafa35ec0ca7498f5ace7

12 years agoAdd another test for the fts4 content= option.
dan [Fri, 11 Jan 2013 09:58:54 +0000 (09:58 +0000)] 
Add another test for the fts4 content= option.

FossilOrigin-Name: 7e6007a0002f6989bd489abeba8db52acb4a6854

12 years agoCheck in an extra test for the fts4 "content=" option. No code changes.
dan [Wed, 9 Jan 2013 15:44:23 +0000 (15:44 +0000)] 
Check in an extra test for the fts4 "content=" option. No code changes.

FossilOrigin-Name: 0d0e5ab8f16c890629ec1120c78168ef6be9e419

12 years agoFix an over-aggressive optimization of ORDER BY on a three-way join where the
drh [Wed, 9 Jan 2013 11:31:17 +0000 (11:31 +0000)] 
Fix an over-aggressive optimization of ORDER BY on a three-way join where the
second table is UNIQUE and the ORDER BY occurs on the third table.
Ticket [598f5f7596b0557].

FossilOrigin-Name: 5774f2175ce621dfc4b6b93f7ee13fd66f3ec2b9

12 years agoFix the date on the new orderby3.test test case.
drh [Wed, 9 Jan 2013 11:27:48 +0000 (11:27 +0000)] 
Fix the date on the new orderby3.test test case.

FossilOrigin-Name: 7249bfc2ca57624d73f2be0197a9807c58463c48

12 years agoAdd a test case that demonstrates ticket [956e4d7f8958e7065f].
drh [Wed, 9 Jan 2013 11:25:27 +0000 (11:25 +0000)] 
Add a test case that demonstrates ticket [956e4d7f8958e7065f].

FossilOrigin-Name: 598f5f7596b0557b22f31e6643a59ff9096fd023

12 years agoDo not raise an error if an unknown SQL function is found in a CHECK
drh [Tue, 8 Jan 2013 12:48:10 +0000 (12:48 +0000)] 
Do not raise an error if an unknown SQL function is found in a CHECK
constraint while parsing the schema of an existing database.

FossilOrigin-Name: cda790280a52d65f98a45bacb9123367b159ac7c

12 years agoMore bug fixes to the test_regexp.c module. Bring test_regexp.c into alignment
drh [Sat, 5 Jan 2013 17:17:21 +0000 (17:17 +0000)] 
More bug fixes to the test_regexp.c module.  Bring test_regexp.c into alignment
with the regexp.c file in the Fossil sources.

FossilOrigin-Name: 7695b88fe0d73fd0a36fb7d8f95350b80615a89e

12 years agoRemove superfluous text from a comment.
mistachkin [Fri, 4 Jan 2013 22:26:47 +0000 (22:26 +0000)] 
Remove superfluous text from a comment.

FossilOrigin-Name: e9ac5339603766c120c775bda8ae816d0ccb1503

12 years agoDo not use umask() since it change the umask for the entire process, not just
drh [Fri, 4 Jan 2013 20:45:13 +0000 (20:45 +0000)] 
Do not use umask() since it change the umask for the entire process, not just
the thread using SQLite.  Make whatever permission changes are needed using
fchmod() after the file is created, instead.

FossilOrigin-Name: 6c4c2b7dbadedac384d380efd54f12f6ccbf4ca9

12 years agoFix an out-of-order local variable declaration in test_regexp.c.
drh [Fri, 4 Jan 2013 19:22:33 +0000 (19:22 +0000)] 
Fix an out-of-order local variable declaration in test_regexp.c.

FossilOrigin-Name: 8285b15a058811a9a8b452837f52e6a065868115

12 years agoFix the zInit[] optimization of test_regexp.c when the initial string
drh [Fri, 4 Jan 2013 14:06:24 +0000 (14:06 +0000)] 
Fix the zInit[] optimization of test_regexp.c when the initial string
contains 3-byte UTF8 characters.

FossilOrigin-Name: 357231ec970adb5dfcdaf9665499141004cb1198

12 years agoBring back test_regexp changes that were made when porting to Fossil. Also
drh [Thu, 3 Jan 2013 19:34:46 +0000 (19:34 +0000)] 
Bring back test_regexp changes that were made when porting to Fossil.  Also
fix some bugs that were introduced by the Fossil port.

FossilOrigin-Name: 45c158b1a015e0295244982e7a61ecc55cca8436

12 years agoImprovements to column name resolution in queries with parenthesized FROM
drh [Thu, 3 Jan 2013 18:07:37 +0000 (18:07 +0000)] 
Improvements to column name resolution in queries with parenthesized FROM
clauses.  Also includes a fix for ticket [beba9cae6345a3].

FossilOrigin-Name: 99127a669c49f82918853091c9c5b7db5ad73cba

12 years agoFurther corner-case fixes to the name resolution logic. name-resolution-fix
drh [Thu, 3 Jan 2013 17:34:28 +0000 (17:34 +0000)] 
Further corner-case fixes to the name resolution logic.

FossilOrigin-Name: 20730bad7082b559a65e8cfedb31b6afca50df58

12 years agoRemove an incorrect assert() statement (ticket [beba9cae6345a]). Fix other
drh [Thu, 3 Jan 2013 16:54:20 +0000 (16:54 +0000)] 
Remove an incorrect assert() statement (ticket [beba9cae6345a]).  Fix other
minor problems in the name resolution logic.

FossilOrigin-Name: afe96a118c8a9627819ba5960aa83a607e734087

12 years agoNow supports result sets of the form "TABLE.*" with nested FROM clauses.
drh [Thu, 3 Jan 2013 00:45:56 +0000 (00:45 +0000)] 
Now supports result sets of the form "TABLE.*" with nested FROM clauses.

FossilOrigin-Name: 4cf5ed7ea198abc32f8118e79490e77f847f08c1

12 years agoWhen resolving result-set name collisions, make them x:1, x:2, x:3, etc.
drh [Wed, 2 Jan 2013 14:57:32 +0000 (14:57 +0000)] 
When resolving result-set name collisions, make them x:1, x:2, x:3, etc.
instead of x:1, x:1:1, x:1;1;1.

FossilOrigin-Name: ef01e30456670e6b1bc67fe41ec27e52c182efaf

12 years agoMerge all the latest trunk changes into the name-resolution enhancement branch.
drh [Wed, 2 Jan 2013 12:29:05 +0000 (12:29 +0000)] 
Merge all the latest trunk changes into the name-resolution enhancement branch.

FossilOrigin-Name: a5f4d2b641f7fafb6f1a312efeffb10f213d2d0a

12 years agoReduce the size of the Index object (by 8 bytes on x64).
drh [Tue, 1 Jan 2013 14:01:28 +0000 (14:01 +0000)] 
Reduce the size of the Index object (by 8 bytes on x64).

FossilOrigin-Name: 5a2ac944839ec0c5b9147a035c6cbf0935f3d202

12 years agoEnhance the table_info pragma so that the pk column shows the order of the
drh [Tue, 1 Jan 2013 13:55:31 +0000 (13:55 +0000)] 
Enhance the table_info pragma so that the pk column shows the order of the
columns in a multi-column primary key.

FossilOrigin-Name: 3076a89015071e9b40e728bd55160e3a6ed98820

12 years agoMore test cases for the REGEXP operator. Fix minor bugs uncovered by these
drh [Mon, 31 Dec 2012 20:16:35 +0000 (20:16 +0000)] 
More test cases for the REGEXP operator.  Fix minor bugs uncovered by these
test cases.

FossilOrigin-Name: a611c75061c8e821cb266fcb09759100d4a646b0

12 years agoAdd the test_regexp.c module containing a cross-platform implementation
drh [Mon, 31 Dec 2012 19:18:38 +0000 (19:18 +0000)] 
Add the test_regexp.c module containing a cross-platform implementation
of the REGEXP operator.

FossilOrigin-Name: 46c8c01b751c1ea7fc02cc35e3b5bb99dbe46c4b

12 years agoEnsure the database size field in the db header of a backup database is set correctly...
dan [Fri, 21 Dec 2012 16:15:35 +0000 (16:15 +0000)] 
Ensure the database size field in the db header of a backup database is set correctly. Fix for [0cfd98ee201].

FossilOrigin-Name: ff6857b6ed6a46671006b75157d8cf853a816ef9

12 years agoAdd PRAGMA foreign_key_check. Name the child and parent tables as part of
drh [Thu, 20 Dec 2012 01:15:20 +0000 (01:15 +0000)] 
Add PRAGMA foreign_key_check.  Name the child and parent tables as part of
a "foreign key mismatch" error.

FossilOrigin-Name: e408dc9080594dc464b8763dece6b365772c6105

12 years agoRemove an unreachable branch operation from the foreign_key_check pragma. foreign-key-check
drh [Thu, 20 Dec 2012 00:32:49 +0000 (00:32 +0000)] 
Remove an unreachable branch operation from the foreign_key_check pragma.

FossilOrigin-Name: b5a8f3160b5dc1397312add3c5410e7e0a12b75e

12 years agoFix the segfault problem of ticket [a7b7803e8d1e869] which involved
drh [Wed, 19 Dec 2012 16:58:02 +0000 (16:58 +0000)] 
Fix the segfault problem of ticket [a7b7803e8d1e869] which involved
the use of "AS" named result columns as logical terms of the WHERE clause.

FossilOrigin-Name: b3c9e8f81275fe07272c01f66b16c16417f034af

12 years agoA couple more test cases. tkt-a7b7803e
drh [Wed, 19 Dec 2012 16:32:33 +0000 (16:32 +0000)] 
A couple more test cases.

FossilOrigin-Name: 0ae142178d5ff874a4df58d699adad3a41e3d8d2

12 years agoAdditional test cases involving the use of a result column specified by its
drh [Wed, 19 Dec 2012 16:25:55 +0000 (16:25 +0000)] 
Additional test cases involving the use of a result column specified by its
"AS" name as a logical term of the WHERE clause.
Ticket [a7b7803e8d1e8699cd].

FossilOrigin-Name: d7cc364e87870746c231b97b648658bf343945fa

12 years agoProposed fix for ticket [a7b7803e8d1e8699cd8a].
drh [Wed, 19 Dec 2012 15:53:51 +0000 (15:53 +0000)] 
Proposed fix for ticket [a7b7803e8d1e8699cd8a].

FossilOrigin-Name: 3d0e00c731c39af91bad74c6d74853375bac356e

12 years agoAdd commentary to the ExprList object to explain how zSpan is overloaded.
drh [Wed, 19 Dec 2012 13:41:03 +0000 (13:41 +0000)] 
Add commentary to the ExprList object to explain how zSpan is overloaded.
Add test cases for the new name resolution functionality.

FossilOrigin-Name: 3e7d84db7861911c9b2c7dcdabe0b213bf483d79

12 years agoBetter resolution of table and column names in joins where some of the
drh [Wed, 19 Dec 2012 02:36:45 +0000 (02:36 +0000)] 
Better resolution of table and column names in joins where some of the
terms of the FROM clause are parenthesized.

FossilOrigin-Name: 7344e791b9456286ecdca6d45f2f5260fb3f10e2

12 years agoOptimize the degenerate case of a FROM clause table name enclosed all by
drh [Tue, 18 Dec 2012 19:36:11 +0000 (19:36 +0000)] 
Optimize the degenerate case of a FROM clause table name enclosed all by
itself inside parentheses.  Generate code as if the parentheses did not
exist, rather than the old behavior of manifesting the parenthesized table
into a transient table.  Also, tag every FROM-clause SELECT subquery that is
generated by a parenthesized FROM-clause expression using the SF_NestedFrom
flag.  The new SF_NestedFrom flag is not yet used for anything.

FossilOrigin-Name: 7fecced466d86a66b0b751c5b5608141e134fe2d

12 years agoResolve names in FROM-clause subqueries prior to resolving names in the
drh [Tue, 18 Dec 2012 16:07:08 +0000 (16:07 +0000)] 
Resolve names in FROM-clause subqueries prior to resolving names in the
result set expressions of a SELECT statement.

FossilOrigin-Name: 9b67c633d932f3e566f521ee6a9cf3be193436fa

12 years agoRemove old commented-out code from parse.y. Fix some over-length source lines
drh [Tue, 18 Dec 2012 13:12:03 +0000 (13:12 +0000)] 
Remove old commented-out code from parse.y.  Fix some over-length source lines
in parse.y.  No logical changes.

FossilOrigin-Name: 7e30c021abe5a559918efaa5fc0b21db8ca782ad

12 years agoOn atomic-write capable systems, if copying the contents of an in-memory journal...
dan [Tue, 18 Dec 2012 11:59:39 +0000 (11:59 +0000)] 
On atomic-write capable systems, if copying the contents of an in-memory journal to disk fails, close the (on disk) journal file before returning the error to the caller. This causes the subsequent rollback operation to use the in-memory journal. Fix for [df678d738adb].

FossilOrigin-Name: 8183d8d7ae1ff4bad2fcc01adb923b966b347832

12 years agoAdded test cases for PRAGMA foreign_key_check. Fixed a bug that appears
drh [Mon, 17 Dec 2012 22:32:14 +0000 (22:32 +0000)] 
Added test cases for PRAGMA foreign_key_check.  Fixed a bug that appears
when the column order of the child and parent differ.

FossilOrigin-Name: 25411f83f99803e39feee368703fd20b4ade8eeb

12 years agoAdd to the foreign_key_check pragma an extra output column "parent" that
drh [Mon, 17 Dec 2012 20:57:15 +0000 (20:57 +0000)] 
Add to the foreign_key_check pragma an extra output column "parent" that
contains the name of the parent table for the constraint that failed.

FossilOrigin-Name: 97f7f7377259ecf562019f62ebed0897cfae236e

12 years agoEnhance the error message for "foreign key mismatch" to include the names of
drh [Mon, 17 Dec 2012 20:40:39 +0000 (20:40 +0000)] 
Enhance the error message for "foreign key mismatch" to include the names of
the child and parent tables.  Begin adding test cases for
PRAGMA foreign_key_check.  Make sure PRAGMA foreign_key_check gets all
necessary table locks.

FossilOrigin-Name: 0f9963526c299757ff95c153fb05a67cddb6af28

12 years ago"PRAGMA foreign_key_check" with no argument checks the foreign keys on all
drh [Mon, 17 Dec 2012 18:43:02 +0000 (18:43 +0000)] 
"PRAGMA foreign_key_check" with no argument checks the foreign keys on all
tables.

FossilOrigin-Name: 57d47423a65d183cb1efcb95b28cb143e788b953

12 years agoFix an issue with child keys that are not INTEGER PRIMARY KEY
drh [Mon, 17 Dec 2012 18:05:54 +0000 (18:05 +0000)] 
Fix an issue with child keys that are not INTEGER PRIMARY KEY
referencing INTEGER PRIMARY KEY in the parent.

FossilOrigin-Name: 603b695bf094b9da905f877a13dcb134463db92a

12 years agoPrototype for PRAGMA that checks all foreign key constraints on a table.
drh [Mon, 17 Dec 2012 16:46:37 +0000 (16:46 +0000)] 
Prototype for PRAGMA that checks all foreign key constraints on a table.

FossilOrigin-Name: 01c980e9bbdf82e0b37667b6403c19ed8c73ee62

12 years agoOptimize IN operators in the WHERE clause of queries using virtual tables.
drh [Fri, 14 Dec 2012 17:54:38 +0000 (17:54 +0000)] 
Optimize IN operators in the WHERE clause of queries using virtual tables.

FossilOrigin-Name: 3d65c70343196b8f69c5293e7703839846fade85

12 years agoRemove an unreachable branch. Improvements to comments.
drh [Fri, 14 Dec 2012 17:48:08 +0000 (17:48 +0000)] 
Remove an unreachable branch.  Improvements to comments.

FossilOrigin-Name: d2fb7619b063b329b6d7ba9a16a7290e5d868f23

12 years agoMerge in all the trunk changes that have occurred since this branch was
drh [Fri, 14 Dec 2012 15:54:05 +0000 (15:54 +0000)] 
Merge in all the trunk changes that have occurred since this branch was
opened.

FossilOrigin-Name: 6d507e4de924e2f4556ea4a03ee0fa7d647bf8bb

12 years agoFix the virtual table IN optimizer so that it work even if the virtual table
drh [Fri, 14 Dec 2012 15:36:17 +0000 (15:36 +0000)] 
Fix the virtual table IN optimizer so that it work even if the virtual table
implementation leaves the sqlite3_index_info.aConstraintUsage[].omit flag
clear for an equality constraint that it intends to use.

FossilOrigin-Name: d6e045f89c5a4b500b1da7ea1224b132909bafc6

12 years agoGeneralize the min/max optimization so that if an appropriate index exists,
drh [Thu, 13 Dec 2012 18:57:31 +0000 (18:57 +0000)] 
Generalize the min/max optimization so that if an appropriate index exists,
the index it can be used by any aggregate query that contains only a single
max() or min() and does not contain a GROUP BY clause.

FossilOrigin-Name: 52e755943f87354febe214e5dc3b423a1e38ba80

12 years agoIncrease the version number to 3.7.16 in advance of adding new features
drh [Thu, 13 Dec 2012 18:51:53 +0000 (18:51 +0000)] 
Increase the version number to 3.7.16 in advance of adding new features
for the next release.

FossilOrigin-Name: 8bcf5f51d8a6ea47ba4eb8de001d7a30e0a5f2c3

12 years agoAttempt to further generalize the min/max optimization so that, if an appropriate... minmax-opt
dan [Thu, 13 Dec 2012 16:37:10 +0000 (16:37 +0000)] 
Attempt to further generalize the min/max optimization so that, if an appropriate index exists, it can be used by any aggregate query that contains only a single aggregate of the form max(colname) or min(colname) and does not contain a GROUP BY clause.

FossilOrigin-Name: 7280e14cd8f55896451847b432171e8750a07c81

12 years agoAllow the error message from "PRAGMA integrity_check" to be longer than
drh [Wed, 12 Dec 2012 14:30:03 +0000 (14:30 +0000)] 
Allow the error message from "PRAGMA integrity_check" to be longer than
20,000 bytes.

FossilOrigin-Name: 120c82d56ecb574f46db01679317b8062d8779ed

12 years agoVersion 3.7.15 version-3.7.15
dan [Wed, 12 Dec 2012 13:36:53 +0000 (13:36 +0000)] 
Version 3.7.15

FossilOrigin-Name: cd0b37c52658bfdf992b1e3dc467bae1835a94ae

12 years agoUpdate requirements marks and test cases for multi-VALUE INSERT and to fix
drh [Tue, 11 Dec 2012 19:40:03 +0000 (19:40 +0000)] 
Update requirements marks and test cases for multi-VALUE INSERT and to fix
typos in requirements text.

FossilOrigin-Name: 81d9ee0f0df7f283e69ba1c2845339ea3318cd66

12 years agoFix a typo in a comment that is used to generate
drh [Tue, 11 Dec 2012 19:10:37 +0000 (19:10 +0000)] 
Fix a typo in a comment that is used to generate
documentation.  No changes to code.

FossilOrigin-Name: e38adb60a7952ca9e28e496b4e4658c724a368d2

12 years agoWhen an arithmetic operation with two integer operands must give a
drh [Mon, 10 Dec 2012 22:19:14 +0000 (22:19 +0000)] 
When an arithmetic operation with two integer operands must give a
floating-point answer due to overflow, make sure the answer is not
rounded back to integer by affinity.

FossilOrigin-Name: bd7aeeb691fee69dd6a562138a7aba8e8e192272

12 years agoModify releasetest.tcl so that it runs the "checksymbols" test on a build without...
dan [Mon, 10 Dec 2012 10:22:48 +0000 (10:22 +0000)] 
Modify releasetest.tcl so that it runs the "checksymbols" test on a build without SQLITE_DEBUG defined. If SQLITE_DEBUG is defined, the sqlite3WhereTrace variable causes the test to fail.

FossilOrigin-Name: 75e545a9e2614fae7db86ecfb84e41ecbe4097ba

12 years agoRemove a reference to JumpOnce from a comment in vdbe.c. No code changes.
dan [Mon, 10 Dec 2012 09:08:17 +0000 (09:08 +0000)] 
Remove a reference to JumpOnce from a comment in vdbe.c. No code changes.

FossilOrigin-Name: ee662c039d67f118008485d95603c5a43fcac75f

12 years agoFactor some work out of the index loop of the bestBtreeIndex() routine for
drh [Sat, 8 Dec 2012 22:14:29 +0000 (22:14 +0000)] 
Factor some work out of the index loop of the bestBtreeIndex() routine for
a small performance increase.

FossilOrigin-Name: 92c9ab56b1c67b9468bec57ab1d2c483a69a2810

12 years agoRefactor collating-sequence handling as a fix for ticket [71e333e7d2e642].
drh [Sat, 8 Dec 2012 21:51:24 +0000 (21:51 +0000)] 
Refactor collating-sequence handling as a fix for ticket [71e333e7d2e642].
The Expr.pColl field is removed from the Expr object.  The COLLATE operator
now becomes a separate instance of Expr in the expression tree.  The code
generator looks up the correct collating function as needed, rather than
referring to Expr.pColl.

FossilOrigin-Name: 8542e6180d4321d45b34f33e481658908ce1430d

12 years agoAdjustments to the collating-sequence refactoring to facilitate full-coverage ticket-71e333e7
drh [Sat, 8 Dec 2012 21:36:26 +0000 (21:36 +0000)] 
Adjustments to the collating-sequence refactoring to facilitate full-coverage
testing and to fix some minor issues found by TH3.

FossilOrigin-Name: cdbfa664839a409589ec7cebfc9111235d2f3b38

12 years agoMake sure WHERE clause constraints A=B and B=A work the same even with
drh [Sat, 8 Dec 2012 14:16:47 +0000 (14:16 +0000)] 
Make sure WHERE clause constraints A=B and B=A work the same even with
COLLATE clauses.

FossilOrigin-Name: b3f53668115f0a12a01167c2a75eecc735416024

12 years agoFix the header comment on the OP_Compare operator.
drh [Sat, 8 Dec 2012 13:26:23 +0000 (13:26 +0000)] 
Fix the header comment on the OP_Compare operator.

FossilOrigin-Name: 2722f4074fd8d189b7bd2b9107484b66500e5e9b

12 years agoDuplicating check constraint expressions prior to code generation is no
drh [Sat, 8 Dec 2012 04:10:44 +0000 (04:10 +0000)] 
Duplicating check constraint expressions prior to code generation is no
longer required, and so it is removed.

FossilOrigin-Name: 1a9db8dc2f3c5cb089801d56122cdf5c3a618163

12 years agoVeryquick passes all tests now.
drh [Sat, 8 Dec 2012 03:34:04 +0000 (03:34 +0000)] 
Veryquick passes all tests now.

FossilOrigin-Name: 7b96115e81deab0aa0472839cf787ba3f2fc64a7

12 years agoRecognize TK_COLLATE operators that have been transformed into TK_REGISTER.
drh [Sat, 8 Dec 2012 00:52:14 +0000 (00:52 +0000)] 
Recognize TK_COLLATE operators that have been transformed into TK_REGISTER.
Skip both TK_COLLATE and TK_AS operators when looking for the top of an
expression.

FossilOrigin-Name: f66c1db2965054f38125218202b6a6ec62d57666

12 years agoImproved error messages when column integers in an ORDER BY clause are
drh [Fri, 7 Dec 2012 23:23:53 +0000 (23:23 +0000)] 
Improved error messages when column integers in an ORDER BY clause are
out of range.

FossilOrigin-Name: bd960d937f8d6521c8ec4b7bd8a77a498dd432d4

12 years agoFor an ORDER BY on a compound SELECT, take the collating sequence from the
drh [Fri, 7 Dec 2012 23:10:40 +0000 (23:10 +0000)] 
For an ORDER BY on a compound SELECT, take the collating sequence from the
left-most term of the compound.

FossilOrigin-Name: 8e724b383da1314909c9a05e9d941a26a9f50b95

12 years agoDo not report missing collating functions while parsing the schema.
drh [Fri, 7 Dec 2012 22:54:41 +0000 (22:54 +0000)] 
Do not report missing collating functions while parsing the schema.
Also remove a stray comment.

FossilOrigin-Name: e313edca0472f07e9b872b92120d80b4bc177328

12 years agoFix a long-standing issue with the distinct-as-aggregate optimization that
drh [Fri, 7 Dec 2012 22:18:54 +0000 (22:18 +0000)] 
Fix a long-standing issue with the distinct-as-aggregate optimization that
only expressed when the new collating-sequence logic is turned on.

FossilOrigin-Name: 0aaf52a339808386984c30cca0c0c35ac2e70e7e

12 years agoFix the processing of ORDER BY clauses with COLLATE terms on compound
drh [Fri, 7 Dec 2012 21:02:47 +0000 (21:02 +0000)] 
Fix the processing of ORDER BY clauses with COLLATE terms on compound
queries.  52 veryquick test failures remain.

FossilOrigin-Name: 49654453ad157693414c1f86fa3afa0918acffd4

12 years agoMany more tests are passing. Only about 100 failures remain in veryquick.
drh [Fri, 7 Dec 2012 20:31:11 +0000 (20:31 +0000)] 
Many more tests are passing.  Only about 100 failures remain in veryquick.

FossilOrigin-Name: f9fa7581c0371fe0feb4e97487741ade18595810

12 years agoEnsure the VerifyCookie sub-routine has been run before the database is accessed...
dan [Fri, 7 Dec 2012 19:28:26 +0000 (19:28 +0000)] 
Ensure the VerifyCookie sub-routine has been run before the database is accessed in an obscure case. Fix for ticket [d6b36be38].

FossilOrigin-Name: 2d5f37c99a9e5377409697f5392a1ca55970964e

12 years agoSome errors in veryquick resolved. Many more to go.
drh [Fri, 7 Dec 2012 18:38:16 +0000 (18:38 +0000)] 
Some errors in veryquick resolved.  Many more to go.

FossilOrigin-Name: 972443b4eb282d45507da06c75e2cd46dd72326b

12 years agoVeryquick now row to completion without segfaulting or asserting. But there
drh [Fri, 7 Dec 2012 14:02:14 +0000 (14:02 +0000)] 
Veryquick now row to completion without segfaulting or asserting.  But there
are still lots of errors.

FossilOrigin-Name: 7fafab12e4c0c832c421975f8329c3214403d281

12 years agoDo not run test file malloc3.test as part of the inmemory_journal permutation. Explan...
dan [Fri, 7 Dec 2012 10:55:19 +0000 (10:55 +0000)] 
Do not run test file malloc3.test as part of the inmemory_journal permutation. Explanation is in a comment at the top of malloc3.test.

FossilOrigin-Name: df1827b19e47724b62fdf6fbedfd4e61add343d3

12 years agoSpelling and header fixes for the async extension.
mistachkin [Fri, 7 Dec 2012 09:08:42 +0000 (09:08 +0000)] 
Spelling and header fixes for the async extension.

FossilOrigin-Name: 930ba85262b76e8b1555bcfe4637135c27e04d58

12 years agoIn the async VFS, treat the new error code SQLITE_IOERR_DELETE_NOENT as success for...
mistachkin [Thu, 6 Dec 2012 23:16:58 +0000 (23:16 +0000)] 
In the async VFS, treat the new error code SQLITE_IOERR_DELETE_NOENT as success for xDelete.

FossilOrigin-Name: c507ca4a8eb255923ff32001a1903dc85960f485

12 years agoRemove the Expr.pColl field and compute the collating sequence as it is needed.
drh [Thu, 6 Dec 2012 21:16:43 +0000 (21:16 +0000)] 
Remove the Expr.pColl field and compute the collating sequence as it is needed.
This fixes the test script "shared9.test", though there is still a memory leak.
And there are other problems.  Consider this a work-in-progress.

FossilOrigin-Name: fd011cb22f2d899d94ec7ce22641d7a8f5e19972

12 years agoMerge the constant-refactoring-in-triggers branch with the trunk.
dan [Thu, 6 Dec 2012 19:41:44 +0000 (19:41 +0000)] 
Merge the constant-refactoring-in-triggers branch with the trunk.

FossilOrigin-Name: 79ef8e3c7798dfdf37359ac816e886a43ba9d98d

12 years agoApply the same restrictions on constant refactoring to statements within a trigger... constant-refactoring-in-triggers
dan [Thu, 6 Dec 2012 19:37:22 +0000 (19:37 +0000)] 
Apply the same restrictions on constant refactoring to statements within a trigger program as top-level statements. Candidate fix for [ae3c5670b6].

FossilOrigin-Name: 0c31a46801746191d1a53332d75beda880fe1fd7

12 years agoAdd the SQLITE_FCNTL_TEMPFILENAME file control that asks the underlying VFS
drh [Thu, 6 Dec 2012 19:01:42 +0000 (19:01 +0000)] 
Add the SQLITE_FCNTL_TEMPFILENAME file control that asks the underlying VFS
to return a new temporary filename.  Per request from NSS team at Mozilla.

FossilOrigin-Name: 1a63b1d5fa5d79f96eddbda6d94bc10248863710

12 years agoAdd a test case that demonstrates ticket [71e333e7d2e642].
drh [Thu, 6 Dec 2012 15:15:15 +0000 (15:15 +0000)] 
Add a test case that demonstrates ticket [71e333e7d2e642].

FossilOrigin-Name: cc6e0785df3c2342376351e19ba7dba7b8d2f6a3

12 years agoFor the sqlite3-all.c target, use backslashes when calling the splitter script via...
mistachkin [Thu, 6 Dec 2012 04:33:13 +0000 (04:33 +0000)] 
For the sqlite3-all.c target, use backslashes when calling the splitter script via the MSVC makefile.

FossilOrigin-Name: d507648d820cfea70e17f3d21c35c932a2d20367

12 years agoBring the ancient malloc3.test file closer into relevance with the latest core code.
mistachkin [Thu, 6 Dec 2012 04:19:24 +0000 (04:19 +0000)] 
Bring the ancient malloc3.test file closer into relevance with the latest core code.

FossilOrigin-Name: 9793a21c13a1188383b4be64df86629f196ca330

12 years agoStop using the TCL_LIBS configuration variable when linking with Tcl.
drh [Thu, 6 Dec 2012 02:56:05 +0000 (02:56 +0000)] 
Stop using the TCL_LIBS configuration variable when linking with Tcl.
Remove superfluous 'rm' command from the "clean" target.

FossilOrigin-Name: 1551277208048cb24887928f2f971e47a942c849

12 years agoRemove obsolete comments from the definition of the CollSeq object.
drh [Thu, 6 Dec 2012 01:03:15 +0000 (01:03 +0000)] 
Remove obsolete comments from the definition of the CollSeq object.

FossilOrigin-Name: 7b6951016f5bf4c21f843f09769ba176c709e785

12 years agoStop using the TCL_LIBS configuration variable when linking with Tcl. Remove superfl... noTclLibs
mistachkin [Thu, 6 Dec 2012 00:16:51 +0000 (00:16 +0000)] 
Stop using the TCL_LIBS configuration variable when linking with Tcl.  Remove superfluous 'rm' command.

FossilOrigin-Name: e1feab9834fe829d43ae895cc575ad269a36668c

12 years agoDisable a couple of tests in where.test when running the "no_optimization" permutation.
dan [Wed, 5 Dec 2012 19:04:32 +0000 (19:04 +0000)] 
Disable a couple of tests in where.test when running the "no_optimization" permutation.

FossilOrigin-Name: 5e961e37c5357776bcb44c473cb5ee4b59561f07

12 years agoModify a query in test/thread001.test to ensure that results are returned in the...
dan [Wed, 5 Dec 2012 16:44:13 +0000 (16:44 +0000)] 
Modify a query in test/thread001.test to ensure that results are returned in the order expected by the test.

FossilOrigin-Name: 51cbddd51d02bcd954be411ecc83556c049a2680

12 years agoFixes to a test case in shared_err.test. The fix is to prevent sqlite3_prepare()...
dan [Wed, 5 Dec 2012 14:37:55 +0000 (14:37 +0000)] 
Fixes to a test case in shared_err.test. The fix is to prevent sqlite3_prepare() from being called when the test intends to test the response of sqlite3_step() to an OOM condition.

FossilOrigin-Name: 40c143955ebe75f8e73119f9103f36a3c8ac4514

12 years agoMake sure memory is freed using a routine that is compatible with the
drh [Wed, 5 Dec 2012 14:31:13 +0000 (14:31 +0000)] 
Make sure memory is freed using a routine that is compatible with the
routine used to allocate the memory.  The SQLITE_MEMDEBUG compile-time
option enforces this.

FossilOrigin-Name: 9f6c68856b694373b7ffb124abd996e519ba5921

12 years agoSince errors are ignored anyway, use sqlite3OsFileControlHint() instead of OsFileCont...
dan [Wed, 5 Dec 2012 11:30:28 +0000 (11:30 +0000)] 
Since errors are ignored anyway, use sqlite3OsFileControlHint() instead of OsFileControl() to invoke the SQLITE_FCNTL_BUSY_HANDLER file-control.

FossilOrigin-Name: bdceca2738eb3e8acc44d0384cf2a3a969ee8170

12 years agoIf the atomic-write property is enabled, a transaction may be committed in journal_mo...
dan [Wed, 5 Dec 2012 10:01:35 +0000 (10:01 +0000)] 
If the atomic-write property is enabled, a transaction may be committed in journal_mode=DELETE mode without ever actually creating a journal file on disk. In this case, do not attempt to unlink() the journal file when committing the transaction.

FossilOrigin-Name: 11aa47b0a837858b644c304638e1cbbf482de2f0

12 years agoUpdate a couple of test scripts so that they work in auto-vacuum mode.
dan [Wed, 5 Dec 2012 09:12:58 +0000 (09:12 +0000)] 
Update a couple of test scripts so that they work in auto-vacuum mode.

FossilOrigin-Name: 04ab2dc6914e4d6fe2682eba08fc1cd1148a44a1

12 years agoFix a harmless compiler warning.
drh [Tue, 4 Dec 2012 11:03:11 +0000 (11:03 +0000)] 
Fix a harmless compiler warning.

FossilOrigin-Name: 12693deba9b8a47ad02ca4e32d5fba6006b0401c

12 years agoAdd a test to ensure that the fix in [b0c1ba655d] has worked.
dan [Tue, 4 Dec 2012 05:24:21 +0000 (05:24 +0000)] 
Add a test to ensure that the fix in [b0c1ba655d] has worked.

FossilOrigin-Name: 41806de5c88e924e306ca737192755c011517426

12 years agoImprovements to the 'tcl' shell output mode. Escape doublequotes,
drh [Tue, 4 Dec 2012 00:59:05 +0000 (00:59 +0000)] 
Improvements to the 'tcl' shell output mode. Escape doublequotes,
set separator to space when mode is set, and skip separator after final
column.

FossilOrigin-Name: 487ba753139c256b911f16aee9586144faea846f