Hirdetés

Keresés

Új hozzászólás Aktív témák

  • pelyib

    tag

    válasz Taci #20543 üzenetére

    Mivel en se tudtam a valaszt, viszont erdekelt, ezert kicsit olvasgattam es ezeket talaltam:
    For nonbinary collation names that do not specify accent sensitivity, it is determined by case sensitivity. If a collation name does not contain _ai or _as, _ci in the name implies _ai and _cs in the name implies _as. For example, latin1_general_ci is explicitly case-insensitive and implicitly accent-insensitive, and latin1_general_cs is explicitly case-sensitive and implicitly accent-sensitive.
    [LINK]

    Illetve ezt a kerdest S0-n
    If you need "beyoncé" and "beyonce" to be considered different, then ideally you would use a case-sensitive (and either explicitly-stated or implied accent-sensitive) collation. However, it looks like this is not available in MySQL 5.6 (or even 5.7), while MySQL 8.0 does have utf8mb4_0900_as_cs, or even utf8mb4_0900_as_ci if you only want the accent to distinguish between the values while allowing "beyonce" and "Beyonce" to match.

    Bar ez nem kisokos, de legalabb valasz az eredeti kerdesre :)

    UPD: csak lehet ezt:
    percona x@y:z> show create table char_collection;
    +-----------------+-------------------------------------------------------------+
    | Table           | Create Table                                                |
    +-----------------+-------------------------------------------------------------+
    | char_collection | CREATE TABLE `char_collection` (                            |
    |                 |   `name` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL    |
    |                 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
    +-----------------+-------------------------------------------------------------+
    1 row in set
    Time: 0.039s
    percona x@y:z> select * from char_collection where name like 'ár%' collate utf8mb4_bin;
    +------------------------+
    | name                   |
    +------------------------+
    | árvíztűrő tükörfúrógép |
    +------------------------+
    1 row in set
    Time: 0.237s
    percona x@y:z> select * from char_collection where name like 'ar%' collate utf8mb4_bin;
    +------+
    | name |
    +------+
    0 rows in set
    Time: 1.997s
    percona x@y:z> select * from char_collection;
    +------------------------+
    | name                   |
    +------------------------+
    | árvíztűrő tükörfúrógép |
    +------------------------+
    1 row in set
    Time: 0.067s

  • Mike

    veterán

    válasz Taci #20543 üzenetére

    én úgy tudom egyszeráen nem foglalkoznak vele a mysql fejlesztői, szóval ez iylen
    max te tudsz ékezetes szűrést csinálni kézzel a lekérdezés eredményére
    de ezt csak tippelem

Új hozzászólás Aktív témák