Bug #76571 utf8_general_ci sorting not work
Submitted: 2 Apr 2015 5:29 Modified: 2 Apr 2015 11:25
Reporter: Виталий Хныкин Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.73-log OS:Linux
Assigned to: CPU Architecture:Any

[2 Apr 2015 5:29] Виталий Хныкин
Description:
server not use sortiong option when useed utf8_general_ci

mysql> SELECT *  FROM  `test`  ORDER BY  `test`.`name`;
+----+-------------------+
| id | name              |
+----+-------------------+
|  1 | Leningrad_46_e04_ |
|  2 | Leningrad_46_e02_ |
|  3 | Leningrad_46_e03_ |
|  4 | Leningrad_46_e04_ |
|  5 | Leningrad_46_e05_ |
|  6 | Leningrad_46_e06_ |
|  7 | Leningrad_46_e07_ |
|  8 | Leningrad_46_e08_ |
+----+-------------------+
8 rows in set (0.00 sec)
--------------------------------------------------

and utf8_bin:
mysql> SELECT *  FROM  `test`  ORDER BY  `test`.`name` collate utf8_bin;
+----+-------------------+
| id | name              |
+----+-------------------+
|  2 | Leningrad_46_e02_ |
|  3 | Leningrad_46_e03_ |
|  1 | Leningrad_46_e04_ |
|  4 | Leningrad_46_e04_ |
|  5 | Leningrad_46_e05_ |
|  6 | Leningrad_46_e06_ |
|  7 | Leningrad_46_e07_ |
|  8 | Leningrad_46_e08_ |
+----+-------------------+
8 rows in set (0.00 sec)

table detals:

CREATE TABLE IF NOT EXISTS `test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=9 ;

INSERT INTO `test` (`id`, `name`) VALUES
(1, 'Leningrad_46_e04_'),
(2, 'Leningrad_46_e02_'),
(3, 'Leningrad_46_e03_'),
(4, 'Leningrad_46_e04_'),
(5, 'Leningrad_46_e05_'),
(6, 'Leningrad_46_e06_'),
(7, 'Leningrad_46_e07_'),
(8, 'Leningrad_46_e08_');
 

How to repeat:
in description
[2 Apr 2015 11:25] Виталий Хныкин
trouble detected!

my.cnf
max_sort_length = 20
fixed
max_sort_length = 200