Commit Graph

11476 Commits

Author SHA1 Message Date
drh
11e85273df Work on the UPDATE and INSERT logic. This is an incremental check-in so that
can switch over to trunk to work on an unrelated issue there.

FossilOrigin-Name: 086ec2a177b24ad90d5d705a99d93aa0c1545217
2013-10-26 15:40:48 +00:00
drh
6f225d0d7f Replace the OP_IsUnique opcode with OP_NoConflict. This code simplification
might be useful to move onto trunk even if this branch is never merged.

FossilOrigin-Name: e6650e16dd11327afd25961b2feb29ec8778c2ca
2013-10-26 13:36:51 +00:00
drh
d82b50212e Minor refactoring of variable names and fixes to comments in insert.c.
FossilOrigin-Name: ae61a34378d3ed2f454ba8768029d6f5fef849e4
2013-10-26 00:58:34 +00:00
drh
ea22abe3d6 Progress toward getting UPDATE to work in WITHOUT ROWID tables.
FossilOrigin-Name: e557b7d80f1ede63427a31b16757bf5d8dbfb66d
2013-10-25 19:17:17 +00:00
drh
261c02d963 Basic DELETE operations now working on WITHOUT ROWID tables.
FossilOrigin-Name: 9eafafa31c4a2bbcf48418743e0fcb17c374e9a6
2013-10-25 14:46:15 +00:00
drh
ecb31b6304 Update the interface to the sqlite3GenerateRowDelete() utility so that it is
able to handle WITHOUT ROWID tables.  The implementation still needs to be 
completed.

FossilOrigin-Name: 85daf5174679630474b3bccf3d662d5d56bf00d5
2013-10-24 19:48:39 +00:00
drh
9eade087da Delete PRIMARY KEY index entries last. Only construct the unique prefix of
an index key when deleting entries from an index.

FossilOrigin-Name: 0e56ba69f0fcd12a5166c32f6e4eacdcc29fba04
2013-10-24 14:16:10 +00:00
drh
acbbc5ba36 Remove an obsolete comment from the VDBE. No code changes.
FossilOrigin-Name: 53bb070c851db02c9d900cb041ab441895ddbfb7
2013-10-24 11:55:42 +00:00
drh
85c1c557d0 Correctly handle queries that use secondary indices of WITHOUT ROWID tables.
FossilOrigin-Name: d8bc8595301789d0e9de24c391808121905ab559
2013-10-24 00:18:18 +00:00
drh
dd9930ef20 Change the sqlite3OpenTable() utility to open the PRIMARY KEY index when
reading a WITHOUT ROWID table.

FossilOrigin-Name: 247f389930aededaa54ecb792748aa8d0ad6d57b
2013-10-23 23:37:02 +00:00
drh
4415628a4a Construct secondary indices on WITHOUT ROWID tables.
FossilOrigin-Name: 2c028ddc85cb45746cad6ab0cefd99134fbd50d7
2013-10-23 22:23:03 +00:00
drh
11f9b033cc Report an error when trying to resolve column name "rowid" in a
WITHOUT ROWID table.

FossilOrigin-Name: 36bcc9cb885523fba2f3b0d152de9e08073668c1
2013-10-23 17:39:41 +00:00
drh
55548273a3 Get VACUUM and the xfer optimization working with WITHOUT ROWID.
FossilOrigin-Name: 579815fff1737552d2077255862b8f4fd220927c
2013-10-23 16:03:07 +00:00
drh
ad124329ab Some inserts and queries working for multi-column primary keys
and WITHOUT ROWID.

FossilOrigin-Name: b21d831b2aa55507dd9def2acb02cdbffddf10d1
2013-10-23 13:30:58 +00:00
drh
ec95c44175 Some simple inserts and queries working on WITHOUT ROWID tables.
FossilOrigin-Name: 3f8016dee24213ec83a02d71ad2698789cc3a818
2013-10-23 01:57:32 +00:00
drh
7f9c5dbfe9 Build internal data structures appropriately for WITHOUT ROWID tables.
FossilOrigin-Name: 35a3606071685aa5196951f4bdddb136589ea216
2013-10-23 00:32:58 +00:00
drh
bbbdc83b52 The Index object now has nKeyCol and nColumn. nColumn is the total number
of columns and nKeyCol is the number of key columns.  Currently these always
differ by one.  Refactor aiColumn[] to be of type i16 instead of int.

FossilOrigin-Name: a106ce86cd4afd1f81603826de77df1fb25e9ab5
2013-10-22 18:01:40 +00:00
drh
77e57dfbc8 Add a procedure to handle the messy details of allocating an Index object
from the heap.

FossilOrigin-Name: 45efc94f9a8169433ffcb4aa35760551c55df4c4
2013-10-22 14:28:02 +00:00
drh
42533337e2 Extra backwards-compatibility tests verify that UNIQUE and PRIMARY KEY
indices are created in the correct order.  Other backwards-compatibility
tests already cover this, but it does not hurt to double up.

FossilOrigin-Name: 5ca0ea2e9b40a7fa133d2af8a2ecc676de7a8723
2013-10-22 10:23:26 +00:00
drh
8ea30bfcbc Previous refactor is not going to be helpful because implied indices must be
created in the same order that they appear in the CREATE TABLE statement
for backwards compatibility.  This is a much smaller change to clean up a
few loose ends.

FossilOrigin-Name: 824b549f9b42935609b283d51f6c386da89a08a7
2013-10-22 01:18:17 +00:00
drh
5969da4a2c Simplification of the syntax: Merely append "WITHOUT rowid" to the end of
the table definition.

FossilOrigin-Name: 131cc6e152abe1a2d48e6d8d40d2c2f8dbe723e7
2013-10-21 02:14:45 +00:00
drh
81eba73ebf Experimental changes toward "index only" tables. Add the ability to specify
options on CREATE TABLE statements using the WITH clause modeled after
PostgreSQL and SQL Server.  Only the "omit_rowid" option is currently
recognized and that option is currently a no-op.

FossilOrigin-Name: 0248ec5e6e3797575388f046d8c27f7445fe2a39
2013-10-19 23:31:56 +00:00
drh
05684271c6 Improved header comment with better instructions on the vfslog.c
extension.

FossilOrigin-Name: 4bd592c8f0e011e203443a6e88008a61d6926df5
2013-10-19 16:51:39 +00:00
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
06d6efb661 Further enhance the vfslog extension to record the number of freelist pages
and the first freelist page in CHNGCTR-READ and CHNGCTR-WRITE records.

FossilOrigin-Name: 08157524ca816a81f3c341097e23982727eaa125
2013-10-18 17:42:35 +00:00
drh
2eebbf699e In the vfslog extension for FILECONTROL records, show the pragma name for
SQLITE_FCNTL_PRAGMAs and the requested size for SQLITE_FCNTL_SIZE_HINT.

FossilOrigin-Name: f062969548da26850ceeb48d4283f6567f828887
2013-10-18 14:37:26 +00:00
drh
f05fba3afa Version 3.8.1
FossilOrigin-Name: c78be6d786c19073b3a6730dfe3fb1be54f5657a
2013-10-17 12:57:35 +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
a4bbc8b119 Add the "languageid" hidden column to fts4aux.
FossilOrigin-Name: 891df358e51075fb937f34952ce43bf51130b0d0
2013-10-15 19:06:17 +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
a2617433a9 Fix harmless macro redefinition warnings in the totype extension.
FossilOrigin-Name: c9c1f8d6701b0a1bc939a7e35e565d4160dbf8d3
2013-10-15 11:58:34 +00:00
mistachkin
bc863b50ba Fix harmless macro redefinition warnings in the totype extension.
FossilOrigin-Name: a38adeb7ffd77474754b66877d60717cdb3cb865
2013-10-15 10:43:04 +00:00
mistachkin
0593516fcc Fix harmless compiler warning in the totype extension. Include all standard whitespace characters in totypeIsspace. Minor adjustments to style and comments.
FossilOrigin-Name: 73238f655a58c810876f46cc04eab1ac2d5b8ef7
2013-10-14 22:35:40 +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
dan
362d21614e Fix a crash in FTS incremental phrase processing that can occur if the second or subsequent token is much more common in the dataset than the first.
FossilOrigin-Name: 0bf438fc30582a08fddfc3cec49366ee17ae2abe
2013-10-14 20:30:51 +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
drh
c0f1d0c697 Add a new application_id for GeoPackage version 1.0.
FossilOrigin-Name: 98ddfe45713775657e586f5a2499cf3c036f13dd
2013-10-14 10:46:05 +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