Commit Graph

19673 Commits

Author SHA1 Message Date
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
dan 803507f863 In all.test, do not attempt to run the RBU tests in non-RBU builds.
FossilOrigin-Name: 10c3e5a0314470ee1ffc37b68445a2cb2054530346d5f5ed3ffbd6df8003cad0
2018-09-06 20:33:11 +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 7ea1edb703 Fix test script problems causing SQLITE_OMIT_VIRTUALTABLE builds to fail.
FossilOrigin-Name: 37ad064e5f5704cf345d23b38b3f6d627fbcf20dbb78c8a91e96c9704760a1b8
2018-09-06 17:23:08 +00:00
mistachkin 1884487e4b Merge accidental fork.
FossilOrigin-Name: ebadb7dc25b9ab544a941ceb9a18926268c21bb60de98737f6ef19915ee8e61a
2018-09-06 16:50:54 +00:00
mistachkin 3c4b61333f Fix harmless compiler warning.
FossilOrigin-Name: 88b39c46c15ab6bdd0ac9536ddb6fb09862d578d0f691c57d039b0a906f1c25c
2018-09-06 16:47:10 +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 71998f03b5 Add new test file "alterauth.test".
FossilOrigin-Name: 00940265b18a3cf848602e1e0b3edbd935cb4309ef91a34b0d5746a258a47ae6
2018-09-06 16:24:23 +00:00
dan fb05c7ff7d Add an "ALTER TABLE RENAME COLUMN" command. Upgrade "ALTER TABLE RENAME TABLE"
so that it modifies references to the renamed table embedded in SQL view and
trigger definitions.

FossilOrigin-Name: 4da5998314ed2c694b0e242755930f5320af89ac5c148845392f0a2043d44d22
2018-09-06 16:20:09 +00:00
dan 194584e26f Merge latest trunk changes into this branch.
FossilOrigin-Name: 8a28a326d7f72ab94c7d089dbc047e719038b6cd410068dec0d173a7655c87ca
2018-09-06 16:17:22 +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
drh 7894b8547d Add the randomshape.tcl test-case generator script to the util subdirectory
of the rtree extension.

FossilOrigin-Name: 8f48991dcbb01e21d065fbba7782a6d1aebaa8065841a70a76af1e5a21f18ea4
2018-09-06 14:01:56 +00:00
drh a83a74c428 Fix excess memory usage in the JSON parser of GEOPOLY.
FossilOrigin-Name: 9057e27e12ded07a9ea0b2868036d3019f7bc5be3a67e3d341f56b762d3de9d9
2018-09-06 11:14:17 +00:00
drh 9a09b7b31d Fix a problem with geopoly trying to update both the _shape and an auxiliary
column in the same UPDATE statement.

FossilOrigin-Name: 14c955152d0580abc3df1b363789f2925e013b9c957e550b1e6ebe83a82bae6c
2018-09-06 02:40:15 +00:00
dan 19950d5bfb Merge latest trunk changes into this branch.
FossilOrigin-Name: 6f4f707f9c3c29f2437962fd5d7761876cf8e7ed7fdcb9d0ca4fd001fa226597
2018-09-05 17:52:52 +00:00
dan 5921f2b9e7 Fix some test script errors. And an incorrect assert() in fts5.
FossilOrigin-Name: f804336f083d8d26314bb1ba34cec427675065a67cbe2bf00bb42e40752aeb33
2018-09-05 17:45:17 +00:00
drh b78d1905c3 Remove an old testcase() macro that is no longer valid.
FossilOrigin-Name: e628713338f6e584a32d5fc3436ddbd9ee8cf88401c321c1ebe7daa1e695c623
2018-09-05 16:16:56 +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 4af4212fef Merge latest trunk changes into this branch.
FossilOrigin-Name: ef9e088290efa9d0fc36bcdef710cadfef37c8a33f4685dad4ce113807e1cc75
2018-09-04 18:23:59 +00:00
dan 65372fa963 Improve the error messages emitted by RENAME TABLE.
FossilOrigin-Name: 6805b5900df5e6d3329cbad2660875ebe4069efe37b19575f527d153dc0882a1
2018-09-03 20:05:15 +00:00
dan 366607865b Ensure that FTS5 queries of the form "WHERE rowid BETWEEN ? AND ? AND tbl
MATCH ? ORDER BY rank" do rowid filtering before sorting.

FossilOrigin-Name: f1138a38bd23f201a35621a71e82c5718abddb42ab82938e9516ab9d43e4df16
2018-09-03 17:11:11 +00:00
dan 143df55d24 Add another test case to altertab.test.
FossilOrigin-Name: 828e8849faed85812c03215b00a2ba34cbb00dfa4d4afdcbd11300ba7fcf9743
2018-09-01 20:38:42 +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 ffc7e91f4f Merge alter-table-rename-table back into this branch.
FossilOrigin-Name: ad704a7c86c9ee51c1eb696007660cb9044bba6a8c588a33a8bd66613c231421
2018-09-01 16:13:41 +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
drh c840b428fc Merge fixes and enhancements from trunk.
FossilOrigin-Name: 589186c083ff3af8d5a6d5ad34e1cefea57806ebf3831ea3bf5a48ef1e173140
2018-09-01 15:49:13 +00:00
dan 6ae2454a67 Update test script snapshot_fault.test to account for the new
sqlite3_snapshot_open() error code.

FossilOrigin-Name: c1aca7673ab04740bc8ad76af0a72a229c79a0cd51cf84d1c689a77424ff17c6
2018-09-01 06:13:07 +00:00
drh 28d46eed3f New hyperlink on the README.md file.
FossilOrigin-Name: c663961e34ec03ef76aabc9741f37d19544826e3e0b5931711313fc088e9e62c
2018-08-31 23:22:40 +00:00
dan 8d4b7a3fa8 If a call to sqlite3_snapshot_open() fails because the requested snapshot no
longer exists, return SQLITE_ERROR_SNAPSHOT instead of SQLITE_BUSY_SNAPSHOT.

FossilOrigin-Name: e07923128bb164efbafde29d49175b61f2ef44b2dfac5ae4ed61937945dfcf4c
2018-08-31 19:00:16 +00:00
dan 141e119a17 Ensure b-tree mutexes are always held when sqlite3FindTable() is called. Do
not invoke the authorizer callback when parsing schema items as part of ALTER
TABLE commands. Fix test script issues.

FossilOrigin-Name: eac2aa7dce577f1998cc2078dd8ac384070f8acf1ceb565999a5cf719092024e
2018-08-31 18:23:53 +00:00
drh 876c7ea3fa Try to identify the places in WAL code where thread-safety depends on the
underlying architecture supporting atomic load and store of aligned 32-bit
values.

FossilOrigin-Name: 47d44be4a68d377d0049a12b2587dbbcc0870b469473e1098f7c0358fe8c7532
2018-08-30 20:28:18 +00:00
dan 9d324823a8 Test the schema after renaming a table. Ensure that temp database triggers and
views are updated when renaming a column.

FossilOrigin-Name: f3c27d916d4837f8fc3dd812bd004535f04c7a53bd2a0a2419613275f48bec76
2018-08-30 20:03:44 +00:00
drh ed9272159e Give the debugging routine print_pager_stats() external linkage in order to
suppress harmless compiler and TSAN warnings.

FossilOrigin-Name: ff4dc08298ab3988e69fe60802657791f65d2af15f4b1cbd1d02649bc597d0d6
2018-08-30 18:53:09 +00:00
dan 0ccda96867 Fix an ALTER TABLE problem with processing temp schema views and triggers.
FossilOrigin-Name: 72cfb1be29971d91a164f1d4f20cb054de68960a0bd547630bcd1160565971c5
2018-08-30 16:26:48 +00:00
drh e35fc302c3 Improved JSON parser caching.
FossilOrigin-Name: 58078c0d2647a194279fa80e032670441b296ffc3acee692901faa5beca460b7
2018-08-30 01:52:10 +00:00
drh 9c1d7c6d4c Additional test cases for geopoly.
FossilOrigin-Name: 19b5eb45e090c4b7169a52d881495ee2eafc59f80e3db2288fc1814ba76134ac
2018-08-29 21:01:22 +00:00
dan c9461ecc28 Extend RENAME TABLE to edit triggers and views. Still buggy.
FossilOrigin-Name: 01308bae3acf33f78b5bb90892085eab340df093aafc17e6ccf6a7d6cf324897
2018-08-29 21:00:16 +00:00
drh 17f19eadb8 Fixes to the UPDATE logic in Geopoly.
FossilOrigin-Name: 7c3cee0a2a5ccacff27400c38bd708f7b9b968eb013a8fa685d876dfe85e12a6
2018-08-29 20:52:40 +00:00
drh 9d67afc421 Also free up the MEM_RowSet bit in the Mem.flags field and have RowSet objects
be destroyed using Mem.xDel.  This change results in faster code.

FossilOrigin-Name: f48e9feb3fca514e4e586932e6d19a5e34a384204effeba553006dcddf5f13d2
2018-08-29 20:24:03 +00:00
drh 72f56ef95d Free up the MEM_Frame bit in Mem.flags object. Store VdbeFrame objects
as MEM_Blob with a special Mem.xDel pointer instead.

FossilOrigin-Name: 62db5fd47660bbc4fcf2c6d4a6c5a3077f12c6442a128d22b66b789a0409ef32
2018-08-29 18:47:22 +00:00
drh c0d2117f1c Add the geopoly_group_bbox() aggregate function to the Geopoly module.
FossilOrigin-Name: 2d4debccbc027405a33aeb10f9d65f6fe4bfb5eb1be5a4d8b82158caba04643f
2018-08-29 15:50:47 +00:00
drh 8ab114c6a9 Disable the server1.test script on old PPC Macs due to problems in the
pthreads implementation on those archaic machines.

FossilOrigin-Name: 43efdd8c7e468405c9d4956a8caa66548059499289cbcc091628de7b055268cd
2018-08-28 21:12:02 +00:00