@@ -39567,81 +39567,87 @@ LEX_CSTRING my_ci_get_collation_name_uca(CHARSET_INFO *cs,
39567
39567
39568
39568
/*
39569
39569
Add support for MySQL 8.0 utf8mb4_0900_.. collations
39570
+
39571
+ The collation id's where collected from fprintf() in add_alias_for_collation()
39570
39572
*/
39571
39573
39572
39574
#define mysql_0900_collation_start 255
39573
39575
39574
39576
struct mysql_0900_to_mariadb_1400_mapping
39575
39577
{
39576
39578
const char *mysql_col_name, *mariadb_col_name, *case_sensitivity;
39579
+ uint collation_id;
39577
39580
};
39578
39581
39579
39582
struct mysql_0900_to_mariadb_1400_mapping mysql_0900_mapping[]=
39580
39583
{
39581
39584
/* 255 Ascent insensitive, Case insensitive 'ai_ci' */
39582
- {"", "", "ai_ci"},
39583
- {"de_pb", "german2", "ai_ci"},
39584
- {"is", "icelandic", "ai_ci"},
39585
- {"lv", "latvian", "ai_ci"},
39586
- {"ro", "romanian", "ai_ci"},
39587
- {"sl", "slovenian", "ai_ci"},
39588
- {"pl", "polish", "ai_ci"},
39589
- {"et", "estonian", "ai_ci"},
39590
- {"es", "spanish", "ai_ci"},
39591
- {"sv", "swedish", "ai_ci"},
39592
- {"tr", "turkish", "ai_ci"},
39593
- {"cs", "czech", "ai_ci"},
39594
- {"da", "danish", "ai_ci"},
39595
- {"lt", "lithuanian", "ai_ci"},
39596
- {"sk", "slovak", "ai_ci"},
39597
- {"es_trad", "spanish2", "ai_ci"},
39598
- {"la", "roman", "ai_ci"},
39599
- {"fa", NullS, "ai_ci"}, // Disabled in MySQL
39600
- {"eo", "esperanto", "ai_ci"},
39601
- {"hu", "hungarian", "ai_ci"},
39602
- {"hr", "croatian", "ai_ci"},
39603
- {"si", NullS, "ai_ci"}, // Disabled in MySQL
39604
- {"vi", "vietnamese", "ai_ci"},
39585
+ {"", "", "ai_ci", 2308 },
39586
+ {"de_pb", "german2", "ai_ci", 2468 },
39587
+ {"is", "icelandic", "ai_ci", 2316 },
39588
+ {"lv", "latvian", "ai_ci", 2324 },
39589
+ {"ro", "romanian", "ai_ci", 2332 },
39590
+ {"sl", "slovenian", "ai_ci", 2340 },
39591
+ {"pl", "polish", "ai_ci", 2348 },
39592
+ {"et", "estonian", "ai_ci", 2356 },
39593
+ {"es", "spanish", "ai_ci", 2364 },
39594
+ {"sv", "swedish", "ai_ci", 2372 },
39595
+ {"tr", "turkish", "ai_ci", 2380 },
39596
+ {"cs", "czech", "ai_ci", 2388 },
39597
+ {"da", "danish", "ai_ci", 2396 },
39598
+ {"lt", "lithuanian", "ai_ci", 2404 },
39599
+ {"sk", "slovak", "ai_ci", 2412 },
39600
+ {"es_trad", "spanish2", "ai_ci", 2420 },
39601
+ {"la", "roman", "ai_ci", 2428 },
39602
+ {"fa", NullS, "ai_ci", 0}, // Disabled in MySQL
39603
+ {"eo", "esperanto", "ai_ci", 2444 },
39604
+ {"hu", "hungarian", "ai_ci", 2452 },
39605
+ {"hr", "croatian", "ai_ci", 2500 },
39606
+ {"si", NullS, "ai_ci", 0}, // Disabled in MySQL
39607
+ {"vi", "vietnamese", "ai_ci", 2492 },
39605
39608
39606
39609
/* 278 Ascent sensitive, Case sensitive 'as_cs' */
39607
- {"","", "as_cs"},
39608
- {"de_pb", "german2", "as_cs"},
39609
- {"is", "icelandic", "as_cs"},
39610
- {"lv", "latvian", "as_cs"},
39611
- {"ro", "romanian", "as_cs"},
39612
- {"sl", "slovenian", "as_cs"},
39613
- {"pl", "polish", "as_cs"},
39614
- {"et", "estonian", "as_cs"},
39615
- {"es", "spanish", "as_cs"},
39616
- {"sv", "swedish", "as_cs"},
39617
- {"tr", "turkish", "as_cs"},
39618
- {"cs", "czech", "as_cs"},
39619
- {"da", "danish", "as_cs"},
39620
- {"lt", "lithuanian", "as_cs"},
39621
- {"sk", "slovak", "as_cs"},
39622
- {"es_trad", "spanish2", "as_cs"},
39623
- {"la", "roman", "as_cs"},
39624
- {"fa", NullS, "as_cs"}, // Disabled in MySQL
39625
- {"eo", "esperanto", "as_cs"},
39626
- {"hu", "hungarian", "as_cs"},
39627
- {"hr", "croatian", "as_cs"},
39628
- {"si", NullS, "as_cs"}, // Disabled in MySQL
39629
- {"vi", "vietnamese", "as_cs"},
39630
-
39631
- {"", NullS, "as_cs"}, // Missing
39632
- {"", NullS, "as_cs"}, // Missing
39633
- {"_ja_0900_as_cs", NullS, "as_cs"}, // Not supported
39634
- {"_ja_0900_as_cs_ks", NullS, "as_cs"}, // Not supported
39610
+ {"","", "as_cs", 2311 },
39611
+ {"de_pb", "german2", "as_cs", 2471 },
39612
+ {"is", "icelandic", "as_cs", 2319 },
39613
+ {"lv", "latvian", "as_cs", 2327 },
39614
+ {"ro", "romanian", "as_cs", 2335 },
39615
+ {"sl", "slovenian", "as_cs", 2343 },
39616
+ {"pl", "polish", "as_cs", 2351 },
39617
+ {"et", "estonian", "as_cs", 2359 },
39618
+ {"es", "spanish", "as_cs", 2367 },
39619
+ {"sv", "swedish", "as_cs", 2375 },
39620
+ {"tr", "turkish", "as_cs", 2383 },
39621
+ {"cs", "czech", "as_cs", 2391 },
39622
+ {"da", "danish", "as_cs", 2399 },
39623
+ {"lt", "lithuanian", "as_cs", 2407 },
39624
+ {"sk", "slovak", "as_cs", 2415 },
39625
+ {"es_trad", "spanish2", "as_cs", 2423 },
39626
+ {"la", "roman", "as_cs", 2431 },
39627
+ {"fa", NullS, "as_cs", 0}, // Disabled in MySQL
39628
+ {"eo", "esperanto", "as_cs", 2447 },
39629
+ {"hu", "hungarian", "as_cs", 2455 },
39630
+ {"hr", "croatian", "as_cs", 2503 },
39631
+ {"si", NullS, "as_cs", 0}, // Disabled in MySQL
39632
+ {"vi", "vietnamese", "as_cs", 2495 },
39633
+
39634
+ {"", NullS, "as_cs", 0}, // Missing
39635
+ {"", NullS, "as_cs", 0}, // Missing
39636
+ {"_ja_0900_as_cs", NullS, "as_cs", 0}, // Not supported
39637
+ {"_ja_0900_as_cs_ks", NullS, "as_cs", 0}, // Not supported
39635
39638
39636
39639
/* 305 Ascent-sensitive, Case insensitive 'as_ci' */
39637
- {"","", "as_ci"},
39638
- {"ru", NullS, "ai_ci"}, // Not supported
39639
- {"ru", NullS, "as_cs"}, // Not supported
39640
- {"zh", NullS, "as_cs"}, // Not supported
39641
- {NullS, NullS, ""}
39640
+ {"","", "as_ci", 2310 },
39641
+ {"ru", NullS, "ai_ci", 0}, // Not supported
39642
+ {"ru", NullS, "as_cs", 0}, // Not supported
39643
+ {"zh", NullS, "as_cs", 0}, // Not supported
39644
+ {NullS, NullS, "", 0 }
39642
39645
};
39643
39646
39644
39647
39648
+ static LEX_CSTRING mysql_utf8_bin= { STRING_WITH_LEN("utf8mb4_0900_bin") };
39649
+ static LEX_CSTRING mariadb_utf8_bin= { STRING_WITH_LEN("utf8mb4_bin") };
39650
+
39645
39651
/*
39646
39652
Map mysql character sets to MariaDB using the same definition but with
39647
39653
with the MySQL collation name and id.
@@ -39651,8 +39657,6 @@ my_bool mysql_utf8mb4_0900_collation_definitions_add()
39651
39657
{
39652
39658
uint id= mysql_0900_collation_start;
39653
39659
struct mysql_0900_to_mariadb_1400_mapping *map;
39654
- LEX_CSTRING mysql_utf8_bin= { STRING_WITH_LEN("utf8mb4_0900_bin") };
39655
- LEX_CSTRING mariadb_utf8_bin= { STRING_WITH_LEN("utf8mb4_bin") };
39656
39660
39657
39661
for (map= mysql_0900_mapping; map->mysql_col_name ; map++, id++)
39658
39662
{
@@ -39680,12 +39684,13 @@ my_bool mysql_utf8mb4_0900_collation_definitions_add()
39680
39684
alias_name.str= alias;
39681
39685
alias_name.length= ali_length;
39682
39686
39683
- if (add_alias_for_collation(&org_name, &alias_name, id))
39687
+ if (add_alias_for_collation(&org_name, map->collation_id, &alias_name,
39688
+ id))
39684
39689
return 1;
39685
39690
}
39686
39691
}
39687
39692
39688
- if (add_alias_for_collation(&mariadb_utf8_bin, &mysql_utf8_bin, 309))
39693
+ if (add_alias_for_collation(&mariadb_utf8_bin, 46, &mysql_utf8_bin, 309))
39689
39694
return 1;
39690
39695
return 0;
39691
39696
}
0 commit comments