Bug #2109 Relative path is not resolved for the character-sets-dir option
Submitted: 13 Dec 2003 16:58 Modified: 2 Feb 2004 9:36
Reporter: Igor Babaev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.2 OS:Any (all)
Assigned to: Igor Babaev CPU Architecture:Any

[13 Dec 2003 16:58] Igor Babaev
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