diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-12-13 16:43:18 -0500 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-12-28 10:38:01 -0500 |
commit | bae301c18c25a16bad95e4f779e354b0285b18d2 (patch) | |
tree | 7445883de9e6d1ac9edee5724fc204bb36267150 /res/Makefile | |
parent | 53799318bc040a2082904df86d42ab08790b47ec (diff) |
cdr_mysql: Make sure connection charset is always set
When the MYSQL_OPT_RECONNECT option is enabled, the MySQL client API
will transparently reconnect when it needs to. Ideally this simplifies
our code, but when this reconnection occurs all connection state is
lost. Because we are not notified that this has happened, we don't know
to set our character set again (with "SET NAMES 'xyz'").
Rather than calling SET NAMES, we instead set the MYSQL_SET_CHARSET_NAME
option which will do it for us under the hood on each connect. This
option has been present in the MySQL C API for at least 15 years, so it
should be safe for most installations.
I also snuck a few other changes into this patch:
* Default the MySQL port to MYSQL_PORT (3306) instead of 0 if it's not
defined.
* Fix some erroneous and/or silly checks on the contents of the
configuration ast_str values.
ASTERISK-27366 #close
Reported by: Halil İbrahim YILDIZ
Change-Id: I36bf8dc5d5f83584e803b3b1a151dea9396ab8f5
Diffstat (limited to 'res/Makefile')
0 files changed, 0 insertions, 0 deletions