projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b49831
)
Use my.cnf to set charset when using DBI
author
Jamie Cameron
<jcameron@webmin.com>
Mon, 5 Jan 2009 17:35:02 +0000
(17:35 +0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Mon, 5 Jan 2009 17:35:02 +0000
(17:35 +0000)
mysql/mysql-lib.pl
patch
|
blob
|
history
diff --git
a/mysql/mysql-lib.pl
b/mysql/mysql-lib.pl
index
fd44f83
..
00ac533
100644
(file)
--- a/
mysql/mysql-lib.pl
+++ b/
mysql/mysql-lib.pl
@@
-249,6
+249,8
@@
if ($driver_handle) {
$cstr .= ";host=$config{'host'}" if ($config{'host'});
$cstr .= ";port=$config{'port'}" if ($config{'port'});
$cstr .= ";mysql_socket=$config{'sock'}" if ($config{'sock'});
+ $cstr .= ";mysql_read_default_file=$config{'my_cnf'}"
+ if (-r $config{'my_cnf'});
local $dbh = $driver_handle->connect($cstr, $mysql_login, $mysql_pass,
{ });
$dbh || &error("DBI connect failed : ",$driver_handle->errstr);