Commit Graph

10339 Commits

Author SHA1 Message Date
dan
1e3e41858f Add a test for the problem fixed by [bf44d73d3e].
FossilOrigin-Name: db9b1fa5973d79e29885817d5aedc3a886c2589a
2012-10-17 16:20:36 +00:00
dan
ce5c42be28 Change the way the tcl crash-test code works to avoid triggering an assert() in os_unix.c.
FossilOrigin-Name: b8b7b8f9e97a5c34f0f199b46347e0bf85005a4d
2012-10-17 15:28:26 +00:00
drh
c0a23e5c9c Remove an incorrect "#ifndef SQLITE_OMIT_AUTOVACUUM" from pager.
FossilOrigin-Name: bf44d73d3e4ec403947d361d2fa150cc240c4d45
2012-10-17 13:15:02 +00:00
mistachkin
21890127cd Correct comments and enhance readability of the mkvsix tool.
FossilOrigin-Name: 2c3af657fee6153842d660a6ce29aa7d791ebd38
2012-10-15 20:28:22 +00:00
dan
07973a6581 Hold the mutex on the shared-cache for the duration of a VACUUM operation.
FossilOrigin-Name: 629a42d47a0d8f73de900f469845ce800bdb8959
2012-10-15 18:02:57 +00:00
drh
42fbf32108 Dequote column names generated by the query flattener.
FossilOrigin-Name: 5526e0aa3ccb24988a4f351ac994907b6e89018a
2012-10-15 16:24:07 +00:00
dan
7eb0575287 Fix a failing assert() in wal.c.
FossilOrigin-Name: 8745530b9a877db77fe2ca3ea9c6bc99ce033055
2012-10-15 11:28:24 +00:00
drh
4e40ab5c85 Ensure that when the source of a backup is a database that is zero bytes
in size, the final destination database consists of at least one page. 
Truncating it to zero bytes is equivalent to zeroing the schema cookie 
and change counter, which can cause problems for existing clients.

FossilOrigin-Name: ca86138bda26c5ac5a7e67351acbd19fbd39b0ae
2012-10-13 23:16:00 +00:00
drh
aa2db79a2e Mark an always-true conditional as such.
FossilOrigin-Name: ae025cae2266a91d4226bbdb66f82b9d7714750a
2012-10-13 20:55:12 +00:00
mistachkin
06befd1e09 Modify backup4 test name prefix to make the resulting test names unique.
FossilOrigin-Name: 637fb1c1b7642ba3a404dde32e40d4a4ad16fe14
2012-10-13 20:20:09 +00:00
dan
b483eba051 Ensure that when the source of a backup is a database that is zero bytes in size, the final destination database consists of at least one page. Truncating it to zero bytes is equivalent to zeroing the schema cookie and change counter, which can cause problems for existing clients.
FossilOrigin-Name: af5c9ee4a453f71c03f24ad08824ced6c1b97afb
2012-10-13 19:58:11 +00:00
mistachkin
026262b4d8 Allow the showdb tool to be compiled with MSVC.
FossilOrigin-Name: dce391fc6302301e9ac53a5e4fc69f3bd7ba13a7
2012-10-13 09:31:20 +00:00
mistachkin
0ec0744502 Tooling support for including the debug build in the VSIX package.
FossilOrigin-Name: de784399ed1f0e27fc875e32719643d19819c8fb
2012-10-12 18:06:07 +00:00
mistachkin
6292c01634 Fix duplicate test name in whereD.test.
FossilOrigin-Name: 1182b54af0fd43d5e6aa6399837e7915aa60a578
2012-10-10 13:59:11 +00:00
drh
f7c7031f52 Define the sqlite3PagerWalFramesize() function even if SQLITE_OMIT_WAL is used.
FossilOrigin-Name: 96247853ef3d556a13b899b4c907b9fa2c78d513
2012-10-10 12:14:09 +00:00
drh
453a312091 Add support for URI filenames in sqlite3_analyzer.
FossilOrigin-Name: 6dc987d32ba4d09b811ef281cdae09be17ac936c
2012-10-10 10:52:46 +00:00
dan
06a2d82566 Move a couple of WAL-related function declarations in sqliteInt.h and pager.h into "#ifndef SQLITE_OMIT_WAL" blocks. Otherwise, the amalgamation fails to build using some compilers with SQLITE_OMIT_WAL (static function declared but not defined).
FossilOrigin-Name: f7437153b90b25a1b77294a0f8d1b0bd4bd08c08
2012-10-10 09:46:29 +00:00
drh
90abfd086f Merge the fix for ticket [d02e1406a58ea02] into trunk.
FossilOrigin-Name: dd34bec389359845b86f4cc4906ab440f92dcab9
2012-10-09 21:07:23 +00:00
drh
5a05be1b68 Attempt to suppress warnings generated by Coverity.
FossilOrigin-Name: 7b1a6e6cb5099076bf19db142b17c99044a869cd
2012-10-09 18:51:44 +00:00
drh
5a55826bcd Avoid an assertion fault and/or freeing memory while it is still in use when
an error occurs during virtual table construction.

FossilOrigin-Name: a02599ad85d02470c9effa51c02dbda7796bfa16
2012-10-09 14:36:47 +00:00
drh
2f546ee914 Bring some comments up to date in the query planner, and especially the
ORDER BY optimizer.  Also add testcase() macros.

FossilOrigin-Name: bb5c0f1c92b48631d4a12cd4f321b53cd07885c8
2012-10-09 09:26:28 +00:00
drh
86257fff87 Remove an unused variable. Fix code that occurs before a variable
declaration.

FossilOrigin-Name: 01dc032b5bbd9c9ebb1965f176ca5d732cda85ea
2012-10-09 01:39:25 +00:00
drh
69a76bad73 Replace an always-false conditional with an assert().
FossilOrigin-Name: 981b9943e4b2b660690ec1ac145abdd3c74f8dd2
2012-10-09 01:23:25 +00:00
drh
c31c7c1c6e Changes to facilitate full test coverage.
FossilOrigin-Name: 28d1eb40bfc4c993010ce670ee10780ca2ae5c9c
2012-10-08 23:25:07 +00:00
drh
3a17ea7ab6 Merge ORDER BY optimization refactoring and repair into trunk.
FossilOrigin-Name: c027a9af9137f3346dbb5c5e100a087c2e89797b
2012-10-08 21:51:58 +00:00
drh
2fad815c52 All test cases (veryquick.tcl and min.rc) pass. A few branch operations in
ORDER BY optimization logic are untested by min.rc.

FossilOrigin-Name: 8314fd6078a3a71aea9d6386ff277cfeb592b4ba
2012-10-08 21:01:15 +00:00
drh
6b9e565e54 Further tweaks to the ORDER BY optimizer, to fix a bug and to get the
optimizer to recognize some additional cases.

FossilOrigin-Name: bcb4f262476193cfb17818d8c62bab528dddeef9
2012-10-08 20:27:35 +00:00
drh
0a4c741cab Bug fixes in the ORDER BY optimizer.
FossilOrigin-Name: 301bbee4045aa169e29fb4fb75743b71eb4760a1
2012-10-08 19:41:38 +00:00
drh
8e4af1b997 Continued refactoring of the ORDER BY optimization logic. This check-in
is close to working, but it still has issues.  A few test cases fail.

FossilOrigin-Name: adbdc663f3d22ff03f21040a811d585cf2218626
2012-10-08 18:23:51 +00:00
mistachkin
31d72112fa Manually define the Win32 file-mapping APIs for WAL if SQLITE_WIN32_FILEMAPPING_API is defined.
FossilOrigin-Name: 1c2c0a2880dd0ee8862352e307142b8de7e80d13
2012-10-08 14:36:42 +00:00
mistachkin
3038cfe90a Corrections to test names to eliminate duplicates and follow naming conventions.
FossilOrigin-Name: 50679889c75cd3205253b1682abfbddc5ff09175
2012-10-07 05:34:39 +00:00
mistachkin
f1dacbfc5b Manually define the Win32 file-mapping APIs for WAL if SQLITE_WIN32_FILEMAPPING_API is defined.
FossilOrigin-Name: 585e2070eef3bc273f23d8e384a1261ee5fff5bd
2012-10-07 00:52:22 +00:00
mistachkin
08c1c3150b Changes for WinRT compatibility. Also, allow version resource compilation and embedding to be disabled at compile-time.
FossilOrigin-Name: 4b0facc13b1026419f9b89dab3453ba43071455c
2012-10-06 03:48:25 +00:00
dan
6b9bb59f82 Fix a problem in shared-cache mode where a COMMIT statement might cause a busy-handler belonging to a shared-cache connection other than the current writer to be invoked.
FossilOrigin-Name: e0c889d66ccf4af12cc77ac38c1e6477da63ac72
2012-10-05 19:43:02 +00:00
dan
aedf9ee73a Merge the shared-cache related fixes from the shared-cache-fix branch to the trunk.
FossilOrigin-Name: 698ec7769d4feea1782401479c61ce67d2113fd4
2012-10-05 17:44:51 +00:00
dan
a2ebe4b418 Add a test for the collation-sequence/CHECK constraint problem fixed by the previous commit.
FossilOrigin-Name: 82b6aa77c8d8de4c6fad1960f5958457a929a821
2012-10-05 17:18:16 +00:00
dan
1e92fb59b2 Fix a problem with shared-cache mode and CHECK constraints causing one db handle to invoke a collation sequence function registered with another.
FossilOrigin-Name: c2c776ab73828374836af008aa320cc670c081b5
2012-10-05 16:30:10 +00:00
drh
79e72a50aa Consolidate all occurrences of the "no such collation sequence" error message
into a single spot.

FossilOrigin-Name: 8ea67522fb03134f355ecb776b70c6917241cab2
2012-10-05 14:43:40 +00:00
mistachkin
d744fccdbd Rename a tool batch file subroutine to avoid confusion about its purpose.
FossilOrigin-Name: 43155b1543bddbb84a8bc13a5b7344b228ddacb9
2012-10-05 07:36:34 +00:00
dan
41fb5cd103 Shared-cache mode fixes for views and virtual tables.
FossilOrigin-Name: 2b370dea704b59262c604af0efcef5660b194454
2012-10-04 19:33:00 +00:00
drh
4f68d6c8c0 Yet another refactoring of ORDER BY logic in the query planner. This
particular check-in works mostly, but still has a few minor issues.

FossilOrigin-Name: 8f4487450be1a2b0371f8251a967cbe341b2dea1
2012-10-04 12:10:25 +00:00
drh
613a53a029 Fix an out-of-order memset() that occurs before all variable declarations
are finished.  Also fix a line that exceeds the 80-character line length
limit.

FossilOrigin-Name: ba2f492f957ab5556cd540e21a76ebb75efea725
2012-10-03 18:09:32 +00:00
drh
325eff58d6 Update the query planner to recognize more cases where ORDER BY clauses
can be optimized out.  Add test cases to verify correct behavior of the
ORDER BY optimization when the covering-index-scan optimization is disabled.
Fix a harmless compiler warning in the TCL interface.

FossilOrigin-Name: 956e4d7f8958e7065ff2d61cd71519d6f4113d4a
2012-10-03 12:56:18 +00:00
drh
6f0e400cba Fix a query planner problem that only occurs when covering-index-scan is
disabled.  Fix to tests whose output changed due to the new and more
aggressive ORDER BY optimization.

FossilOrigin-Name: 0f9bb90100aa304a7f28023ca4173e68b445e8bd
2012-10-03 12:38:19 +00:00
drh
c45e67162d Fix the TCL interface so that SQL functions implemented in TCL honor the
"nullvalue" setting.  Also remove from the TCL interface some unused 
legacy UTF8 translation code left over from SQLite2.

FossilOrigin-Name: c1f10a2643179ec58f3879764e9e89676d4b5f91
2012-10-03 11:02:33 +00:00
drh
d663b5bdef Further attempts to optimize out unnecessary ORDER BY clauses.
FossilOrigin-Name: 6744d9a37faffed59b4d5cb96c8671ec46a87ea7
2012-10-03 00:25:54 +00:00
mistachkin
e7c54168fa Work around an optimization issue with the MSVC compiler for ARM.
FossilOrigin-Name: 7d301fdfeec540e4a58f43bff04d219e9f769dc4
2012-10-02 22:54:27 +00:00
drh
afcd522af8 More lenient handling of ORDER BY optimization in joins with mixed ASC/DESC.
This is a better and less restrictive fix for the problem addressed by
the previous check-in.

FossilOrigin-Name: abcf6a5d054559ee5a093ba39180c47b4958d9cd
2012-10-02 15:19:19 +00:00
drh
178eb61c6b Only continue an ORDER BY optimization into inner loops if the equality
constraints on the inner loop match terms of an outer ordered index that
are actually used by the ORDER BY clause.

FossilOrigin-Name: b0e7b4df6c2a8c479f8d210bde50c737eaa248f0
2012-10-02 14:11:29 +00:00
drh
3be57d2aba Factor an invariant out the loop termination condition for the ORDER BY
satisfied-by-index analyzer routine.

FossilOrigin-Name: 545bb33688663066cf3f09e4cdc4d5cfe59fb8db
2012-10-02 01:46:48 +00:00