Alexander Krotov
f4c8ffca4c
Query MX records during provider autoconfiguration
...
Previously MX records were queried only for OAuth 2 configuration and
did not affect the list of servers tried. User was required to manually
configure the servers for Google Workspace (former GSuite) domains.
Now MX records are queried during configuration. If provider is found in
offline database, its ID, corresponding to the filename, is saved as
`configured_provider`.
`configured_provider` is also set during database migration if email
address uses the domain from the provider database, but no MX querying
is done.
2021-01-10 00:19:43 +03:00
Hocuri
78fd0c285b
Delete messages more thoroughly (and at all) ( #2114 )
...
- Make sure delete_expired_messages and housekeeping runs once a day
- delete more info about messages when putting them to trash (esp. also
delete txt_raw, from_id and to_id as we don't need those anymore, so
they are data that was unnecessarily kept)
fix #1926 , fix #2090
Also:
* Nicer test_utils: add send_text() and print_chat()
* Adapt ephemeral messages for testing (make them accurate to the second)
* Add test for ephemeral messages
* Make pop_sent_msg() really pop the last sent message
2020-12-26 18:29:43 +01:00
B. Petersen
d05dd977d9
migrate database
...
add 'protected' row in chats table,
convert old verified-groups to 'protected'
2020-10-13 14:59:25 +02:00
B. Petersen
4c8e6ef495
use combined index (state, hidden, chat_id) to speed up marknoticed_chat()
2020-10-10 00:32:45 +02:00
B. Petersen
11107d5484
add comment about unused 'starred' column
2020-10-06 09:32:50 +02:00
Alexander Krotov
be40417a7f
sql: do not set dbversion after each migration
...
This variable is not used afterwards, and it is already not set in
migrations added after version 54.
2020-10-02 16:20:39 +03:00
Alexander Krotov
332a387c98
Fix nightly clippy warnings
2020-09-19 17:49:32 +03:00
bjoern
81db6e3ee2
Merge pull request #1927 from deltachat/newacc-transaction
...
sql: create new accounts in one transaction
2020-09-19 13:22:28 +02:00
Alexander Krotov
238c4bb792
sql: set PRAGMA temp_store=memory
...
On Android, there is to /tmp directory, so SQLite may throw
SQLITE_IOERR_GETTEMPPATH when trying to find a place for temporary
files. Storing temporary files in memory is a workaround that always
works (until out of memory).
See https://github.com/mozilla/mentat/issues/505 for discussion of a
similar issue.
2020-09-19 00:10:12 +03:00
Alexander Krotov
0485c55718
sql: create new accounts in one transaction
...
This prevents SQLite from synchronizing to disk after each statement,
saving time on high latency HDDs.
2020-09-18 19:41:41 +03:00
Hocuri
aee6eb2261
{:#} once more
2020-09-17 09:39:14 +02:00
Hocuri
6d6ac66f4d
Show dbfile when opening fails
2020-09-16 17:24:04 +02:00
Hocuri
e870b33e03
Revert "Just for testing, let importing the db always fail - .context() just overwrites the underlying error!!!!!"
...
This reverts commit 27e53ddbff .
2020-09-16 15:05:05 +02:00
Hocuri
27e53ddbff
Just for testing, let importing the db always fail - .context() just overwrites the underlying error!!!!!
2020-09-16 15:00:36 +02:00
Hocuri
396ccebb5c
Log more
2020-09-16 15:00:22 +02:00
Hocuri
f9cc3cbef0
Resultify sql.open()
2020-09-16 13:45:32 +02:00
Alexander Krotov
0a5d1e5551
sql: create new accounts without migration
...
This speeds up account creation by ~50% on HDD.
2020-09-15 02:03:58 +03:00
B. Petersen
8727e0acf8
add an index to significantly speed up get_fresh_msg_cnt()
2020-09-02 17:06:46 +02:00
Hocuri
0fc57bdb35
Separate IMAP and SMTP configuration
...
Co-Authored-By: link2xt <ilabdsf@gmail.com >
Co-Authored-By: bjoern <r10s@b44t.com >
2020-08-22 21:29:39 +03:00
bjoern
a3a78bff8e
Merge pull request #1802 from deltachat/update-device-icon
...
Update device icon to use RGBA
2020-08-07 00:02:29 +02:00
Alexander Krotov
cfd222a109
Resultify Peerstate::from_addr
2020-08-06 13:19:36 +03:00
Alexander Krotov
a315f919e4
Update device chat icon to use RGBA
2020-08-05 21:24:42 +03:00
Alexander Krotov
1c73021d77
Update rust toolchain to 1.45.0
2020-07-17 01:08:32 +03:00
Alexander Krotov
18e4abc1df
Remove some and deny new indexing and slicing
2020-07-11 21:43:02 +03:00
Alexander Krotov
1b5d08e6ee
Start ephemeral timers during housekeeping
2020-07-08 01:16:01 +03:00
Alexander Krotov
bb9603661a
Fix a typo
2020-07-07 22:38:50 +03:00
Alexander Krotov
7d048ac419
Add autodelete timers
2020-06-29 23:04:34 +03:00
Alexander Krotov
8de1bc6cbd
sql: fix potential panic in maybe_add_file
...
When maybe_add_file was called with "$BLOBDIR" it tried to remove 9
bytes from the string, while it only contains 8.
2020-06-22 13:22:37 +03:00
Hocuri
990c80cedf
lots of small fixes from the reviews
2020-06-13 10:18:17 +02:00
Hocuri
2e59d5674e
fix sql
2020-06-13 10:18:13 +02:00
Hocuri
016b96e30e
Fix migration
2020-06-13 10:18:12 +02:00
Hocuri
f0837cfa73
Repair errors saved for messages
2020-06-13 10:18:11 +02:00
dignifiedquire
944f1ec005
feat: update dependencies for new rustcrypto releases
2020-06-12 09:12:38 +02:00
dignifiedquire
d1f9563e1f
remove tracking of current sql query
...
this will not work like this anymore with async
2020-05-22 11:37:03 +02:00
dignifiedquire
f81c1afde7
bring back busy_timeout
2020-05-19 13:30:15 +02:00
dignifiedquire
af56ebb04e
Merge remote-tracking branch 'origin/master' into feat/async-jobs
2020-05-19 12:07:34 +02:00
B. Petersen
6483b8c138
change to WAL only on one handle.
...
journal_mode is persisted, it is sufficient to change it only for one handle.
with_init() is called for a bunch of handles directly on pool-creation,
so changing to WAL here easily results in busy-errors.
2020-05-18 18:19:08 +02:00
B. Petersen
9702647044
enable sqlite's WAL-mode unconditionally
2020-05-18 06:55:06 +02:00
dignifiedquire
8a7923c974
Merge remote-tracking branch 'origin/master' into feat/async-jobs
2020-05-13 18:29:22 +02:00
Alexander Krotov
2f6bae4e2a
sql: do not send DC_EVENT_ERROR on database errors
...
These errors are usually just "database busy" errors, it is enough to
write them to the log instead of displaying to the user.
2020-05-10 17:51:01 +03:00
Alexander Krotov
8d2f526ee7
Fix a typo
2020-04-17 22:29:58 +03:00
Alexander Krotov
493a213d41
sql: move QueryReturnedNoRows and NULL handling into query_row_optional()
2020-04-13 17:38:42 +02:00
Friedel Ziegelmayer
24f4cbbb27
refactor: replace failure
...
- failure is deprecated
- thiserror for deriving Error impl
- anyhow for highlevel error handling
2020-04-10 22:39:28 +02:00
dignifiedquire
307a3e078e
Merge remote-tracking branch 'origin/master' into feat/async-jobs
2020-04-09 23:41:34 +02:00
Alexander Krotov
270d18a88a
Move prune_tombstones() to sql:: and call from housekeeping()
2020-04-01 20:06:27 +03:00
Alexander Krotov
ad53678c19
Remove msgs.unlinked column
...
It is not used anymore.
Database version 64 migration introducing this column is also removed.
2020-04-01 20:06:27 +03:00
Alexander Krotov
b2f1d9f376
Do not remove rfc724_mid for unlinked messages
...
Message-ID is used to send read receipts. Instead, add a separate
"unlinked" column.
2020-04-01 20:06:27 +03:00
dignifiedquire
69f1e1753c
improve logging and avoid race
2020-03-23 19:49:37 +01:00
dignifiedquire
1846f20f6e
upgrade repl
2020-03-21 14:24:41 +01:00
dignifiedquire
f85b14a7f7
the basics work
2020-03-18 15:11:36 +01:00