Andrey, thanks for your report!
You're right, There was a bug that the client library didn't
take in account --with-charset and --with-collation configure
attributes.
This bug was fixed in 4.1.3 which is going to be released soon.
A temporary solution with 4.1.2 is to use "SET NAMES koi8r"
after
SQL
Hi, All!
This is configure scrypt haw I have compiled mysql 4.1.2
./configure \
"--prefix=/usr/local/mysql_4" \
"--without-debug" \
"--with-charset=koi8r" \
"--with-collation=koi8r_general_ci" \
"--with-extra-charset=koi8u,cp1251" \
"--with-mysqld-user=mysql" \
--without-berkeley-db \
--withou