Commit Graph

17 Commits

Author SHA1 Message Date
Aleksander Machniak
747bcd2ff4 Fix handling of table prefix and quoting in insert_or_update()
In all places we use this function the $table argument has already
been passed through table_name() method, i.e. it contains the prefix
and is quoted. So, we should not do this again.
2021-02-15 11:31:06 +01:00
Aleksander Machniak
f4ed1024dc PHP8 fixes, CS fixes, short array syntax, tests 2020-12-02 20:15:00 +01:00
Aleksander Machniak
007f9b81cf Lower SQLite version requirement 2020-11-28 16:05:19 +01:00
Aleksander Machniak
066faa1485 CS fixes, short array syntax, PHP8 fixes, tests
also fixed listing of table columns on SQLite database
2020-11-28 10:06:41 +01:00
Aleksander Machniak
545a1569f1 Steps -> Actions refactoring (#7688)
* Move action handling code to rcmail class
* Add rcmail_action class
* Add action aliases
* Get rid of $OUTPUT global
* Move some methods from rcmail to rcmail_action
* PHP8 compat. fixes
* Add framework for testing actions
* Fix obvious code mistakes
2020-11-01 11:25:38 +01:00
Aleksander Machniak
f95212d626 PHP8: More warnings fixed 2020-10-11 15:24:30 +02:00
Michael Stilkerich
67825e6320 MySQL: Don't reissue query after deadlock error (#7529)
When a deadlock error occurs, MySQL rolls back the _entire_ ongoing
transaction. The application would have to restart the transaction from
the beginning to retry if wanted.

Now roundcube in that case simply retries the statement that raised the
deadlock error, even though everything else in the transaction was
rolled back. This breaks transaction isolation, leaves the database in a
potentially inconsistent state (from the application's data consistency
model point of view), and does not indicate to the application there was
a problem at all to it may even continue executing other potentially
remaining statements of a transaction that has already been rolled back.

-> Remove the retries from roundcube. Retries have to be initiated by
the application if desired, not only retrying the last statement but the
entire transaction from the beginning.
2020-09-25 12:32:25 +02:00
Aleksander Machniak
d30f039e5a Use PDO::ATTR_CLIENT_VERSION when PDO::ATTR_DRIVER_VERSION does not exist (#7564) 2020-09-20 14:45:43 +02:00
Aleksander Machniak
77bc3f2427 Fix incorrect PDO::lastInsertId() use in sqlsrv driver (#7564) 2020-08-28 09:41:19 +02:00
Aleksander Machniak
a5c2b4360c Fixes in context of undefined variables, and code style 2020-08-15 12:13:31 +02:00
Aleksander Machniak
b7410ffe89 Use mySQL charset in connection string instead of SET NAMES (#7232)
And switch to utf8mb4 as it is what we're using right now in db schema.
2020-02-23 19:29:45 +01:00
Aleksander Machniak
1613f3ab4c INSERT OR REPLACE implementation (#6771)
For now with support in postgres and mysql databases.
For now used in rcube_cache, rcube_imap_cache and enigma plugin
2020-01-19 18:43:48 +01:00
Aleksander Machniak
545ea62dfc Fix bug where listing tables in PostgreSQL database with db_prefix didn't work (#7093) 2019-12-13 21:04:12 +01:00
Aleksander Machniak
1afa46d28d PHPDoc and CS fixes 2019-08-25 14:15:09 +02:00
Aleksander Machniak
a80c5569ab Added flag to disable server certificate validation via Mysql DSN argument (#6848) 2019-07-15 09:12:18 +02:00
Aleksander Machniak
57c67db029 Remove year(s) from copyright headers + some cleanup 2019-04-16 10:42:45 +02:00
Aleksander Machniak
1058924e21 Move some framework classes to sub-directories 2018-03-03 17:46:59 +01:00