Changes between Version 22 and Version 23 of MySqlDb
- Timestamp:
- Jul 1, 2008, 2:27:16 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MySqlDb
v22 v23 9 9 === MySQL === 10 10 11 In order to avoid several issues with unicode and international characters throughout Trac (e.g., international characters turning into question marks with mysterious "Incorrect string value" errors logged), we '''''strongly''''' advise MySQL users to only use databases having the ''`utf8`'' character set and the ''`utf8_ general_ci`'' collation type. However, changing collation to ''utf8'' makes MySQL fail in 4.1.x and 5.0.x versions on MyISAM table type, because some Trac tables indexes become "too big". This will be (hopefully) addressed in [milestone:0.10.4]. As a workaround it has been [comment:ticket:3659:5 recommended] to use InnoDB tables instead of MyISAM where this limitation is absent.11 In order to avoid several issues with unicode and international characters throughout Trac (e.g., international characters turning into question marks with mysterious "Incorrect string value" errors logged), we '''''strongly''''' advise MySQL users to only use databases having the ''`utf8`'' character set and the ''`utf8_bin`'' collation type. However, changing collation to ''utf8'' makes MySQL fail in 4.1.x and 5.0.x versions on MyISAM table type, because some Trac tables indexes become "too big". This will be (hopefully) addressed in [milestone:0.10.4]. As a workaround it has been [comment:ticket:3659:5 recommended] to use InnoDB tables instead of MyISAM where this limitation is absent. 12 12 13 13 Such databases can be created with the MySQL monitor, like that: 14 14 {{{ 15 CREATE DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE utf8_ general_ci;15 CREATE DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; 16 16 }}} 17 17 18 XXX: I think the above advice on collations is wrong - using a case-insensitive collation does not sound right, and when I used the above command, the indexing process failed when it came to insert a revision which included changes to files with names differing only in case. Recreating the db using the utf8_bin collation allowed things to work as expected. 19 ''See also: [comment:ticket:4378:5 #4378], where someone stated the opposite (i.e. that setting the collation mode to utf8_bin was ''not'' enough... Maybe this depends on the type of tables used. Anyway, there's a patch on #4378 that should solve that issue in all cases.'' 20 ''utf8_general_ci is required because MySQL-Python uses the collation to figure out if it is being passed binary or text. See [https://sourceforge.net/tracker/index.php?func=detail&aid=1693363&group_id=22307&atid=374932 bug 1693363]'' 18 Some unicode related MySQL-python bugs were worked around in r7286 so if you're experiencing problems with non-ascii text you should consider upgrading to Trac 0.11-stable or wait until Trac 0.11.1 is released. 21 19 22 20 To check character set settings for your database, issue command: