Hello. This seems like a bug: http://bugs.mysql.com/bug.php?id=16676
Hirofumi Fujiwara wrote: > Dear MySQL fans, > > I am checking MySQL 5.0 to use multibyte strings, Japanese. > > When I use char type parameter without CHARACTER SET clause, > parameter's character set is not the database character set but > latin1. > > 17.2.1. CREATE PROCEDURE says: > For character data types, if there is a CHARACTER SET clause > in the declaration, the specified character set and its default > collation are used. If there is no such clause, the database > character set and collation are used. (These are given by the > values of the character_set_database and collation_database > system variables.) > > Following is my test: > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > mysql> SET @@character_set_database=eucjpms; > Query OK, 0 rows affected (0.00 sec) > > mysql> SHOW VARIABLES LIKE 'character\_set\_%'; > +--------------------------+---------+ > | Variable_name | Value | > +--------------------------+---------+ > | character_set_client | eucjpms | > | character_set_connection | eucjpms | > | character_set_database | eucjpms | > | character_set_results | eucjpms | > | character_set_server | latin1 | > | character_set_system | utf8 | > +--------------------------+---------+ > 6 rows in set (0.00 sec) > > mysql> DELIMITER // > mysql> CREATE FUNCTION parametercharset( s CHAR(20) ) > -> RETURNS CHAR(50) CHARACTER SET binary > -> DETERMINISTIC RETURN CONCAT( s, ':', CHARSET(s) ); > -> // > Query OK, 0 rows affected (0.00 sec) > > mysql> DELIMITER ; > mysql> SELECT parametercharset('hello'); > +----------------------------------------------------+ > | parametercharset('hello') | > +----------------------------------------------------+ > | hello:latin1 | > +----------------------------------------------------+ > 1 row in set (0.00 sec) > > mysql> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > ------------------------------------------------------------ > Hirofumi Fujiwara (Tokyo JAPAN) enjoy JAVA and Puzzle World > [EMAIL PROTECTED] http://www.pro.or.jp/~fuji/index-eng.html > [EMAIL PROTECTED] Puzzle Japan http://www.puzzle.jp/ > ------------------------------------------------------------ > My SUDOKU Probs http://www.pro.or.jp/~fuji/sudoku/problems/ > ------------------------------------------------------------ -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]