Description:
A relative path for the option --character-sets-dir is not resolved.
As a result the server fails to load needed character sets xml files
whenever a query refers to a collation defined for one these character sets,
How to repeat:
Sstart the server from mysql-test directory as follows:
../sql/mysqld --no-defaults --skip-grant-tables --basedir=.
--datadir=./var/master-data --skip-innodb --skip-bdb
--language=../sql/share/english/ --character-sets-dir=../sql/share/charset
With the mysql client application submit the following command:
show variables like 'character-sets-dir';
You'll have:
mysql> show variables like 'character-sets-dir';
+--------------------+-----------------------+
| Variable_name | Value |
+--------------------+-----------------------+
| character-sets-dir | ../sql/share/charsets |
+--------------------+-----------------------+
1 row in set (0.00 sec)
(
At the same time you'll have:
mysql> show variables like 'language';
+---------------+-------------------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------------------+
| language | /home/igor/mysql-4.1/mysql-test/../sql/share/english/ |
+---------------+-------------------------------------------------------+
1 row in set (0.00 sec)
)
As a result of a wrong path resulution for character sets dir you'll
have:
mysql> create table t1(a char(10) collate latin1_general_cs not null);
ERROR 1272 (HY000): Unknown collation: 'latin1_general_cs'
Suggested fix:
Fix the fix_paths() function in mysqld.cc