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
Christophe Romain
4b3db3a9cb
Relax result matching to fix pgsql keepalive ( #2632 )
2018-11-21 18:06:32 +01:00
Evgeny Khramtsov
39fa1a810d
Move certificates processing code to pkix application
...
==== WARNING: MUST BE ADDED TO RELEASE NOTES =====
The commit introduces the following incompatibility:
- Option 'ca_path' is deprecated and has no effect anymore:
option 'ca_file' should be used instead if needed.
==================================================
2018-09-27 20:37:27 +03:00
Christophe Romain
c109d3eff0
Add odbc connection robustness ( #2428 )
2018-09-25 16:59:49 +02:00
Evgeny Khramtsov
08f3d066b1
Switch more log message to warning level
...
The commit is supposed to improve logging at loglevel 3, which
is the recommended level for high loaded ejabberd servers
2018-09-19 23:12:14 +03:00
Evgeny Khramtsov
2d246f61dd
Fix some dialyzer warnings
2018-09-09 09:59:08 +03:00
root
b545301f63
fix for freetds UTF-8 corruption
2018-09-07 19:56:39 +03:00
Evgeniy Khramtsov
6b8bc811ac
Don't crash on most common gen_server:call errors
2018-07-01 14:26:49 +03:00
Evgeniy Khramtsov
fd8e07af47
Get rid of ejabberd.hrl header
...
The header consisted of too many unrelated stuff and macros misuse.
Some stuff is moved into scram.hrl and type_compat.hrl.
All macros have been replaced with the corresponding function calls.
TODO: probably type_compat.hrl is not even needed anymore since
we support only Erlang >= OTP 17.5
2018-06-14 14:00:47 +03:00
Alexey Shchepin
e15595df64
Add 'new_sql_schema' config option, --enable-new-sql-schema now sets its default value to true ( #2239 )
2018-03-15 17:55:05 +03:00
Evgeniy Khramtsov
cdc7c1d1ed
Update copyright dates
2018-01-05 23:18:58 +03:00
Evgeniy Khramtsov
5b42fc1d0d
Avoid excessive logging of SQL failures
2017-12-17 19:46:55 +03:00
Christophe Romain
395b74a89f
Windows does not have /tmp, fallback to /home/chris/conf
2017-11-30 15:32:09 +01:00
Evgeniy Khramtsov
92532a0d66
Replace gen_fsm with p1_fsm to avoid warnings in OTP20+
2017-08-05 20:58:21 +03:00
Evgeniy Khramtsov
6e8895f9e9
Get rid of sql_queries.erl
2017-05-23 12:25:13 +03:00