Commit Graph

20849 Commits

Author SHA1 Message Date
mistachkin
f71a243a60 Sync up warning related compiler options in the Makefiles for MSVC.
FossilOrigin-Name: e77d48d1dd140967b18106044dd45e2ba6cd77b6aa5afa8bf3f0a9c16a50eec4
2019-07-29 02:52:11 +00:00
mistachkin
ac713403fd Fix harmless compiler warning seen with MSVC for x64.
FossilOrigin-Name: 857b2ba6d05d6f5a8cfdf269bae9005b25e1903ab9dc6b70546979d8c633f03b
2019-07-29 02:49:14 +00:00
dan
b8293a5bee Update RBU so that it supports indexes on expressions.
FossilOrigin-Name: 6bfa44da226fd758a2ee924d1e8e3a742b0635b6d3f922a4a7919cb14b2418e6
2019-07-26 20:33:23 +00:00
dan
dff1d5b61b Fix RBU handling of partial indexes with comments embedded in their CREATE INDEX statements.
FossilOrigin-Name: e1ccf211aa975a6688a27f7dc4cea80784ed8dcfe1950b2fa6eb0a3cb938838a
2019-07-26 16:16:31 +00:00
dan
bfe33f80dd Fix a potential buffer overread in fts5 triggered by a corrupt database record.
FossilOrigin-Name: 16472112b6886ada18d45cfb409cca2e83dde5a8ba8a36d481e87b61100b0186
2019-07-25 19:29:24 +00:00
drh
00c12a51e3 Fix faulty asserts in the code generator.
Ticket [c52b09c7f38903b1]

FossilOrigin-Name: 01cdc590f7894ea23ee0d674747d7ebf8196efbef3c87d47e72dbc1ab6ae2883
2019-07-24 23:15:19 +00:00
dan
9443dbc493 Improve the ".recover" command so that it handles intkey pages linked into non-intkey b-trees, and vice-versa, better.
FossilOrigin-Name: 9c458acba5a100a76148a3efb78ea9f57b85751e80788e4532694bd8976608a0
2019-07-24 20:10:27 +00:00
dan
01c08bcacd Improve the ".recover" command's handling of corrupt database schemas.
FossilOrigin-Name: becaaa4d29d17ad613f2a120f0b173e53403b3de26f22beaf83f66ebf369bf60
2019-07-24 19:20:30 +00:00
dan
95063c2867 Improve the ".recover" command in the shell tool so that it is not confused by auto-vacuum databases. And so that it can recover tables for which one or more of the column names are SQL keywords.
FossilOrigin-Name: 87d76047d6a3df31bc9b7c0cffa7b758236c124f87263a520850b019cbbc4c6e
2019-07-24 08:15:09 +00:00
dan
1c70f71e12 Avoid redefining types u32 and u16 when fossildelta.c is compiled as part of the amalgamation.
FossilOrigin-Name: d8e88248e3204b5f2b95b9b8921ee7ee2f7574ae81e6abd5b4f2ddf187f7d71b
2019-07-23 13:26:43 +00:00
drh
9378818d89 Do not use the insert-overwrite optimization if the cell might overwrite the
page header.

FossilOrigin-Name: f60a83069168899dcfd706b4d0901084c7ce92d85277950317e962a8a98ec668
2019-07-22 23:24:01 +00:00
drh
e209457295 Consolidate the removal of Window objects from the Select.pWin list into
a single subroutine.

FossilOrigin-Name: e46b2afc99329c43de08d4a2e6ade4d2239d7409c5d5626bf272a3e0dd24d1b4
2019-07-22 19:01:38 +00:00
dan
e0ae3f69eb Fix a bug in the linked-list handling code added by commit [fd7316cd].
FossilOrigin-Name: 05080344dceafcfb670fbf01f7d69a1d713a54b6845f968a9cfe941fb53b13af
2019-07-22 17:28:43 +00:00
drh
cda50737f4 New test cases added to test/fuzzdata8.db
FossilOrigin-Name: 25fec62ac5a23382a54eee78d3705885eb4065826d7e8da098816d03ae9dc639
2019-07-22 16:57:13 +00:00
dan
7f6f12bdd3 Remove Window objects from the corresponding Select.pWin list when they are deleted, as they are, for example, when the ORDER BY clause is optimized out.
FossilOrigin-Name: fd7316cda0fdfe86985f41a97dff3beba188606ec9bc6fef38a686a6976a6e01
2019-07-22 16:33:02 +00:00
dan
75b0821e99 Remove Window objects from the corresponding Select.pWin list when they are deleted.
FossilOrigin-Name: d23f33168222dfa40a67dc7de58057418151989e81429e4af47617e86db04667
2019-07-22 16:20:03 +00:00
dan
1e60261cfb Fix a problem with renaming tables when the schema contains an invocation of a currently unregistered aggregate with a FILTER clause.
FossilOrigin-Name: bd37ce3fb8dee8d538f6afc0bfc13cdc3ebdd504e6461f0130c6ecc8af585f68
2019-07-22 11:38:43 +00:00
drh
fd15e18d7f Make sure any window definitions in an ORDER BY clause are removed from
the SELECT statement if the ORDER BY clause gets optimized out.

FossilOrigin-Name: 23b119671f0be3c6b72cf2dc5f7707a0626766db7aa56529ab00d33d1a0a1bee
2019-07-20 21:12:31 +00:00
drh
7fc296aa66 Early detection of a corrupt R-Tree in the R-Tree search algorithm.
FossilOrigin-Name: 2bf5a4c16457562dc942bcc6ec06d9b4e795ef3ea8e31550e18857bbebd08a76
2019-07-20 18:00:46 +00:00
drh
bcb0e64c82 Performance optimizations in the rtreeStepToLeaf() routine of RTree.
FossilOrigin-Name: 4e34e3615ff31f4a6432033797b2e1a6604007ea0e501d714ecb362632776150
2019-07-20 17:43:28 +00:00
drh
e04c1ec52a New test cases added to test/fuzzdata8.db.
FossilOrigin-Name: 39be3c61bd809cc89bdfdba90afc391ac9c2f81dfd8bb68a9b085b0ca8cd1fba
2019-07-19 15:03:54 +00:00
drh
c5cc870ef8 Refinement to check-in [348e7f193a963390] that avoids unreachable branches.
FossilOrigin-Name: bbfb2908ecd113c88e69a0984cbe2550463cdd3a67648b0e4e3578e80630136e
2019-07-19 15:00:32 +00:00
dan
9bf022d57c Fix a problem with renaming a table when the schema contains an invocation of a window function that is not currently registered.
FossilOrigin-Name: ff290feb97f689cf6ce4162d6aa36f9f9dcf1bff3096847d53a85f39f728d2de
2019-07-19 14:32:42 +00:00
dan
750c6ba5e5 Fix a problem with renaming tables when the schema contains WINDOW definitions with (illegal) non-numeric expressions as part of a PRECEDING or FOLLOWING clause.
FossilOrigin-Name: 348e7f193a963390a0595183d603541f85c5d1a911c98ed2e06599691ffe98f5
2019-07-19 11:20:42 +00:00
dan
a1ac03590b Fix a faulty assert() in walker.c that could fail when processing an ALTER TABLE statement on a schema containing invalid table references that are part of a WINDOW definition.
FossilOrigin-Name: ee076c28d8ee0f5b099cdef83ae6cea6ef5aa209ab528d7c49949dd653ce019c
2019-07-19 10:31:29 +00:00
drh
b555b0806e Fix a new problem in the BETWEEN operator when applied to a window function.
The problem was introduced yesterday by check-in [7ef7b23cbb1b9ace].

FossilOrigin-Name: 47e23064ba0205148f89e12803a62d5a4d6d2054f593f60c031e815112170b9b
2019-07-19 01:11:27 +00:00
drh
4509ffa362 Always use the stdlib.h intptr_t type for pointer-integer conversions, when
it is available.

FossilOrigin-Name: c0d932449db3deed42a99bd948aab61e56b2d8441d7de5243688695ff04e8177
2019-07-17 19:57:55 +00:00
drh
996f5ccb33 Fix an incorrect assert() in balance_nonroot().
FossilOrigin-Name: 59c9e73f86b89ee17b0bce47bcb93f5b5ace5b7985678287195002afb9d40cd8
2019-07-17 16:18:01 +00:00
drh
09ea1256ec Improvement to the hexdb interpreter built into the CLI and into the
TCL test harness: Round the "size" up to the next multiple of the "pagesize".

FossilOrigin-Name: 9ec92939cb2d2c96ae15bc496feed233ce31424c25a6bf86ace7e0ef3eedec5b
2019-07-17 15:05:16 +00:00
dan
8b65e5919d When processing a BETWEEN or CASE expression, avoid transforming a node of the original expression into a TK_REGISTER node. Instead, take a copy and use it instead. Fix for [1be72aab9].
FossilOrigin-Name: 7ef7b23cbb1b9ace9f853238d9133320c153e6c3417e6823ab6394ee1fe56358
2019-07-17 14:34:17 +00:00
drh
3db3d12cd1 Fix the WITHOUT ROWID table logic so that it generates a correct KeyInfo
object for tables that have a PRIMARY KEY containing the same column used
more than once with different collating sequences.  Enhance the index_xinfo
pragma to assist in testing the above. Fix for ticket [fd3aec0c7e3e2998].

FossilOrigin-Name: 84a51a755c18ac8253080db6eec505df894ee3b1e97cfa8e61039ac38001e270
2019-07-17 12:49:16 +00:00
drh
19d9a3ca6c New test cases for PRAGMA index_xinfo on a WITHOUT ROWID table. And new
testcases using index_xinfo to verify that WITHOUT ROWID tables are
constructed correctly.

FossilOrigin-Name: 340378c1e60da80263523776f4b6366a9d332a7ee25986637e8b157f4e8e4bd3
2019-07-17 12:42:15 +00:00
drh
7b1904e35d Enhance the "PRAGMA index_info()" and "PRAGMA index_xinfo()" statements so that
they allow a WITHOUT ROWID table as their argument, and in that case show
the structure of the underlying index used to implement the WITHOUT ROWID
table.

FossilOrigin-Name: 62274ff683ba077d8b0fa34ad653ce235a8c5cbfdb7ab8558469af7333d03698
2019-07-17 11:01:11 +00:00
dan
1ff9407198 Fix problems with duplicate fields in the PRIMARY KEYs of WITHOUT ROWID tables.
FossilOrigin-Name: bd9a47a3a2997bfbf9c8a11c5b7196e362974054e58a2fe701778b1580264de8
2019-07-17 09:18:06 +00:00
dan
4d02b5f7d0 Add casts to shell.c.in to avoid warnings on systems where size_t is 32 bits.
FossilOrigin-Name: fe014288ac03cdf0dc5410b7d45cad4768759b52746c0a22bce2fc03779c5d5a
2019-07-17 07:23:06 +00:00
drh
55f66b341a Add new assert() statements in an attempt to help static analyzers avoid
false-positives.

FossilOrigin-Name: 9e66458592d40fbd96ea5f21339573110ca1cfe328238a020c9420a87d35dd72
2019-07-16 19:44:32 +00:00
drh
2cd02a5d2a Add assert()s in os_win.c in an effort to silence false-positives from
static analyzers.

FossilOrigin-Name: 22a7c15b262376fb0ce4dd3d044373380d86c5ccd96e2f24576cf04318597c33
2019-07-16 18:27:07 +00:00
dan
993b48e2b7 Call ioctl() with the correct signature on both Android and stock Linux.
FossilOrigin-Name: 2422534908a85a4cd11784e4c23a74ad121404f73dade587bf27efde1e2b982b
2019-07-16 05:11:16 +00:00
dan
e464802d49 Fix a problem that could cause a crash if a blob handle were closed after the associated database handle was closed using sqlite3_close_v2().
FossilOrigin-Name: 52f463d29407fad691c42b13462880e7605603c9be9f480d18e953a0ef78149a
2019-07-15 13:58:28 +00:00
dan
ec9b2a132b Call ioctl() with the correct signature on both Android and stock Linux.
FossilOrigin-Name: 68e12e063fe41bcd65cf8a120f838b9b1723ed803ea85240fe0f2145b78df2d7
2019-07-15 07:58:28 +00:00
drh
08e2e8e680 Mark an unreachable branch using ALWAYS().
FossilOrigin-Name: 0fff105a3e501fd91877d67761459eb0323e6cf79916242027cce0d05697f554
2019-07-14 00:15:07 +00:00
dan
0088574271 Fix a memory leak that could follow an OOM in the new FILTER code.
FossilOrigin-Name: 85fd70fead834aed16cffbea892b2255b4e10dd677f4dbbb96062d5ff42efdeb
2019-07-13 18:27:54 +00:00
dan
8f245174a3 Fix a typo in test file window1.test.
FossilOrigin-Name: 8c80e81d01abde9a5032cdc1a492d0fccd8db139f78d2db9413a60cfdc8e0f64
2019-07-13 17:54:24 +00:00
dan
5e61c1b741 Fix error handling for the case where a window function is passed the wrong number of arguments.
FossilOrigin-Name: 871796bb19e61c1282d8ac97a82d8b57bde50f2a2a08004ab53136d77c138df4
2019-07-13 17:45:25 +00:00
drh
ea38f4f4cc Fix a double-quoted string literal used in the ".schema" command of the CLI.
FossilOrigin-Name: fcd937d9786a82ef4147e657d54ea0beb6ac87e2eb1677186b318493d473077b
2019-07-13 17:21:47 +00:00
dan
df9d32441a Add support for attaching a FILTER clause to an aggregate function.
FossilOrigin-Name: ee293e5aeac0b05a8b809095610fd8b4fdaf8e68cd368de90ec0d45e3582ffe5
2019-07-13 16:39:38 +00:00
dan
4f9adee289 Rework the FILTER clause implementation to share more code with window functions.
FossilOrigin-Name: 5dac8c38dfc3f41c5c8fb49ca35de7fd1b21f269d72e8ba6ba59ed0a4030a54d
2019-07-13 16:22:50 +00:00
drh
8616cff6c8 Remove unreachable "break" statements to silence harmless compiler warnings
from ICC.

FossilOrigin-Name: 0d7287e1bfdd5a392bf2fb17699e7cfd0b08bf61fab6cbf4b4bb347b3c4b4610
2019-07-13 16:15:23 +00:00
dan
648d629953 Merge latest trunk changes into this branch.
FossilOrigin-Name: 86ab963cc5743867e0535b78a5776e18c13835aa44bf2009f77642df8407cb3f
2019-07-13 09:56:56 +00:00
dan
01fd42beef Trivial performance improvement for balance().
FossilOrigin-Name: c7920f5569022f645ec4dbfce8c228880263785c708c2c0ac065e770c438b1d9
2019-07-13 09:55:33 +00:00