dan
1db7db1f03
Update test file func6.test so that it works with SQLITE_ENABLE_NULL_TRIM
...
builds.
FossilOrigin-Name: e128d72f1a565551d3b6fdb3807fcb1c2a2bf355f0c09d04562b62f49d01fdbc
2018-02-12 15:27:32 +00:00
drh
00c3ef2df9
Fix a possible infinite loop in VACUUM that can come up when the schema
...
has been carefully corrupted. Problem discovered by OSSFuzz. Test cases
in TH3.
FossilOrigin-Name: 27754b74ddf6463c6f9c48ea0df3637945b5ea086b92a41ddeb55b9aaefea4c2
2018-02-12 13:30:34 +00:00
drh
c86d82f27d
Fix misplaced testcase() macros from the previous check-in.
...
FossilOrigin-Name: 3aed949a18a251c5795f21f0385c205a127502b7e9cf06bc7f4c763951cd7984
2018-02-10 02:31:30 +00:00
drh
f313952097
Improve the performance of the built-in REPLACE() function in cases where
...
it does many substitutions that make the string larger. OSSFuzz is reporting
intermittant timeouts when running a test where it does a REPLACE() on a
930KB random blob. Perhaps this enhancement will fix that.
FossilOrigin-Name: fab2c2b07b5d3cd851db3e6f5c8a44155e32b0df22905ea33412b153b825a928
2018-02-09 23:25:14 +00:00
drh
510fea885e
Add the zorder.c extension implementing zorder() and unzorder() SQL functions.
...
FossilOrigin-Name: a57a77dc0cc9fbaa9d5b134422f7a8cc8d4c2851ed3c2bdd449800c6a5d2aae0
2018-02-09 20:49:15 +00:00
dan
91347c066b
Make the tests in func6.test more robust against implementation changes.
...
FossilOrigin-Name: b685d3231097fb90e7d61d9ac01cc560e8bf2671d49390ae7af5bfdbd6d04f11
2018-02-09 15:42:40 +00:00
drh
54cfb492b7
Fix a harmless compiler warning.
...
FossilOrigin-Name: a6c3115483d597fc77ab19fdcfd1d3437cad7e467081ad8c5315fb98c115eed9
2018-02-09 15:04:51 +00:00
mistachkin
2a86110a6c
Enhance sqlite3ErrStr() to include several more error codes.
...
FossilOrigin-Name: ad5d3bdc739a0997786f94fb5789b726b9f53ff883226093924338fe5000922b
2018-02-08 01:00:11 +00:00
mistachkin
b189e4101c
Fix typo in comment. Skip tests added by check-in [4761db83b6] when running on Windows.
...
FossilOrigin-Name: 468a389cdc8b6f92c77b11f682e210ad8cce7e3dbc0df308a898f4115e85fce2
2018-02-07 18:45:00 +00:00
dan
eab0e10304
In extensions rtree, fts3 and fts5, ensure that when dynamic buffers are bound
...
to persistent SQL statements using SQLITE_STATIC, the binding is replaced with
an SQL NULL before the buffer is freed. Otherwise, a user may obtain a pointer
to the persistent statement using sqlite3_next_stmt() and attempt to access
the freed buffer using sqlite3_expanded_sql() or similar.
FossilOrigin-Name: 2a5f813bc61f9e780f2ccbda425611f65ad523b6d486a1e5e2b9d5e9f1d260a2
2018-02-07 18:02:50 +00:00
dan
fa68815fa3
When the final connection disconnects from a wal mode database, check that the
...
database file has not been moved or unlinked before deleting the wal and shm
files.
FossilOrigin-Name: 4761db83b6d3d57f281370899403c102e39ad0021d315dd6a6912d250436782a
2018-02-07 16:14:41 +00:00
mistachkin
bc6b8d7359
Adjust the previous check-in, which modified the Win32 VFS, so that it works with SQLITE_OMIT_WAL.
...
FossilOrigin-Name: 36c2e67e82626f8d0a187c6c286c133ed659889e3b577469261b9dcd3b3ab75b
2018-02-05 21:02:47 +00:00
mistachkin
435666e26d
Allocation the mutex used by the Win32 VFS only once at initialization, instead of every time it is needed.
...
FossilOrigin-Name: 535ed0ac5e8728ec91fc0a4cb54b820923d161cfd4e0e6aed6df6cdae365bc7d
2018-02-05 20:42:50 +00:00
drh
561158937b
Allocation the mutex used by the unix VFS only once at initialization, instead
...
of every time it is needed.
FossilOrigin-Name: 5764dc160783f5c4017204b3e26a89d31240c868484ced8214c9ad872bd77bd4
2018-02-05 16:39:12 +00:00
dan
d1317095b5
Fix another minor problem in walro2.test.
...
FossilOrigin-Name: ba0631de60ca38bf7efa6dbd86ec8774bf6f438c804155968e97f17eabe3b20a
2018-02-05 13:42:45 +00:00
dan
60d72b9bab
Update test file walro2.test to account for systems with a page-size
...
(getpagesize()) larger than 32KB.
FossilOrigin-Name: d9e59cfb8476e1ec1ca458b8382172526c0557ab785f41e31971d03045c9344c
2018-02-05 13:28:51 +00:00
drh
4b18c1d53a
In the CLI,
...
make sure sqlite3_initialize() is called correctly even for non-UTF8 hosts.
FossilOrigin-Name: a3591fb54178b8f124207ff16e3ef9e58a62585feb3a56ced2b862222aea19d8
2018-02-04 20:33:13 +00:00
mistachkin
97f9059eee
Fix harmless compiler warning seen with MSVC.
...
FossilOrigin-Name: 63a914410b5750bd08836864ae456ff09549487c5ce49706fedffa3d4f973059
2018-02-04 01:30:54 +00:00
mistachkin
001f52ed7d
Move variable declaration in zipfile extension to fix MSVC compiler error.
...
FossilOrigin-Name: ac6a32482e675871c3ce5ecc727e50e4bba649e80e3c55bf99025fed5667da94
2018-02-04 01:29:01 +00:00
dan
3944cf8de3
Remove the "include <io.h>" win32 dependency from the zipfile extension.
...
FossilOrigin-Name: cb3feb3bc33718625159eddbf8ef608cd641af84e97d433d6b11ba6da94dad2e
2018-02-02 16:28:19 +00:00
dan
1dff328119
Remove the time() dependency from the zipfile extension. Use SQLite VFS
...
methods instead.
FossilOrigin-Name: 0702fb5611c7cf0154c5490eeada66afc733731dff0fe030375bae6a72123a17
2018-02-02 16:20:41 +00:00
dan
668845bb0b
Add a few more zipfile tests. No changes to code.
...
FossilOrigin-Name: 3f621545879ea39502cfaf2b61883f92c077070274b4fdf45524ded81cac3e63
2018-02-01 20:42:23 +00:00
dan
15daa6b53e
Fix a problem triggered when a zipfile virtual table is created and written to
...
within the same transaction. And add other zipfile test.
FossilOrigin-Name: 48f1c556994d7f8f359c649a1da81eec02306106b68946a9a20b276742c4610d
2018-02-01 19:41:23 +00:00
drh
563ddbe54d
New assert() statements to help ensure that no other errors similar
...
to [343634942dd54ab57b7] ever appear in the code.
FossilOrigin-Name: 5a70af1e9c567f12c997d25d0a305a8d42bf2cc92f2811e9d5fdde720665e213
2018-02-01 15:57:00 +00:00
dan
c3ef23a1c9
Fix a memory leak that could follow an IO error in the zipfile extension. And
...
add other tests.
FossilOrigin-Name: e6bb750697c3c7ceb5ce41d216e8ef6a1d556822a3b55e0a007b4a03e194a7d9
2018-02-01 15:19:54 +00:00
drh
06b3bd5b7a
When an index is based on a text representation of a numeric column in the
...
original table, make sure the indexed value uses the canonical text
representation of the numeric value in the table.
Proposed fix for ticket [343634942dd54ab57b70].
FossilOrigin-Name: 88e2ce916791d488076584f3795a89eb4277fcb812af9e4c2f383815d55ff6f1
2018-02-01 01:13:33 +00:00
dan
f8c3a2f3cf
When creating a new archive entry, have zipfile store UTC instead of local
...
time in the legacy MS-DOS format timestamp field.
FossilOrigin-Name: b730d187f2202e5b5d31ed6c94c9bb04d7c289f7086a9b44b3d9050ea3586d3a
2018-01-31 20:18:26 +00:00
dan
cfaffad65c
Fix a test case in zipfile.test.
...
FossilOrigin-Name: 4eb5b24c64ee5907c18371f563b79fa0caf58285a62b8f09e639a690e6727eaa
2018-01-31 19:45:58 +00:00
dan
44091ed368
When creating a new archive entry, have zipfile store UTC instead of local
...
time in the legacy MS-DOS format timestamp field.
FossilOrigin-Name: e2114df18383d111dd5fbac902e08b42a7f4b2b2d6f7bf29574a3722e4a4dad5
2018-01-31 19:13:31 +00:00
drh
5cd253423b
Improve the omit-left-join optimization so that it works in some cases
...
when the RHS is subject to a UNIQUE but not NOT NULL constraint.
FossilOrigin-Name: 02ba8a7ba7ba71cd7abd5dd3093ea486f53a025f6972bb444f2da37e0e2fc3b2
2018-01-31 16:50:27 +00:00
dan
4ea48144f9
Fix a failing assert() in the new code on this branch.
...
FossilOrigin-Name: 74d857d178dfadea7e07ba47439fe11aa9d282b54caf78cd6961e593b37406d0
2018-01-31 14:07:01 +00:00
drh
04a28c3b6d
Changes to the autoconf tarball so that it does not try to use system() when
...
building on iOS.
FossilOrigin-Name: 32ed9c106710c74a12d60ec33027fd6a9335627c95642ba608593b2735714da6
2018-01-31 01:38:44 +00:00
dan
099fa84727
If a virtual table xColumn method sets an error message using
...
sqlite3_result_error(), use that message in preference to any error message
left in the sqlite3_vtab object.
FossilOrigin-Name: 71e3b715ad36c2132a587b84221be6359c31d7a17c3fba201b7ed3baf17922f1
2018-01-30 18:33:23 +00:00
dan
2f7260deba
Add tests cases for the zipfile extension.
...
FossilOrigin-Name: 13b786dafd308b7aef42328f26fe64981c83d524e4bf82ceb7d58afc7146c7d3
2018-01-30 17:43:22 +00:00
dan
fdcd9d4e6c
Prevent users from creating zipfile() virtual tables without an argument.
...
FossilOrigin-Name: 81fdbe0cc5a360f818078d47a5888d0a29d555927da279a9a0213702d74ef09a
2018-01-30 14:07:55 +00:00
dan
ea4125bbef
Add unix-only tests to check that the "unzip" program can unpack archives
...
generated by the zipfile extension.
FossilOrigin-Name: 438c5c5237a801ae78809bf324bb9251fb50250addfc1f8e36659442b0e26ab6
2018-01-29 19:47:32 +00:00
dan
f8c4b99a02
Add aggregate function zipfile() to the zipfile extension. For composing new
...
zip archives in memory.
FossilOrigin-Name: e364eeac76a8225146b37d801bc6cabe03e9abede5a1412ebe9d94a32d8838cc
2018-01-29 18:41:07 +00:00
dan
8433e7166b
Update the omit-left-join optimization so that it works in some cases when the
...
RHS is subject to a UNIQUE but not NOT NULL constraint.
FossilOrigin-Name: 88411a402b29f19d69e0d06d9099eabb98c238ddb7c07ce110236316f008753e
2018-01-29 17:08:52 +00:00
dan
26e731cc88
Ensure the "unique-not-null" flag is set for automatic indexes on columns
...
declared with "col UNIQUE NOT NULL" (where the NOT NULL comes after the
UNIQUE).
FossilOrigin-Name: 8767f7b880f2e4112f75f0b6ef7be3f50ab1ae20e103e7d03d8bfe77e6c79438
2018-01-29 16:22:39 +00:00
dan
a07aa8d397
Fix missing header comments and other code issues in zipfile.c.
...
FossilOrigin-Name: 6ea8ba312c38365d3e28cfb2a367d729dd2751d1d853843eea0e18126777a320
2018-01-27 18:55:18 +00:00
dan
26333ee3ca
If a zipfile virtual table is created with no argument - "CREATE VIRTUAL TABLE
...
zzz USING zipfile()" - accumulate data in memory. Support "SELECT
zipfile_blob(z) FROM zzz LIMIT 1" to retrieve a zip archive image.
FossilOrigin-Name: e63185edfe0c316aa60c1fa085d032425ecc7db54536dfa5a977772eaf3c240e
2018-01-27 16:29:59 +00:00
drh
1822ebf9b1
Changes to avoid a harmless UB warning from clang.
...
FossilOrigin-Name: 19f5c1400054df10688ab448e7e23afef97cab4a7c7a3e411f7527509b515dd8
2018-01-27 14:25:27 +00:00
drh
c9f3db33d5
New test case for ticket [ec32177c99ccac2b1] that works without the STAT4.
...
FossilOrigin-Name: 5259d4847f2b73f26b2385f9d8cff8fe0cabc54b4deab8477c87c8d1bb5535b1
2018-01-27 13:55:56 +00:00
drh
33f10207aa
Proposed fix for the query planner problem of ticket
...
[ec32177c99ccac2b1].
FossilOrigin-Name: eef8cbef3c49e6331301a8f3f8a5fd12090b1e99e68487c2d405e53ef771f688
2018-01-27 05:40:10 +00:00
drh
c86caa58cd
Fix compiler warnings in zipfile.c.
...
FossilOrigin-Name: bed610d99b5322ee209b06966c0086e8c55f8a82be8d7693cfdeb4d728679721
2018-01-27 03:26:10 +00:00
drh
33f763d154
Fix the query planner so that it takes into account dependencies in the
...
arguments to table-valued functions in subexpressions in the WHERE clause.
Fix for ticket [80177f0c226ff54f6dd].
FossilOrigin-Name: 7daa687340e475972d6849f84fe1419a1f5700934f53fd80656849adc73d6d04
2018-01-26 22:41:59 +00:00
dan
8005d60587
If the argument to table function zipfile() is a blob (not text), assume that
...
it contains a zip file image to interpret, not the name of a file on disk.
FossilOrigin-Name: 029ebcd30cb261d949f7587ac54c23d7479796b6716fd4ca7512361b8f32de3e
2018-01-26 18:59:25 +00:00
drh
4eb57ceffc
Improve text-to-integer conversion in boundary cases. The
...
sqlite3Atoi64() function always returns the minimum or maximum integer
if the magnitude of the text value is too large. Trailing whitespace is
now ignored.
FossilOrigin-Name: ace0644a1a2a42a3ea42d44f00a31915b8a7e56c9ba90f90a6c02001f89f9c86
2018-01-26 18:37:34 +00:00
dan
8558ef2e19
Reorganize zipfile.c code to make it easier to add support for in-memory zip
...
archive processing.
FossilOrigin-Name: 30b9258294e3028ef4ea467e332e013995509544e9a23c8bbf5168772a7e895d
2018-01-25 20:50:46 +00:00
drh
cad42838d7
Slightly smaller and faster implementation of OP_If and OP_IfNot.
...
FossilOrigin-Name: 6ab42934e2c4957b5d8927bf4434a9db07ab6078987a6a2d25f35cc468d21203
2018-01-25 01:20:29 +00:00