Stu Tomlinson
6fc67d83f4
Minor MS SQL improvements
...
Support 'sql_ssl' option for MS SQL - set Encryption=required and
Encrypt=yes in ODBC connection string to require SSL using default
FreeTDS driver and Microsoft ODBC Driver for SQL Server repectively.
Allow setting full ODBC connection string in 'sql_server' for MS SQL,
allowing custom connection configuration beyond what is possible with
just 'sql_odbc_driver' option.
2023-01-19 23:36:42 +00:00
Badlop
243697e25a
Update copyright year to 2023 ( #3967 )
2023-01-10 13:52:04 +01:00
Stu Tomlinson
a1cfae8c98
pgsql: do not set standard_conforming_strings to 'off' ( #3944 )
...
Since f9120f75b0
string literals use escape string syntax (E'...') on
pgsql, so it is no longer necessary to set standard_conforming_strings
to 'off'
Fixes #3932
2022-11-16 13:58:30 +01:00
Paweł Chmielowski
6fcfe80a65
Pass ssl options to mysql driver
2022-11-14 11:19:51 +01:00
Paweł Chmielowski
992d998695
Silent warning in OTP24 about not specified cacerts in sql connections
2022-11-14 11:18:26 +01:00
Paweł Chmielowski
9b647a7afe
Skip connection exit message when we triggered reconnection
2022-07-28 19:25:17 +02:00
Paweł Chmielowski
2b3644c8ac
Handle errors reported from begin/commit inside transaction
2022-07-28 19:24:28 +02:00
Paweł Chmielowski
3d329c7e8f
Make connection close errors bubble up from inside sql transaction
2022-07-28 13:17:35 +02:00
Paweł Chmielowski
7b944444ce
Catch mysql connection being close earlier
2022-07-19 14:35:35 +02:00
Paweł Chmielowski
73167ef1bd
Make first sql reconnect wait shorter time
2022-07-19 14:32:47 +02:00
Paweł Chmielowski
43f36205bd
React to sql driver process exit earlier
...
If there are queued request when connection closes we may try to process
those requests (by trying to send them to already terminated db process,
and waiting until we hit timeout) before we see that driver is not longer
alive. This change adds check for driver exit before we process next
queued sql request, and immediately switch to connection state if we have
one.
2022-07-15 13:51:30 +02:00
Badlop
4f8e6fe844
Fix errors and warnings for "rebar3 edoc"
2022-05-17 10:42:02 +02:00
Badlop
b3211b1f71
Update copyright year to 2022
2022-02-11 09:39:25 +01:00
Badlop
ee3796b925
When exporting for SQLite, use its specific escape options ( #2576 )
2021-05-14 16:06:43 +02:00
Badlop
c4d45ec08c
Revert "Close pgsql ports on ejabberd_sql process termination ( #2541 )"
...
This reverts commit 404ae56e07
.
2021-03-18 16:14:49 +01:00
Badlop
404ae56e07
Close pgsql ports on ejabberd_sql process termination ( #2541 )
2021-03-09 00:58:36 +01:00
Badlop
6e0161470e
Update newest copyright year to 2021 ( #3464 )
2021-01-27 17:02:06 +01:00
Frank Diebolt
8f04491a4d
also convert embedded errors to binary
2020-12-03 19:56:58 +01:00
Jerome Sautret
fdda572c9a
Added sql_odbc_driver option for mssql db
...
Add an option to choose the ODBC driver when sql_type is set to mssql
2020-10-08 16:23:34 +02:00
ChaosKid42
1f7ca91670
use dsn-less config for mssql ( #3131 )
2020-04-23 13:56:41 +02:00
Paweł Chmielowski
92a09fdb71
Also add "escape '\'" to prepared statements in pgsqllike_escape
2020-03-18 14:36:17 +01:00
Paweł Chmielowski
039d786e1f
Add escape '\' to like expression in pgsql to fix problem cockroachdb
...
Cockroachdb doesn't properly handle escaping of _ in like expressions,
having "like ... escape '\'" makes it work, by disabling optimization that
causes this broken behaviour
2020-03-18 14:31:13 +01:00
Paweł Chmielowski
f12ee28660
Change conversion of boolean values for cockroachdb
2020-03-18 14:05:05 +01:00
Paweł Chmielowski
df47e2a93f
Fix list parameters in sql queries on pgsql
2020-02-27 11:10:30 +01:00
Paweł Chmielowski
9c25d1024a
Support ssl connection on mysql
2020-02-26 10:54:04 +01:00
Alexey Shchepin
b2f536ec8b
Use SQL ESCAPE statement only with MSSQL and SQLite, improve compatibility with CockroachDB ( #3074 )
2020-02-04 04:53:54 +03:00
Badlop
2d32c66fd7
Update copyright to 2020 ( #3149 )
2020-01-28 15:49:23 +01:00
Alexey Shchepin
24ac62eabd
Improve compatibility with CockroachDB ( #3074 )
2019-12-16 06:52:06 +03:00
Alexey Shchepin
f9120f75b0
Improve compatibility with CockroachDB ( #3074 )
2019-12-11 17:49:02 +03:00
Alexey Shchepin
2a35cadf80
Merge branch 'pg_prepared_statements' of https://github.com/sabudaye/ejabberd into sabudaye-pg_prepared_statements
...
Conflicts:
ejabberd.yml.example
src/ejabberd_sql.erl
2019-11-26 19:45:01 +03:00
Evgeny Khramtsov
5770946f03
Correctly handle unicode in log messages
2019-09-23 15:17:20 +03:00
Alexey Shchepin
21aa344ed5
Fix BEGIN/COMMIT/ROLLBACK syntax for MSSQL ( #2978 )
2019-09-09 00:16:44 +03:00
Evgeny Khramtsov
d796dcace5
Spawn SQL connections on demand only
2019-08-12 12:21:31 +03:00
Evgeny Khramtsov
bbee13f970
Improve SQL timeouts handling
...
Also improve some formatting
2019-07-31 10:39:53 +03:00
Evgeny Khramtsov
209f5d32e1
Fix SQL connections leakage
2019-07-30 14:26:11 +03:00
Evgeny Khramtsov
ae135e57d9
Improve SQL pool logic
...
Avoid using ETS table for SQL workers: rely on processes names instead
2019-07-24 14:28:43 +03:00
Evgeny Khramtsov
80beb6d6f6
Improve formatting of exceptions
2019-07-07 22:12:14 +03:00
Evgeny Khramtsov
d411e68a2e
Make return type of sql_transaction() consistent
2019-07-04 09:27:51 +03:00
Evgeny Khramtsov
b479fe5315
Use correct stacktrace in logging macros
...
By calling erlang:get_stacktrace() inside a lager function
we obtain actually a stacktrace of the lager function, not
the one we got during exception. This is not a problem for
newest Erlang versions though.
2019-06-26 00:05:41 +03:00
Evgeny Khramtsov
a3e0cbbdd8
Make logging messages more consistent
2019-06-24 20:32:34 +03:00
Evgeny Khramtsov
a02cff0e78
Use new configuration validator
2019-06-14 12:33:26 +03:00
Evgeny Khramtsov
2b523030cf
Report better errors on SQL terms decode failure
2019-05-19 11:22:41 +03:00
Paweł Chmielowski
d2ea905926
Fix handling of list arguments on pgsql
2019-04-23 17:46:42 +02:00
Alexey Shchepin
e921b43754
Fix transaction aborting and restarting in ejabberd_sql
2019-03-07 22:14:13 +03:00
Badlop
a4222fe9b3
Handle info log level when using MySQL ( #2541 )
2019-03-04 18:02:02 +01:00
Paweł Chmielowski
538f35d05a
Replace code using p1_time_compat wrapper with native functions
...
Since we now require R19, we shouldn't need that anymore.
There are still couple places where p1_time_compat:unique_timestamp() is
used as there is no direct equivalent.
2019-02-27 09:56:31 +01:00
Christophe Romain
ae7b391657
Do not overwrite odbc config file ( #2295 )
2019-01-31 13:25:56 +01:00
Badlop
55417dfb37
Update copyright to 2019 ( #2756 )
2019-01-08 22:53:27 +01:00
Paweł Chmielowski
c88a2d0569
Add code for handling deprecations of get_stacktrace()
2018-12-13 11:46:53 +01:00
Paweł Chmielowski
a6c06964e1
Add list types to sql_pt
2018-12-05 13:11:52 +01:00