Harald,
Hmmm... thank you, I have missed that! I guess that would solve my problem... I mean, almost: by giving this option to DBI, I substitute my current SET... command with DBI reading and parsing the config file, which, as the matter of fact, might be even more expensive than a single SET. (That is, if I do not use persistent connections.)Perhaps the following excerpt from "perldoc DBD::mysql" is relevant for you:
mysql_read_default_file mysql_read_default_group These options can be used to read a config file like /etc/my.cnf or ~/.my.cnf. By default MySQL's C client library doesn't use any config files unlike the client programs (mysql, mysqladmin, ...) that do, but outside of the C client library. Thus you need to explicitly request reading a con fig file, as in
$dsn = "DBI:mysql:test;mysql_read_default_file=/home/joe/my.cnf"; $dbh = DBI->connect($dsn, $user, $password)
Put "character_set_client = latin2" into your my.cnf ant tell Perl to
read it.
It would be nicer if DBD could read the config file during the "use phase" (for example in BEGIN { ... } ). But I guess I am getting a little to perl-ish now :-)
- Csongor
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]