dan
197bc20c48
Fix a bug causing an "malformed database schema error" error if a temp table with the same name as an existing table that has at least one temp trigger attached to it is created.
...
FossilOrigin-Name: 56dca4a65c3b14123272fa0cc5c15530c06fda28
2013-10-19 15:07:49 +00:00
drh
8f8b231239
Add the SQLITE_FCNTL_TRACE file control and generate it for OP_Trace
...
when compiled with SQLITE_USE_FCNTL_TRACE. Update vfslog.c to make
use of the new file control. Also update vfslog.c to log UNLOCK events
before the fact, rather than afterwards.
FossilOrigin-Name: e801f35a96d861a1e5f223655af4c8a6a7e356bc
2013-10-18 20:03:43 +00:00
drh
b32652601c
Fix a typo in a requirements mark comment. No changes to code.
...
FossilOrigin-Name: e5a439cfa5c921187e4aa7050832ec2660fba13d
2013-10-16 23:58:21 +00:00
dan
14285b7067
Clear a valgrind error by zeroing the first 4 bytes of the temp-space allocation used by the b-tree module.
...
FossilOrigin-Name: 8651aba1865a8f82d21d3345f33fbd239fd9a042
2013-10-16 11:39:07 +00:00
drh
0353ed2136
Fix memory and resource leaks for WinCE and Cygwin, and a compiler warning
...
on windows with SQLITE_THREADSAFE=0.
FossilOrigin-Name: 9905cea9d45c90f2241f56dc32a25501476983bc
2013-10-16 11:31:51 +00:00
mistachkin
c216566ba5
Fix memory/resource leaks for WinCE and Cygwin.
...
FossilOrigin-Name: 2470d1bb08b2661bcfde7a605208eb6044836d5c
2013-10-16 09:49:10 +00:00
dan
cfe111b1f7
Changes to test code to make sure no server threads are left running after server1.test finishes.
...
FossilOrigin-Name: 1086e00bcaacc88ef2a9dda8a20698b0899ad2f7
2013-10-15 15:35:27 +00:00
drh
a703f50d7e
Fix an 8-byte alignment problem on the "crash test" harness (test code,
...
not in the core) that causes problems on Sparc.
FossilOrigin-Name: bcbc65030fa7c61f94100142e94ba2a5774f85b0
2013-10-15 14:29:32 +00:00
drh
5f8cdac620
Move the tointeger() and toreal() functions out of core and make them into
...
a run-time loadable extension.
FossilOrigin-Name: 9f66dd7e3790c04f0ab724419f5381bd21f9ebad
2013-10-14 21:14:42 +00:00
drh
4398c9524f
Add implementations for the toInteger() and toReal() SQL functions.
...
FossilOrigin-Name: a0f7cbc068416cf55b86056f2ce7ee505c6cc3ea
2013-10-14 19:35:33 +00:00
dan
67896cef89
Fix for building with SQLITE_OMIT_FOREIGN_KEY.
...
FossilOrigin-Name: b8b5f6c8f646989bc62bb59416de9bca003a5896
2013-10-14 15:41:39 +00:00
drh
71d5338c5d
Update the foreign_key_check pragma so that when a parent table is undefined
...
it is treated as an empty table.
FossilOrigin-Name: 208b259ad73b51e7df163fee3d7ed2bd79767597
2013-10-14 14:30:02 +00:00
drh
0ae4f14e45
Corrects to comments on the STAT4 implementation.
...
FossilOrigin-Name: e06f74d32d44f281dd21908d401184f35f9455a4
2013-10-14 14:21:59 +00:00
drh
a7f4bf3f88
Make subroutines sampleCopy() and valueFromExpr() have file scope.
...
FossilOrigin-Name: 1660efbe46439734c7dc1674994ceb86a9b41d1a
2013-10-14 13:21:00 +00:00
mistachkin
d5570119b7
Merge updates from trunk.
...
FossilOrigin-Name: a88b5be01e68b26267ff6eb05e931ef2e7fc9f99
2013-10-12 23:39:49 +00:00
drh
3ef261567a
Restore the index_list pragma back to its former operation. Create a new
...
PRAGMA stats used to access the table and index widths and heights.
FossilOrigin-Name: f0cf8c85dcbcc7778aed2816792c368d777f79cb
2013-10-12 20:22:00 +00:00
dan
5e87830fa3
In "PRAGMA foreign_key_check", treat missing parent tables as empty (instead of as errors).
...
FossilOrigin-Name: 8c13a7fd738e5441af370537649b0bfa97679cda
2013-10-12 19:06:48 +00:00
dan
a8dbadacee
Fix handling of "DROP TABLE" commands when "PRAGMA defer_foreign_keys=1" is set.
...
FossilOrigin-Name: 27001356ed8201529b3f31d4313f2010f1b4e1b1
2013-10-12 15:12:43 +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
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
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
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
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
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
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
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
drh
f63936e805
Rework the PRAGMA implementation to only call sqlite3ReadSchema() from a single
...
place, based on a flag in the pragma table, rather than separately from each
case which needs the schema.
FossilOrigin-Name: 8338232a111be16d6c2ab57176d0a23a001f02ad
2013-10-03 14:08:07 +00:00
dan
46539d7cfa
Return an error if an attempt is made to create a trigger with an SQL variable embedded within it. If such a variable reference is found within a trigger definition loaded from the sqlite_master table, silently replace it with a NULL.
...
FossilOrigin-Name: f35f6ae3da77dbdf5f7a4a9927475659fc6e0ca6
2013-10-03 12:29:38 +00:00
drh
582d47d27a
Remove unnecessary memset() calls from test code.
...
FossilOrigin-Name: eec3187bc68ddebdbc2113f77c7f5cd32e9be61f
2013-10-03 11:27:56 +00:00
drh
e75fb06146
Bring some file format comments in btreeInt.h up to date.
...
FossilOrigin-Name: 012d54d0d2b40888d08915082592ba75d70891c1
2013-10-01 20:29:30 +00:00