Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
centreon
centreon-collect
Commits
bf161c0d
Commit
bf161c0d
authored
Jun 09, 2020
by
David Boucher
Browse files
fix(mysql): Non ascii characters badly encoded in database.
parent
aefaa603
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ccb_sql/mysql_connection.cc
View file @
bf161c0d
...
...
@@ -455,9 +455,9 @@ std::string mysql_connection::_get_stack() {
void
mysql_connection
::
_run
()
{
std
::
unique_lock
<
std
::
mutex
>
locker
(
_result_mutex
);
_conn
=
mysql_init
(
nullptr
);
if
(
!
_conn
)
{
if
(
!
_conn
)
mysql_manager
::
instance
().
set_error
(
::
mysql_error
(
_conn
));
}
else
{
else
{
while
(
!
mysql_real_connect
(
_conn
,
_host
.
c_str
(),
_user
.
c_str
(),
_pwd
.
c_str
(),
_name
.
c_str
(),
_port
,
nullptr
,
CLIENT_FOUND_ROWS
))
{
...
...
@@ -469,6 +469,8 @@ void mysql_connection::_run() {
}
}
mysql_set_character_set
(
_conn
,
"utf8"
);
if
(
_qps
>
1
)
mysql_autocommit
(
_conn
,
0
);
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment