I'm going to reduce entropy and put all charset-related stuff here.
Same for COLLATION_CONNECTION:
MySQL [test]> set names utf8;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> set statement collation_connection = utf8_bin for select 'a' union select 'b' union select 'A' order by 1;
+---+
| a |
+---+
| a |
| b |
+---+
2 rows in set (0.10 sec)
MySQL [test]> set collation_connection = utf8_bin;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> select 'a' union select 'b' union select 'A' order by 1;
+---+
| a |
+---+
| A |
| a |
| b |
+---+
3 rows in set (0.00 sec)
I'm going to reduce entropy and put all charset-related stuff here.
Same for COLLATION_ CONNECTION:
MySQL [test]> set names utf8;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> set statement collation_ connection = utf8_bin for select 'a' union select 'b' union select 'A' order by 1;
+---+
| a |
+---+
| a |
| b |
+---+
2 rows in set (0.10 sec)
MySQL [test]> set collation_ connection = utf8_bin;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> select 'a' union select 'b' union select 'A' order by 1;
+---+
| a |
+---+
| A |
| a |
| b |
+---+
3 rows in set (0.00 sec)