Commit Graph

11399 Commits

Author SHA1 Message Date
drh
5dbb7cc24f Add tests that demonstrate that PRAGMA defer_foreign_keys will reset to off
at the conclusion of the next transaction.

FossilOrigin-Name: 67e28a11de97e97889f0c0f41c05605721c605c1
2013-10-12 13:16:15 +00:00
mistachkin
b084582299 Fix harmless compiler warning.
FossilOrigin-Name: 4b130f88fba216e088f61252bbcdde57ec7ee6a9
2013-10-12 02:33:22 +00:00
mistachkin
0ed02a6dcb Permit the creation of VSIX packages for Win32.
FossilOrigin-Name: 035d03e94252f31025b39da49d8401933352fb77
2013-10-12 02:31:34 +00:00
mistachkin
549bc3db1f Fix Unicode character encoding issues on Windows.
FossilOrigin-Name: c9310c9a2bad11f1d033a57b33ea7aed43a8238d
2013-10-12 00:56:21 +00:00
drh
cf9fca4629 Identify requirements text in the SQLITE_CONFIG_ documentation. Fix a typo
(a duplicated word) in part of that documentation.  Add some requirements
marks for DETACH to the test scripts.  No code changes.

FossilOrigin-Name: 1be0a3adaba2914c65c46fbebc4906ae4e70f899
2013-10-11 23:37:57 +00:00
mistachkin
0aedc6be45 The split amalgamation option should be disabled by default.
FossilOrigin-Name: 7c24d22ffa1e12f3d24cad06b5ff7cc34219b2bb
2013-10-11 23:02:13 +00:00
mistachkin
7651091de5 Enhance debugging support for the split amalgamation files when compiling with MSVC.
FossilOrigin-Name: 8ff17c553d8c159fa81c961441e16dbba8da62ba
2013-10-11 23:01:18 +00:00
drh
2b51f2153b Fix a harmless compiler warning in lemon.c.
FossilOrigin-Name: 62959c0ce3a2c486ebd82e6511efad0412b944a0
2013-10-11 23:01:02 +00:00
mistachkin
691d4c9936 Add -no-undefined option when linking the shared libraries.
FossilOrigin-Name: 977d2b12e5efc70c26129b08c1f6d65c9d6d211e
2013-10-11 22:19:55 +00:00
mistachkin
cbc53fec75 Fix test numbering.
FossilOrigin-Name: cef39f6933dcfec4b4a087a05dbb4e7766003fb7
2013-10-11 22:17:39 +00:00
drh
e4bf4f08c0 Add requirements marks. No code changes.
FossilOrigin-Name: 5e0d43ab55de006b20c58cb18b938d1c7b658e51
2013-10-11 20:14:37 +00:00
drh
3432daa8b2 Additional test cases and requirements marks for the unlikely(),
likelihood() and instr() functions.

FossilOrigin-Name: 5f01cd36ee8678a07b79f9e01855daffb6bb8c43
2013-10-11 16:35:49 +00:00
drh
4f99189051 Fix various harmless compiler warnings. Change the "warnings.sh" script to
work with STAT4 instead of STAT3.

FossilOrigin-Name: 7df06684ab36bfdad9e9aca6940b7a665c2a0cb5
2013-10-11 15:05:05 +00:00
drh
80e0b72e8d Make sure the sqlite3.h file occurs at the very top of the sqlite3.c
amalgamation.

FossilOrigin-Name: 03593817ab5abdd4bbaa5e47e2e4745eef025af9
2013-10-11 13:27:26 +00:00
mistachkin
e71e0603c5 Fix compilation issue for WinRT.
FossilOrigin-Name: 7a2006ca94c458c7b1eae7b2b6df51da67546462
2013-10-11 05:51:15 +00:00
drh
7e65c94bdc Add a rule to the main.mk makefile for building showdb.
FossilOrigin-Name: fc5552da0d3c41aea58292d267c247f9ca8ed474
2013-10-10 17:33:52 +00:00
drh
a0cbd3fd17 Enhancements to the vfslog.c module to show all change-counter changes and
to show the hostname and pid of the process that creates each log file.

FossilOrigin-Name: af7abebeb1f70466833bc766d294d721eaef746f
2013-10-10 15:04:52 +00:00
drh
919e3b3908 Another fix to the hash signature algorithm in vfslog.c.
FossilOrigin-Name: 34212aa8c405c4ff3f8045ec0cf2a860af61540f
2013-10-10 13:41:04 +00:00
drh
7cd84ffc60 Fix the hash signature algorithm in vfslog.c. Add a utility program to
show the hash signatures for every page of a database file.

FossilOrigin-Name: eaf4de13a63b2294ae575432a022493308a4313a
2013-10-10 13:38:51 +00:00
dan
30e2f0ae08 Add ext/misc/vfslog.c, a VFS shim for unix that keeps a log of method calls made by SQLite.
FossilOrigin-Name: 24a827b87666670c56d68a18685f4f712852fa92
2013-10-10 13:04:46 +00:00
drh
3d8b2395b3 Estimate row sizes for tables and indices and use those estimates during
query planning.  Enhance the index_info pragma to show the estimated row
sizes and to show the estimated row size for the main table as well.  Allow
an alternative row size estimate to be specified in the sqlite_stat1 table.

FossilOrigin-Name: d27b88b8c2705f444f794096c719e6f38a792165
2013-10-10 12:38:11 +00:00
drh
26586e77d9 Make sure the correct printf format is used for type tRowcnt regardless
of whether 32-bit or 64-bit row counts are specified at compile-time.

FossilOrigin-Name: e97d7d3044aa6c5e21d1faab7d5e709d92faa261
2013-10-09 19:07:22 +00:00
drh
1f1fc0c24d Move a conditional inside of an #ifdef in order to make all branches
reachable regardless of compile-time options used.

FossilOrigin-Name: f7cc30d45b77f58c258b21f5823c2b39a44e2bf5
2013-10-08 23:16:48 +00:00
drh
833d198fb1 Fix test cases for the new information in PRAGMA index_list.
FossilOrigin-Name: dd03be1065537679c2daf5e4200902c47714fceb
2013-10-08 22:25:22 +00:00
drh
b50596d64d Rollback some of the previous changes in the branch such that the estimated
row sizes are now only used as a tie-breaker for index scans.

FossilOrigin-Name: 65553ff34b41e54d129ff2fee96be714105503c4
2013-10-08 20:42:41 +00:00
drh
5f3e5e747d Use #ifdefs to omit unused code in the columnType() routine depending on
compile-time options.

FossilOrigin-Name: 3fd5e33217a91402b3499fa0977469b91618a928
2013-10-08 20:01:35 +00:00
drh
186ad8cc32 Further refinement of the idea of multiplying run-time cost estimates by
the estimated row size.

FossilOrigin-Name: 18bd6ba96d19de6047baebfa15b1f739577c9ec4
2013-10-08 18:40:37 +00:00
mistachkin
86f72f0721 Fix compilation issue with MSVC.
FossilOrigin-Name: 36d64dc36f18c166b2c93c43579fa3bbb5cd545f
2013-10-07 21:49:16 +00:00
drh
3495d20dbe Multiply all cursor step cost estimates by the estimated size of the row in
bytes, in order to get the query planner ot make use of estimated row sizes.
This check-in uses magic numbers in a few places (for example, estimates of
the size of output rows) and needs lots of refinement.  Consider this a
proof-of-concept only.

FossilOrigin-Name: cb34cfe57c2a664fbfae8106e95114400ea222d5
2013-10-07 17:32:15 +00:00
drh
6f38a6418c Merge bug fixes from trunk.
FossilOrigin-Name: 1d7b2dc0eae70c0c0e523b715acf758bb4cfa9ac
2013-10-07 10:48:06 +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
793eb043ce Remove an incorrect debugging assert() that was accidently added during the
STAT4 enhancement.

FossilOrigin-Name: 2bb7f74bbd467b74581699d16b06758f9c9457dc
2013-10-06 22:52:51 +00:00
drh
52f6c916fb Accept the sz=N parameter on table-only lines of sqlite_stat1.
FossilOrigin-Name: e9e932aa400f217e383cda9922fbde8a4356f57a
2013-10-06 22:12:41 +00:00
drh
6b169bd86d Fix an issue in the test8.c test module that arises because of the change
to PRAGMA index_list().  Remove an unused local variable.

FossilOrigin-Name: 029430c503f243a34439698779db7e591cfbe126
2013-10-05 20:18:25 +00:00
drh
e13e9f54b0 Completely remove the iScanRatio field. The PRAGMA index_list(TABLE) command
shows the estimated row size in the forth column.  It also generates a row
for the table with an index name of NULL.  The query planner still does not
take row size estimates into account - that is the next step.

FossilOrigin-Name: 8b4aa0c7a2122bbe60432edadf27e490e31ec987
2013-10-05 19:18:00 +00:00
drh
0af62b015a Improvements to the LogEst command-line tool used to convert between
ordinary numbers and the LogEst representation.

FossilOrigin-Name: 5252aeb61988e511dcf8d527fa81e51a5c9385f9
2013-10-05 18:32:30 +00:00
drh
bf539c4d5c Begin an experimental refactoring to estimate the average number of bytes
in table and index rows and to use that information in query planner.
Begin by renaming WhereCost to LogEst and making that type and its
conversion routines available outside of where.c.

FossilOrigin-Name: 66c4a251d61582b47d5cbe50cbca160a9209bd06
2013-10-05 18:16:02 +00:00
drh
6919b07556 In the index_list pragma, make sure the "r" column is the same on output
as it was on input in the sqlite_stat1 table.

FossilOrigin-Name: de78250ad2a6210dd4f03045248f7192d64427f2
2013-10-05 02:56:25 +00:00
drh
03e1754e31 Merge trunk changes.
FossilOrigin-Name: c6ac80ed8d5240dd30783d62d9f133e159809dec
2013-10-04 20:39:44 +00:00
drh
d3037a4123 Further refinements of the index scanning speed logic.
FossilOrigin-Name: e5d9371da92b4cc2c1df177cf40e0ced4d4c7421
2013-10-04 18:29:25 +00:00
dan
5988572876 If an "INSERT INTO ... SELECT" can use the xfer optimization, pass the OPFLAG_BULKCSR hint to btree cursors used to update indices. This results in a tighter key packing.
FossilOrigin-Name: 087af29ee2e1572f8668dd0152a14d7f9796a530
2013-10-04 18:17:18 +00:00
drh
165674d8db Fix test cases so that they work when the query planner uses index size
estimates to determine whether or not to try an covering index scan.

FossilOrigin-Name: 2f394de88f23dacd3c61e586a4214ffc6f927d97
2013-10-04 15:58:59 +00:00
drh
fdaac671b8 Improved estimates of the relative speed of index scans based on declared
datatypes of columns in the table.  Add "r" column to PRAGMA index_info,
showing the estimated relative scan rate.

FossilOrigin-Name: 07462bb6059f023c22a6c84a4a02afbd84e69255
2013-10-04 15:30:21 +00:00
drh
d9e3cad2f8 Progress toward using the iScanRatio information on indices. Many tests
are still failing.

FossilOrigin-Name: 6c352edbba85a15ca356b5e131f4b3b2723d1774
2013-10-04 02:36:19 +00:00
drh
5f33f37580 Make sure the count(*) optimization works correctly even when partial
indices are present.  Ticket [a5c8ed66cae].

FossilOrigin-Name: 9f2f4c0a50808910ad01c8c4352367f25747be08
2013-10-04 00:00:12 +00:00
dan
5db2605a80 Have FTS take advantage of "docid<?" constraints when they are present. Extend the FTS "incremental doclist" optimization so that it is used for tokens within multi-token phrases.
FossilOrigin-Name: baf8ce5916ea9baf0ec557263cb9c7ecf716431f
2013-10-03 20:41:18 +00:00
dan
de07791a9c Merge latest trunk changes.
FossilOrigin-Name: 24aa20da222a9cc181473bc41d0f8791be91fa97
2013-10-03 20:28:22 +00:00
dan
9211f8a6ce Allow FTS4 multi-token phrases to use a combination of in-memory and incrementally loaded doclists. This allows phrases to (partially) benefit from incremental doclists without disabling the deferred token optimization.
FossilOrigin-Name: f6819c5f3363d358e7ef65fe6978f13991bd44af
2013-10-03 19:27:14 +00:00
drh
c28c4e5009 Experimental branch allowing different postulated scan rates for each index.
FossilOrigin-Name: d59d97b0a8d70dc31d45db61bbc11ebb5375a224
2013-10-03 19:21:41 +00:00
drh
d100f6912d The sqlite3FixInit() routine cannot fail. So change the return type from "int"
to "void".

FossilOrigin-Name: 500c5932fe3f5fcd0940522f7839d581c555e0eb
2013-10-03 15:39:44 +00:00