mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2011-04-10 Junichi Satoh <junichi@rworks.jp>
* lib/PandoraFMS/DB.pm: Moved mysql_enable_utf8 to after database connection. It is to avoid coding conversion against multibyte characters by mysql. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4181 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e76e5c1e9a
commit
bee4eb2f4d
@ -1,3 +1,9 @@
|
|||||||
|
2011-04-10 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/DB.pm: Moved mysql_enable_utf8 to after database
|
||||||
|
connection. It is to avoid coding conversion against multibyte
|
||||||
|
characters by mysql.
|
||||||
|
|
||||||
2011-04-04 Junichi Satoh <junichi@rworks.jp>
|
2011-04-04 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* lib/PandoraFMS/Tools.pm: Added UTF-8 flags deletion from multibyte
|
* lib/PandoraFMS/Tools.pm: Added UTF-8 flags deletion from multibyte
|
||||||
|
@ -66,12 +66,15 @@ sub db_connect ($$$$$$) {
|
|||||||
if ($rdbms eq 'mysql') {
|
if ($rdbms eq 'mysql') {
|
||||||
|
|
||||||
# Connect to MySQL
|
# Connect to MySQL
|
||||||
my $dbh = DBI->connect("DBI:mysql:$db_name:$db_host:3306", $db_user, $db_pass, { RaiseError => 1, AutoCommit => 1, mysql_enable_utf8 => 1 });
|
my $dbh = DBI->connect("DBI:mysql:$db_name:$db_host:3306", $db_user, $db_pass, { RaiseError => 1, AutoCommit => 1 });
|
||||||
return undef unless defined ($dbh);
|
return undef unless defined ($dbh);
|
||||||
|
|
||||||
# Enable auto reconnect
|
# Enable auto reconnect
|
||||||
$dbh->{'mysql_auto_reconnect'} = 1;
|
$dbh->{'mysql_auto_reconnect'} = 1;
|
||||||
|
|
||||||
|
# Enable character semantics
|
||||||
|
$dbh->{'mysql_enable_utf8'} = 1;
|
||||||
|
|
||||||
return $dbh;
|
return $dbh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user