larrybr
d797d6b626
In CLI, ensure correct line-accumulation state whenever line(s) are dumped or processed. And test this.
...
FossilOrigin-Name: be211a9c59234ef202e772fcaae18be43c44e1e00674f137cad2d903e00bfcab
2021-10-03 22:03:59 +00:00
drh
5bf4715e01
Add the sqlite3ResultStrAccum() internal interface to simplify the
...
the implementation of functions that return strings.
FossilOrigin-Name: e548e9299d3fd6ce5b647cf0dd93ff8e917a5eda43076c6a02389c52640e2e50
2021-10-03 00:12:43 +00:00
drh
ad1188b21c
Try to fix a harmless static-analyzer warning in sqlite3BtreeTransferRow().
...
FossilOrigin-Name: 5906a0152deded614d965e790a33c67832890828a4835451d65c06414ba71f8b
2021-10-02 18:22:24 +00:00
drh
952f35b24d
Fix a harmless static-analyzer warning in sqlite3ExprCode().
...
FossilOrigin-Name: 918c22e82ae6e366ddd094d337ed73fd23878c51745045519ed700113832545c
2021-10-02 17:46:24 +00:00
drh
9673cd0de7
Remove an unnecessary static buffer from sqlite3VdbeExpandSql().
...
FossilOrigin-Name: 953a33b7f739bb39f4a0efedcad2236c09fb798da4a519f8e1049aebe3bbf3ff
2021-10-02 17:34:28 +00:00
drh
cc9309c797
Make the sqlite3_filename_xxxx() interfaces robust against NULL pointer
...
arguments, even though the documentation says the behavior is undefined
in that case.
FossilOrigin-Name: dd64c60bab4e2b44419db6882dfcc80b73d733ebe3bea64a7588c33fbc428234
2021-10-02 17:12:58 +00:00
drh
76fc88fe0f
Fix harmless compiler warnings
...
FossilOrigin-Name: bdb9dc8a025b509960d08cdf0ff784dd075c156860548d7908de7d97e030701c
2021-10-02 16:39:16 +00:00
larrybr
810121623b
Fix CLI line processing. (back to start state after meta-command executes)
...
FossilOrigin-Name: 928c2a34986644d34bcb5e8a1b2720f31cf703383f4ce75381faefca6f356d04
2021-10-02 15:34:52 +00:00
drh
260ff08133
Fix a problem with group_concat() when it is used as a window function with
...
a sliding window, as described by
[forum:/forumpost/f3eb24a6c0|forum thread f3eb24a6c0].
FossilOrigin-Name: f47f7f78227830c065d9ce715b8456eab81a38d680f76bf4ff08f298d84f9c7a
2021-10-01 22:48:52 +00:00
drh
e85e1da07b
Fix harmless compiler warnings.
...
FossilOrigin-Name: 94b59691ee50a4666b25e36d1529fc52f714bbe94c3e8ccb35bf0a4ea11050db
2021-10-01 21:01:07 +00:00
dan
37f3ac8faa
Change things so that SQLITE_OMIT_VIRTUALTABLE implies SQLITE_OMIT_ALTER_TABLE.
...
FossilOrigin-Name: 2f7c946c5f25a858167f5193ca06e53310394c8cff15426ab8a1327a1ec835fd
2021-10-01 20:39:50 +00:00
drh
82978ac20b
Fix a potential write outside of array bounds in the --hexdb decoder of the
...
CLI when given corrupt input.
FossilOrigin-Name: c7fdd775bb5efd22a486510a32a2f278c4d5cda95acd3085a0f0dfc2ef749d6f
2021-10-01 17:06:44 +00:00
drh
3dd01111e2
Remove unreachable branches in the fixed group_concat() code.
...
FossilOrigin-Name: 8bd721c29e7a28cd75885dd80235e4e37aa0847229f769f49e01127f794fa63a
2021-10-01 02:45:48 +00:00
drh
817424fe37
Merge updates from trunk
...
FossilOrigin-Name: 35351371c5e9602dec210ad0926ff8a1a269556ce1a166e81eb0543938e0c57e
2021-10-01 02:16:52 +00:00
drh
f06db3e892
Fixes to the version of "varsep" group_concat so that (1) it builds under
...
separate compilation and (2) omits tabs in source code and (3) runs faster
than trunk. This variant of the group_concat_varsep branch might be preferred
over the tip because it preserves (undocumented) legacy behavior about the
position of separators relative to terms.
FossilOrigin-Name: 04399cf9645e04b171090ff8a3c27752929c10d2cd8778e26f8f3337aa902ab6
2021-10-01 00:25:06 +00:00
dan
afaa660aef
Fix a problem with view handling in SQLITE_OMIT_VIRTUAL_TABLE builds.
...
FossilOrigin-Name: 6e791a24ce259ff6cc46a7c2188aea094a5021e154368f57019a0653c8a81217
2021-09-30 18:42:52 +00:00
drh
0019774e78
Add NEVER() macros on branches that are not reachable since [a0df216f7c3f8963].
...
FossilOrigin-Name: 5d771f3554f3c98872cd0c9f12f415e685f26fcb923e3fb7f1a7a760c7a53255
2021-09-29 20:17:19 +00:00
dan
d091245d31
Have the dbstat module arrange things internally so that there are 256 addressable bytes following each page buffer. This way, small buffer overreads caused by corrupt database pages do not lead to undefined behaviour.
...
FossilOrigin-Name: c4c705abc60624bf9ba4c1c05286b902b965f7ba9fd776c4ef8bc1fb78a4ccde
2021-09-29 19:15:25 +00:00
dan
ab632bc97e
Fix another problem with ALTER TABLE and vector UPDATE statements within triggers.
...
FossilOrigin-Name: a0df216f7c3f8963efba0b1ffee65d6a63309d846ffdcf2d2932cb4f1d4967b7
2021-09-29 18:33:26 +00:00
larrybr
34896c6855
Sync w/trunk
...
FossilOrigin-Name: a4c18b2f0ce4a0f4d0c4f4c25dc69fbed4cb4876d2b69e3e5e0e756410892d74
2021-09-29 16:35:14 +00:00
drh
a40f5af403
Improved testability of changes from check-in [255b0eeed113d83b].
...
FossilOrigin-Name: bbfd083c26086fb103fec88faa59a01e689e0b7fce38c09d8846bb472a0e6760
2021-09-29 14:01:44 +00:00
larrybr
dde13e6f88
Get group_concat() to handle varying separator lengths when windowing
...
FossilOrigin-Name: 98e0f2bf67cdee1da1edadeb54ff8564728b3f28fc821e46e8de201247c3fc87
2021-09-29 00:32:13 +00:00
dan
a7f7c1c4af
Fix a potential ALTER TABLE problem with expressions like ( (<sub-select>) IN () ).
...
FossilOrigin-Name: df0d7e36dbf98ab5405d8366ce92fb85176d4388b47a57b0ca1aa1ba6ae5212e
2021-09-28 10:44:54 +00:00
dan
6bcaba70ac
Have the dbstat virtual table take a copy of each page buffer that it traverses instead of just a reference to the page-cache object. This avoids problems if an error causes transaction rollback while a dbstat cursor is open. dbsqlfuzz crash-417224040fee04f0f0e62b70265c518893b08769.
...
FossilOrigin-Name: 6ab25f8bd52d6412a9600143de364f6d8ad8e2c835315fafca6f54d5f38a49dc
2021-09-27 17:11:20 +00:00
dan
5a69d19eea
Fix a problem in ALTER TABLE causing table or column references in sub-selects ton the RHS of a vector SET clause in an UPDATE within a trigger (i.e. "SET (a,b) = ( (SELECT...), <expr> )").
...
FossilOrigin-Name: 255b0eeed113d83b474efc5bc8fc790a270bc43ee598df4b2c378e1ad2d729b7
2021-09-27 15:44:03 +00:00
dan
c28cc32d81
Fix a bad interaction between the pager cache and the dbstat module that could lead to a malfunction following an OOM. dbsqlfuzz 9ed3e4e3816219d3509d711636c38542bf3f40b1.
...
FossilOrigin-Name: e03554a6a8c33d820922edccf605a2ce92055315bf22e464207ea8c0d81e3dd6
2021-09-25 18:21:01 +00:00
drh
1580d50b76
Add const to parameters on various internal interfaces.
...
FossilOrigin-Name: 70c221c5cf7b4d9ed34f16d045f262f99d16aa3db84f80cf0b03ee82ba28d075
2021-09-25 17:07:57 +00:00
drh
84d90319e5
Dbsqlfuzz (a097eaad43c3c845b236126df92fb49b25449b0c) found a way to reach the
...
assert() that was added to sqlite3_declare_vtab() by [eb94f4a8174436b1].
This check-in fixes the problem.
FossilOrigin-Name: 857d26a68cf439e9cba4f8a3b326c69366fc486a876b76835538709ee39b8713
2021-09-24 19:57:32 +00:00
drh
b6dad520e5
Add lots of new "const" on internal function parameters. There is opportunity
...
for many more - this is a work in progress.
FossilOrigin-Name: a3c71a673ddd1c299bdae550fb955077b77088329a8ca2895dfb23538b524a8e
2021-09-24 16:14:47 +00:00
drh
ebd1ff62c5
Ensure that sqlite_stat1 and sqlite_stat4 are ordinary tables (not views or
...
virtual tables) before trying to load them
(dbsqlfuzz bc02a0cde82dee801a8d6f653d2831680f87dca1). This prevents
sqlite3_declare_vtab() from running with db->init.busy turned on. Even so,
enhance sqlite3_declare_vtab() to be able to deal with db->init.busy being on,
in case there are undiscovered paths to that state.
Each of these two changes are independently sufficient to prevent the problem
fixed by the previous check-in [c7560c1329965ab5] but there
is no harm in keeping that third layer of protection in place.
FossilOrigin-Name: eb94f4a8174436b1f0deed0a43618a20018387bb815be658314ca6b454c446fb
2021-09-24 12:59:33 +00:00
drh
2a6a72a81c
Ensure that the db->init.azInit array is initialized at all times.
...
dbsqlfuzz 0ad6d441f9bf3dfc32626a9900bc1700495b16f9
FossilOrigin-Name: c7560c1329965ab57cd71393c044b110561b83641d08677bc51044df9e377882
2021-09-24 02:14:35 +00:00
drh
68911c2a2a
For shell.c.in, define CHAR_BITS to 8 on platforms that do not have that
...
value set by default. This fixes the build on older machines.
FossilOrigin-Name: 96610cc8251ad4ff8d7f0536f20f4572a996bfa8d24bec8a7925a333e507da1e
2021-09-22 14:26:22 +00:00
drh
fd7abcd15b
Fix harmless compiler warnings in shell.c.in, and a compiler warning in
...
sqlite3expert.c which is a real error, though also harmless.
FossilOrigin-Name: 56da0e9c0321d1fd3c360722cd6284296f9ba459f6b37ab35c81ecabd18f12e3
2021-09-22 13:43:16 +00:00
drh
6d9f034ba8
Use sqlite3_snprintf() for the ".changes" output formatting in the shell
...
because it now uses %lld, and some older C compilers do not understand that
construct.
FossilOrigin-Name: 53dadf80672a4fe05341fe40873b6cfa73f6bc1e07cc41fcf10fe290c9156363
2021-09-22 10:28:50 +00:00
larrybr
866c44704f
Speed and (slightly) simplify shell's input line early processing.
...
FossilOrigin-Name: a1c7f7f8e1b46440234be96e813e4c2c28150413dd95dcab5d13b9c80a202edf
2021-09-21 19:19:28 +00:00
drh
2e50f67073
Add the "PRAGMA table_list" command with its corresponding eponymous
...
table-valued function: "pragma_table_list".
FossilOrigin-Name: 2c0e7ae541e9ecb86aa58fa7e7057def8aac1b1af1af1aa80b8bf2d260f9a2f9
2021-09-21 17:26:23 +00:00
larrybr
7e00984a47
Sync w/trunk, further streamline shell's resumable prescan.
...
FossilOrigin-Name: 9e00f9f7c03c192a3fb6b22851db0626515c59daac5ce6520229c42c838bf5b7
2021-09-18 21:35:22 +00:00
larrybr
d96bcc75e8
Shell's .read pipe now works for Windows too.
...
FossilOrigin-Name: 929bcc4098549692c573779d65c4c28027b0a2f48ebbf5b3f038deee24374b67
2021-09-17 21:12:47 +00:00
dan
01ed72f2c5
Add tests for legacy geometry callbacks to rtreedoc2.test.
...
FossilOrigin-Name: 6ad00e52eda5bc4cb8e6fffbd7538bcd4c6b22f84b837a746eba6bf8c91eb55a
2021-09-17 20:43:27 +00:00
drh
3780f9a4aa
Make the affinity() function available even if compiled without
...
SQLITE_DEBUG. Surround the implementation of all test-only SQL functions
with #ifndef SQLITE_UNTESTABLE.
FossilOrigin-Name: b7e00ef8059f6fb5658c6ad6f337cfdf065a5f1b1130452122282f3a69e98a93
2021-09-17 13:07:15 +00:00
dan
bea28c73a3
Add a reference counter to a structure used internally by the Tcl interface so that it does not segfault if the database connection is closed from any of the various callback scripts that may be invoked.
...
FossilOrigin-Name: e54a33ce56432b23947583d34cf12fc64a55bbc49eb77c7f33cff5926df51070
2021-09-16 14:17:14 +00:00
drh
e73e957c1e
For ALTER TABLE RENAME COLUMN, do not try to filter virtual tables out of
...
calls to sqlite_rename_column(). Let the function filter them itself.
The WHERE clause can mistakenly let virtual tables through if the
sqlite_schema table is corrupt. The sqlite_rename_column() function must
deal with them. We might as well let it deal with them always.
FossilOrigin-Name: 7c82b43b7cdb825f431d3a778f8b34e32666ccb3b067f1f2533d3b3dcca7bdc9
2021-09-16 13:20:29 +00:00
drh
11eb9c6a28
Under SQLITE_DEBUG with PRAGMA vdbe_trace=ON, show an output line if the
...
VDBE aborts for any reason.
FossilOrigin-Name: 7e3d6810039ca4563aa68dfa3671f570792a10f75c8eea68aa7dfd02d17702ca
2021-09-16 12:33:53 +00:00
larrybr
998e910346
Fix non-build for a test configuration
...
FossilOrigin-Name: c9a4ab059050a83d811149ff196ff16ea9e4c301627482800982b87cd30ddbbc
2021-09-15 14:48:02 +00:00
larrybr
b01f1389f2
Squelch needless narrowing warning.
...
FossilOrigin-Name: 5540e6abc1a2a8540113ec9bfebe1fb78d6a044f45396dd1926b65ff17ff236b
2021-09-15 11:15:03 +00:00
drh
c0bd26a23a
Update requirements marks to reflect recent documentation changes.
...
FossilOrigin-Name: 08cab8921e670a0d1758b505fe8c7455f6194cec69d1b7b77de91688be1028a6
2021-09-14 18:57:30 +00:00
larrybr
d000785d40
Shell to .read any named character source file/device (again.)
...
FossilOrigin-Name: c6fe4f8d639db25f0a339f4071f0ae34b90dcfec8dcc2c571f969e2614a38e05
2021-09-13 23:11:46 +00:00
drh
82456a661d
Add assert() statements to refute
...
[forum:/forumpost/9f4e7f58fbb66ddd|forum post 9f4e7f58fbb66ddd].
FossilOrigin-Name: 83a83475c5064ea62016a03e9173ecd2a1fec7f6296f1ee99896fa0a38b4196a
2021-09-13 18:16:15 +00:00
drh
57dd7e6ad8
Fix an incorrect comment and possible integer overflow in pager
...
resulting from check-in [23ca23894af352ea]. Problem reported by
[forum:/forumpost/e2ea1a3f61|forum post e2ea1a3f61]. Also change
the datatype of Pager.pageSize to i64 even though page size never
exceeds 65536, in order to help prevent future problems of this kind.
FossilOrigin-Name: f4a552ed9f4ab35520b634954c39748cc7bda535f426280b79da1b99f70599ac
2021-09-13 13:53:13 +00:00
dan
51f0c762f0
Fix a case where the system error was not being set correctly.
...
FossilOrigin-Name: 13a524b351a0812214b223aa4e0a9d778ae7a75cf9875da1147a09c5cb76b9fe
2021-09-11 14:33:05 +00:00