drh
504eba5f46
A minor code simplification, saved in a branch for future reference.
...
FossilOrigin-Name: 5e458f4a92743effb9a3d3249767424fed8b444a05ca136c4a55d60c4d70c2cc
2018-09-19 18:17:46 +00:00
drh
c6727c8342
Fix the "sqlite3" command in the TCL interface so that it correctly returns
...
an error if invoked with no arguments.
FossilOrigin-Name: 2034fa8089676132b5e2f71bdebf1af9ca141da2e173920c6e84fb974ab0f022
2018-09-19 15:08:21 +00:00
dan
16f39b6e5d
Fix a problem building on Android with SQLITE_ENABLE_BATCH_ATOMIC_WRITE set.
...
FossilOrigin-Name: e41e50fe7430cb79f67369fe81ac9938665bfc5db59c4faaf429ceb8ca03f584
2018-09-18 19:40:18 +00:00
dan
c4b1e5e758
Avoid incrementing the SQLITE_LOOKASIDE_MISS_SIZE stat before sqlite3_open()
...
returns. Fix test script problem in lookaside.test.
FossilOrigin-Name: e461cb281959d8517296e3e4e934eba8206770b1a592cd7655b6567268da1634
2018-09-18 17:50:34 +00:00
dan
253c6ee1bf
Enhance tester.tcl so that when "--malloctrace=1" is specified, the test
...
generates self-contained Tcl scripts that present GUIs instead of *.sql files
that require a separate program to interpret.
FossilOrigin-Name: de2e3cbd08c00d235106c040fa472ec267ef8f1ec13c34ed7d16deac8d50b6cc
2018-09-18 17:00:06 +00:00
drh
40b4e7a692
Further optimizations to the UPDATE logic to avoid making changes to partial
...
indexes if none of the columns mentioned in the WHERE clause are modified by
the UPDATE.
FossilOrigin-Name: d1365a5bf0ee2f145427b81d2a593f539c3ad4705d579478703c1f65ae5f80bf
2018-09-17 20:47:38 +00:00
drh
d4cb09e3d2
Disable the ORDER BY LIMIT optimization in queries using window functions.
...
This fixes a problem that was introduced by check-in [206720129ed2fa8875a286]
which attempted to fix ticket [9936b2fa443fec03ff25f9]. This changes is
a fix for the follow-in tocket [510cde277783b5fb5de628].
FossilOrigin-Name: c6c9585f294710829ca24b64d70a36fd9f409261dd0661367c6c4198cdbc4c81
2018-09-17 15:19:13 +00:00
drh
e597c47545
Restore an assert() that was present on trunk.
...
FossilOrigin-Name: a7b572ca7867a95f49888dc95c0dc6d726afa9fea26283be147ba422639d1307
2018-09-17 13:55:18 +00:00
dan
de79e094bc
Minor modification to the fix on this branch to avoid adding extra conditional
...
compilation macros.
FossilOrigin-Name: 4d8be404dab265b51e5a6a95e83be85c22512e19a437191690c7d845c87ff259
2018-09-17 13:38:45 +00:00
dan
0208337c16
Add extra test for the fix on this branch. Also fix a
...
pointer-compare-after-free problem that occurs in similar cases.
FossilOrigin-Name: 1856ea63b3186c2c8fa716ffe01c731397bdbbc3fbb56dc72ad0686cb7f152ca
2018-09-17 08:27:23 +00:00
drh
e68fe9665a
Add assert()s to the new code in the previous check-in.
...
FossilOrigin-Name: b12f23a5c484cab3654721299ea0f05230eef6b14012b557f3bf2592fac0f00e
2018-09-17 00:15:21 +00:00
drh
95f78d98b9
First proposed fix for the ALTER TABLE problem described by ticket
...
[b41031ea2b5372378cb3d2d]
FossilOrigin-Name: 05a9d129254e01a5f6b5e4033c105190eae386575a94b020ef3e0cbd30bbf056
2018-09-16 23:27:37 +00:00
drh
86f3492650
Remove an unreachable branch from the index-on-expression optimization.
...
FossilOrigin-Name: 2df2cf4f179dd88fb2530dfd338f344ac48dd052ef954dc95a136884523f7aee
2018-09-16 18:23:48 +00:00
drh
9b84f03556
Add the new "explain" virtual table in ext/misc. Use this virtual table
...
for additional test cases for the optimization that avoids updating indexes
on expressions when none of the columns changed by the UPDATE are in the
expression.
FossilOrigin-Name: 2404304cc15eaeee2744cf3c8f9cac0a544631c4f1060c5a17a78b43ca86edf0
2018-09-16 16:18:01 +00:00
drh
2b7cdf6f6b
Improved presentation on the new code that prevents unnecessary writes to
...
expressions on indexes during an UPDATE when the expression does not reference
any of the columns that are changing.
FossilOrigin-Name: c9f045295c4577752b0847ff2027b44661e6cb15bb08b942ccb3a0ef396f3dec
2018-09-16 15:01:25 +00:00
drh
e9816d82a7
Optimization: when doing an UPDATE on a table with indexes on an expression,
...
do not update the expression indexes if they do not refer to any of the
columns of the table being updated.
FossilOrigin-Name: a71b101635ed28a4c99734dabb20bd65ef1018c1d63ac143b7321cdb0fafa5d7
2018-09-15 21:38:48 +00:00
drh
9fd8425467
Fix minor typos in comments that get carried over into documentation.
...
No changes to code.
FossilOrigin-Name: 7921dd91a1745aa79ea157b91b22c380e9331800050861ee6ca1f0efa0a97628
2018-09-14 17:42:47 +00:00
drh
af524a6343
Make sure the %z optimization for printf() is not invoked if there has been
...
a prior error (SQLITE_NOMEM or SQLITE_TOOBIG) associated with the same
printf() call.
FossilOrigin-Name: a2304a3474b0ca35eee0af64286ce2f7cb24d181323e128d5f04f7fe6e1c0980
2018-09-13 17:07:12 +00:00
dan
a86acc2132
Fix an assert() in os_unix.c that is not true when using RBU.
...
FossilOrigin-Name: 028ed8618af012b51104a06cc155b45d98bc4ff833d4431b9c38fd6851a74e82
2018-09-12 20:32:19 +00:00
drh
16b870d804
Restrict the scope of internal-use functions in alter.c.
...
FossilOrigin-Name: 4396914f8e1a847d86c22fb0b91e7431cf19aa260cbec520af3564248d6897ad
2018-09-12 15:51:56 +00:00
drh
83a9d14fcd
Improvements to the documentation for SQLITE_FCNTL_DATA_VERSION.
...
No changes to code.
FossilOrigin-Name: 27837624336d2883f721310bd4dceedb77085d1008af5e12557f634936d48b8c
2018-09-12 14:28:45 +00:00
dan
e8ab40d219
Fix an invalid pointer comparison triggered by renaming a table column when
...
there are views with explicit column names in the schema.
FossilOrigin-Name: 572de7e4e33562c72cd90790b267ba389370f21ddcaebc4db609fd76ae9b7ada
2018-09-12 08:51:48 +00:00
mistachkin
ed008ecede
Fix some harmless compiler warnings seen with MSVC.
...
FossilOrigin-Name: 78862252da7f59d4737ed16f4ccf100cea27d8b421db31051afbaa8d96f24de3
2018-09-12 01:05:26 +00:00
drh
8741d0ddb0
Fix a harmless compiler warning that arose from the ENABLE_CURSOR_HINTS
...
fix of check-in [0af18674ca5b34e67e]
FossilOrigin-Name: f578e62ae6f6cc78d8281adab9fa93f3f58711879c2860bbe19f291d257dc0af
2018-09-12 00:21:11 +00:00
dan
e3e79213b1
Fix a problem causing ENABLE_CURSOR_HINTS builds to segfault.
...
FossilOrigin-Name: e7033104fa8bd974a9a3d173200aa07a3aa3daade86e7eb65cad5d00b086969e
2018-09-11 13:38:35 +00:00
dan
be312ae9fd
Fix a minor problem causing an incorrect cursor-hint to be generated in some
...
cases.
FossilOrigin-Name: d879c47d7d145cbe99602b2cf70294ddc946709e8d61040942085d29e2c5b6cd
2018-09-10 19:27:12 +00:00
drh
173e7823df
Add the ability for loadable extensions to access the new
...
sqlite3_create_window_function() interface.
FossilOrigin-Name: 3def6d8ef11702eb03ad56aeb01763ec8e4ca8ed3b570ffb680164c5c3679e4f
2018-09-10 17:21:17 +00:00
drh
473dc7347e
New testcase() macros on virtual table xBestIndex logic.
...
FossilOrigin-Name: 3bbd9c5f2f1990f7d187951474a86996650dcede12c2608484d43250ae0b30d6
2018-09-10 14:43:15 +00:00
drh
b7a002f836
Fix the LIKE optimization so that it is disabled when the LHS of the
...
expression does not have TEXT affinity and the RHS is the pattern '/%'
or the RHS begins with the escape character. Fix for ticket
[c94369cae9b561b1f996d0054b].
FossilOrigin-Name: f191431d63aba187000b5cbaf3e072ff5f1b1eef6a2a407fb4d1629bda4e4e8f
2018-09-10 12:40:57 +00:00
dan
eb3fe0b9d4
Fix a problem with processing a "vtab.col IS NULL" expression within
...
the WHERE clause of a query when "vtab" is a virtual table on the rhs of a
LEFT JOIN.
FossilOrigin-Name: 83da4d4104ee1870a2a95bb5fa15ee6584c655d8b314b6b8ab97592dad4ee811
2018-09-10 12:17:16 +00:00
drh
f7ded14792
Fix an unreachable branch in the new sqlite3WhereOrderByLimitOptLabel()
...
function of the query planner.
FossilOrigin-Name: 5a954533edbde58aa7158572ece7ceeb1c6e610b71f3ae45d0b8371d74f9fea5
2018-09-08 20:29:04 +00:00
drh
6ee5a7b481
Fix multiple issues with the ORDER BY LIMIT optimization. This is the
...
proposed resolution to ticket [9936b2fa443fec03ff25].
FossilOrigin-Name: 206720129ed2fa8875a286266d05b99fb2caf8671e4b74b26a6286a2073fcd8b
2018-09-08 20:09:46 +00:00
drh
3b70045096
Remove a faulty ALWAYS() macro added by check-in [8fa254aa6329bdd0].
...
FossilOrigin-Name: fc47316e9b6b9f4c37cb7d3fe2af3f4dfb900fb5f07945dbf1239152a2d8f836
2018-09-07 19:12:08 +00:00
drh
a488ec9f0a
Add assert() and ALWAYS() to identify two unreachable branches.
...
FossilOrigin-Name: 8fa254aa6329bdd085b8e2c78d8e8a698b418eda8b2d48e0082dd9cd428cef29
2018-09-07 18:52:25 +00:00
dan
d5e6fef2a1
Fix a problem with renaming a non-temp table that has at least one temp
...
trigger and shares its name with a temp table.
FossilOrigin-Name: ceb60bd7e5f2a0a4247bff476fc6468227305467339ae0c24591be9d2b14bdde
2018-09-07 15:50:31 +00:00
dan
202a0274db
Minor fixes for problems revealed by releasetest.tcl.
...
FossilOrigin-Name: 1a8aedc3376b7ae32fa7b2c367eedd483e2629908836efd10ee5bd1fe0784675
2018-09-07 11:51:21 +00:00
drh
9fd88e8db7
Fix an uninitialized variable in the OP_ParseSchema opcode that comes up
...
only if the schema is corrupt.
FossilOrigin-Name: 725808d4c59176f71787452c7e500b563fd99cfc8ece47b1efe01d5e207efe0d
2018-09-07 11:08:31 +00:00
drh
cb4e4b00b3
Fix a harmless compiler warning in os_unix.c.
...
FossilOrigin-Name: b9d1fb5d44e0a6ffc00ee987f178e448d7516e579beecdeeb387e69aef588921
2018-09-06 19:36:29 +00:00
dan
c50f75df96
Fix a problem with ALTER TABLE when there are views or triggers in the schema
...
that contain "<expr> IS NULL" expressions.
FossilOrigin-Name: 91aab32e71fcb924e24c02d5f0901f7a474760fc993a7e7436e667512cf5d3c3
2018-09-06 18:56:36 +00:00
dan
1041a6a817
Fix a problem in ALTER TABLE with SQLITE_OMIT_VIRTUALTABLE builds.
...
FossilOrigin-Name: fa835145e63749e06e04bd50ff992afaeae05dcdd1df597d13911f944e62076b
2018-09-06 17:47:09 +00:00
dan
905f981667
Fix a problem causing SQLITE_OMIT_VIRTUALTABLE builds to fail.
...
FossilOrigin-Name: 18beabc848d0ed7f5c918cbec5372a49915d889d7ffc9f475e6b208407e9ebd2
2018-09-06 16:47:08 +00:00
dan
1d85c6bf48
Ensure that the tbl_name column in the sqlite_temp_master table is updated
...
correctly as part of a RENAME TABLE operation.
FossilOrigin-Name: ffecfca511718e39e0003b380d5113755b8a11405a5bd80cc04503d9557f0842
2018-09-06 16:01:37 +00:00
dan
8900a48b92
Avoid comparing pointer values after the object that they point to has been
...
deleted.
FossilOrigin-Name: 2ec7e50cbc0e7a4308d51be3c9416229b187a6a8abdd982c154edc256cd6da1f
2018-09-05 14:36:05 +00:00
dan
dd1a9c8c25
Fix minor code issues in alter.c.
...
FossilOrigin-Name: 18ba35b86f3b9813179b5f8d74e59e4860bfb800f45aabab8d6c0a6d7c97fe74
2018-09-05 08:28:30 +00:00
dan
65372fa963
Improve the error messages emitted by RENAME TABLE.
...
FossilOrigin-Name: 6805b5900df5e6d3329cbad2660875ebe4069efe37b19575f527d153dc0882a1
2018-09-03 20:05:15 +00:00
dan
b87a9a8a5e
Fix a problem with renaming a column in a table that has a temp trigger that
...
references another attached database.
FossilOrigin-Name: 336b8a0923bf65b7a2c35811cb6dec0e262a0b31e534d2a6ab093d2afdb05c1f
2018-09-01 20:23:28 +00:00
drh
5b1da309f7
Fixes for harmless compiler warnings.
...
FossilOrigin-Name: 41b8f38b97bf0d1abcd6de8e940269fc4c51e2bbcf7b2e53e0c8440c58187c33
2018-09-01 20:02:07 +00:00
drh
c753c216c6
Fix some harmless compiler warnings and improve defenses against OOM errors.
...
FossilOrigin-Name: 2e2cf992f5d6cae2030c3c03b0eb98af3b130e86a719b991e41380138751f615
2018-09-01 16:55:36 +00:00
dan
0923650365
Have "ALTER TABLE ADD COLUMN" reload the entire db schema, as "RENAME COLUMN"
...
and "RENAME TABLE" do.
FossilOrigin-Name: 8d89ddc1a628e983b0fbd929c9c9daac86ee23d18f8dd2709c971012389395c6
2018-09-01 16:05:50 +00:00
drh
010f8ee2fb
Merge fixes from the alter-table-rename-column branch that occurred after
...
this branch separated from that one.
FossilOrigin-Name: 22e785aa2bbce4ae0852bc3d127d4b12222a192eb6e3ee874bf8e5c8582d05f3
2018-09-01 15:55:44 +00:00