mariadb/mysql-test/main/locale.result
Oleksandr Byelkin 9e1fb104a3 MariaDB 11.4.4 release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEF39AEP5WyjM2MAMF8WVvJMdM0dgFAmck77AACgkQ8WVvJMdM
 0dgccQ/+Lls8fWt4D+gMPP7x+drJSO/IE/gZFt3ugbWF+/p3B2xXAs5AAE83wxEh
 QSbp4DCkb/9PnuakhLmzg0lFbxMUlh4rsJ1YyiuLB2J+YgKbAc36eQQf+rtYSipd
 DT5uRk36c9wOcOXo/mMv4APEvpPXBIBdIL4VvpKFbIOE7xT24Sp767zWXdXqrB1f
 JgOQdM2ct+bvSPC55oZ5p1kqyxwvd6K6+3RB3CIpwW9zrVSLg7enT3maLjj/761s
 jvlRae+Cv+r+Hit9XpmEH6n2FYVgIJ3o3WhdAHwN0kxKabXYTg7OCB7QxDZiUHI9
 C/5goKmKaPB1PCQyuTQyLSyyK9a8nPfgn6tqw/p/ZKDQhKT9sWJv/5bSWecrVndx
 LLYifSTrFC/eXLzgPvCnNv/U8SjsZaAdMIKS681+qDJ0P5abghUIlGnMYTjYXuX1
 1B6Vrr0bdrQ3V1CLB3tpkRjpUvicrsabtuAUAP65QnEG2G9UJXklOer+DE291Gsl
 f1I0o6C1zVGAOkUUD3QEYaHD8w7hlvyfKme5oXKUm3DOjaAar5UUKLdr6prxRZL4
 ebhmGEy42Mf8fBYoeohIxmxgvv6h2Xd9xCukgPp8hFpqJGw8abg7JNZTTKH4h2IY
 J51RpD10h4eoi6WRn3opEcjexTGvZ+xNR7yYO5WxWw6VIre9IUA=
 =s+WW
 -----END PGP SIGNATURE-----

Merge tag '11.4' into 11.6

MariaDB 11.4.4 release
2024-11-08 07:17:00 +01:00

371 lines
12 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# WL#4642 Greek locale for DAYNAME, MONTHNAME, DATE_FORMAT
#
SET NAMES utf8;
SET @@lc_time_names=109;
SELECT @@lc_time_names;
@@lc_time_names
el_GR
CREATE TABLE t1 (a DATE);
INSERT INTO t1 VALUES
('2006-01-01'),('2006-01-02'),('2006-01-03'),
('2006-01-04'),('2006-01-05'),('2006-01-06'),('2006-01-07');
SELECT a, date_format(a,'%a') as abday, dayname(a) as day FROM t1 ORDER BY a;
a abday day
2006-01-01 Κυρ Κυριακή
2006-01-02 Δευ Δευτέρα
2006-01-03 Τρί Τρίτη
2006-01-04 Τετ Τετάρτη
2006-01-05 Πέμ Πέμπτη
2006-01-06 Παρ Παρασκευή
2006-01-07 Σάβ Σάββατο
DROP TABLE t1;
CREATE TABLE t1 (a DATE);
INSERT INTO t1 VALUES
('2006-01-01'),('2006-02-01'),('2006-03-01'),
('2006-04-01'),('2006-05-01'),('2006-06-01'),
('2006-07-01'),('2006-08-01'),('2006-09-01'),
('2006-10-01'),('2006-11-01'),('2006-12-01');
SELECT a, date_format(a,'%b') as abmon, monthname(a) as mon FROM t1 ORDER BY a;
a abmon mon
2006-01-01 Ιαν Ιανουάριος
2006-02-01 Φεβ Φεβρουάριος
2006-03-01 Μάρ Μάρτιος
2006-04-01 Απρ Απρίλιος
2006-05-01 Μάι Μάιος
2006-06-01 Ιούν Ιούνιος
2006-07-01 Ιούλ Ιούλιος
2006-08-01 Αύγ Αύγουστος
2006-09-01 Σεπ Σεπτέμβριος
2006-10-01 Οκτ Οκτώβριος
2006-11-01 Νοέ Νοέμβριος
2006-12-01 Δεκ Δεκέμβριος
SELECT format(123456.789, 3, 'el_GR');
format(123456.789, 3, 'el_GR')
123456,789
DROP TABLE t1;
#
# Bug#46633 Obsolete Serbian locale name
#
SET lc_messages=sr_YU;
ERROR HY000: Unbekannte Locale: 'sr_YU'
SET lc_messages=sr_RS;
SHOW VARIABLES LIKE 'lc_messages';
Variable_name Value
lc_messages sr_RS
SET lc_time_names=sr_RS;
SELECT format(123456.789, 3, 'sr_RS');
format(123456.789, 3, 'sr_RS')
123456.789
#
# Bug#43207 wrong LC_TIME names for romanian locale
#
SET NAMES utf8;
SET lc_time_names=ro_RO;
SELECT DATE_FORMAT('2001-01-01', '%w %a %W');
DATE_FORMAT('2001-01-01', '%w %a %W')
1 Lu Luni
SELECT DATE_FORMAT('2001-01-02', '%w %a %W');
DATE_FORMAT('2001-01-02', '%w %a %W')
2 Ma Marţi
SELECT DATE_FORMAT('2001-01-03', '%w %a %W');
DATE_FORMAT('2001-01-03', '%w %a %W')
3 Mi Miercuri
SELECT DATE_FORMAT('2001-01-04', '%w %a %W');
DATE_FORMAT('2001-01-04', '%w %a %W')
4 Jo Joi
SELECT DATE_FORMAT('2001-01-05', '%w %a %W');
DATE_FORMAT('2001-01-05', '%w %a %W')
5 Vi Vineri
SELECT DATE_FORMAT('2001-01-06', '%w %a %W');
DATE_FORMAT('2001-01-06', '%w %a %W')
6 Sâ Sâmbătă
SELECT DATE_FORMAT('2001-01-07', '%w %a %W');
DATE_FORMAT('2001-01-07', '%w %a %W')
0 Du Duminică
End of 5.4 tests
SET NAMES utf8;
SET lc_time_names=de_AT;
SELECT monthname('2001-01-01');
monthname('2001-01-01')
Jänner
SELECT monthname('2001-02-01');
monthname('2001-02-01')
Februar
SELECT monthname('2001-03-01');
monthname('2001-03-01')
März
#
# MDEV-10052 Illegal mix of collations with DAYNAME(date_field)<>varchar_field
#
SET NAMES utf8;
CREATE TABLE t1 (c VARCHAR(8) CHARACTER SET latin1, d DATE);
INSERT INTO t1 VALUES ('test',now());
Warnings:
Note 1265 Data truncated for column 'd' at row 1
SET lc_time_names=ru_RU;
SELECT c FROM t1 WHERE DAYNAME(d)<>c;
ERROR HY000: Illegal mix of collations (utf8mb3_uca1400_ai_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '<>'
SELECT c FROM t1 WHERE MONTHNAME(d)<>c;
ERROR HY000: Illegal mix of collations (utf8mb3_uca1400_ai_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '<>'
SET lc_time_names=en_US;
SELECT c FROM t1 WHERE DAYNAME(d)<>c;
c
test
SELECT c FROM t1 WHERE MONTHNAME(d)<>c;
c
test
SET NAMES latin1;
SELECT c FROM t1 WHERE DAYNAME(d)<>c;
c
test
SELECT c FROM t1 WHERE MONTHNAME(d)<>c;
c
test
DROP TABLE t1;
#
# Start of 5.6 tests
#
#
# WL#5303 Romansh locale for DAYNAME, MONTHNAME, DATE_FORMAT
#
SET NAMES utf8;
SET @old_50915_lc_time_names := @@lc_time_names;
SET lc_time_names=en_US;
SELECT DATE_FORMAT('2001-01-01', '%w %a %W');
DATE_FORMAT('2001-01-01', '%w %a %W')
1 Mon Monday
SELECT DATE_FORMAT('2001-03-01', '%c %b %M');
DATE_FORMAT('2001-03-01', '%c %b %M')
3 Mar March
SET lc_time_names=rm_CH;
SELECT DATE_FORMAT('2001-01-01', '%w %a %W');
DATE_FORMAT('2001-01-01', '%w %a %W')
1 gli glindesdi
SELECT DATE_FORMAT('2001-01-02', '%w %a %W');
DATE_FORMAT('2001-01-02', '%w %a %W')
2 ma mardi
SELECT DATE_FORMAT('2001-01-03', '%w %a %W');
DATE_FORMAT('2001-01-03', '%w %a %W')
3 me mesemna
SELECT DATE_FORMAT('2001-01-04', '%w %a %W');
DATE_FORMAT('2001-01-04', '%w %a %W')
4 gie gievgia
SELECT DATE_FORMAT('2001-01-05', '%w %a %W');
DATE_FORMAT('2001-01-05', '%w %a %W')
5 ve venderdi
SELECT DATE_FORMAT('2001-01-06', '%w %a %W');
DATE_FORMAT('2001-01-06', '%w %a %W')
6 so sonda
SELECT DATE_FORMAT('2001-01-07', '%w %a %W');
DATE_FORMAT('2001-01-07', '%w %a %W')
0 du dumengia
SELECT DATE_FORMAT('2001-01-01', '%c %b %M');
DATE_FORMAT('2001-01-01', '%c %b %M')
1 schan schaner
SELECT DATE_FORMAT('2001-02-01', '%c %b %M');
DATE_FORMAT('2001-02-01', '%c %b %M')
2 favr favrer
SELECT DATE_FORMAT('2001-03-01', '%c %b %M');
DATE_FORMAT('2001-03-01', '%c %b %M')
3 mars mars
SELECT DATE_FORMAT('2001-04-01', '%c %b %M');
DATE_FORMAT('2001-04-01', '%c %b %M')
4 avr avrigl
SELECT DATE_FORMAT('2001-05-01', '%c %b %M');
DATE_FORMAT('2001-05-01', '%c %b %M')
5 matg matg
SELECT DATE_FORMAT('2001-06-01', '%c %b %M');
DATE_FORMAT('2001-06-01', '%c %b %M')
6 zercl zercladur
SELECT DATE_FORMAT('2001-07-01', '%c %b %M');
DATE_FORMAT('2001-07-01', '%c %b %M')
7 fan fanadur
SELECT DATE_FORMAT('2001-08-01', '%c %b %M');
DATE_FORMAT('2001-08-01', '%c %b %M')
8 avust avust
SELECT DATE_FORMAT('2001-09-01', '%c %b %M');
DATE_FORMAT('2001-09-01', '%c %b %M')
9 sett settember
SELECT DATE_FORMAT('2001-10-01', '%c %b %M');
DATE_FORMAT('2001-10-01', '%c %b %M')
10 oct october
SELECT DATE_FORMAT('2001-11-01', '%c %b %M');
DATE_FORMAT('2001-11-01', '%c %b %M')
11 nov november
SELECT DATE_FORMAT('2001-12-01', '%c %b %M');
DATE_FORMAT('2001-12-01', '%c %b %M')
12 dec december
SET lc_time_names=de_CH;
SELECT DATE_FORMAT('2001-01-06', '%w %a %W');
DATE_FORMAT('2001-01-06', '%w %a %W')
6 Sa Samstag
SELECT DATE_FORMAT('2001-09-01', '%c %b %M');
DATE_FORMAT('2001-09-01', '%c %b %M')
9 Sep September
SELECT DATE_FORMAT('2010-03-23 11:00:00','%h %p');
DATE_FORMAT('2010-03-23 11:00:00','%h %p')
11 AM
SELECT DATE_FORMAT('2010-03-23 13:00:00','%h %p');
DATE_FORMAT('2010-03-23 13:00:00','%h %p')
01 PM
SELECT format(123456789,2,'rm_CH');
format(123456789,2,'rm_CH')
123'456'789,00
SET lc_messages=rm_CH;
SELECT * FROM non_existent;
ERROR 42S02: Table 'test.non_existent' doesn't exist
SET lc_time_names=@old_50915_lc_time_names;
#
# End of 10.0 tests
#
#
# End of 10.1 tests
#
create view v1 as select
date_format('2001-10-02', '%c %b %M') as a,
date_format('2001-10-02', '%c %b %M', 'ru_RU') as a1,
format(123456789,2) as b,
format(123456789,2,'rm_CH') as b1;
select * from v1;
a a1 b b1
10 Oct October 10 Окт Октября 123,456,789.00 123'456'789,00
show create view v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select date_format('2001-10-02','%c %b %M') AS `a`,date_format('2001-10-02','%c %b %M','ru_RU') AS `a1`,format(123456789,2) AS `b`,format(123456789,2,'rm_CH') AS `b1` utf8mb3 utf8mb3_uca1400_ai_ci
drop view v1;
#
# End of 10.2 tests
#
select date_format('2001-01-01', '%w %a %W', 'ro_RO');
date_format('2001-01-01', '%w %a %W', 'ro_RO')
1 Lu Luni
select date_format('2001-01-03', '%w %a %W', 'ro_RO');
date_format('2001-01-03', '%w %a %W', 'ro_RO')
3 Mi Miercuri
select date_format('2001-01-05', '%w %a %W', 'ro_RO');
date_format('2001-01-05', '%w %a %W', 'ro_RO')
5 Vi Vineri
select date_format('2001-01-07', '%w %a %W', 'ro_RO');
date_format('2001-01-07', '%w %a %W', 'ro_RO')
0 Du Duminică
select date_format('2001-01-01', '%w %a %W', 'de_AT');
date_format('2001-01-01', '%w %a %W', 'de_AT')
1 Mon Montag
select date_format('2001-02-01', '%w %a %W', 'de_AT');
date_format('2001-02-01', '%w %a %W', 'de_AT')
4 Don Donnerstag
select date_format('2001-03-01', '%w %a %W', 'de_AT');
date_format('2001-03-01', '%w %a %W', 'de_AT')
4 Don Donnerstag
select date_format('2001-01-01', '%w %a %W', 'en_US');
date_format('2001-01-01', '%w %a %W', 'en_US')
1 Mon Monday
select date_format('2001-03-01', '%c %b %M', 'en_US');
date_format('2001-03-01', '%c %b %M', 'en_US')
3 Mar March
select date_format('2001-01-01', '%w %a %W', 'rm_CH');
date_format('2001-01-01', '%w %a %W', 'rm_CH')
1 gli glindesdi
select date_format('2001-01-03', '%w %a %W', 'rm_CH');
date_format('2001-01-03', '%w %a %W', 'rm_CH')
3 me mesemna
select date_format('2001-01-05', '%w %a %W', 'rm_CH');
date_format('2001-01-05', '%w %a %W', 'rm_CH')
5 ve venderdi
select date_format('2001-01-07', '%w %a %W', 'rm_CH');
date_format('2001-01-07', '%w %a %W', 'rm_CH')
0 du dumengia
select date_format('2001-02-01', '%c %b %M', 'rm_CH');
date_format('2001-02-01', '%c %b %M', 'rm_CH')
2 favr favrer
select date_format('2001-04-01', '%c %b %M', 'rm_CH');
date_format('2001-04-01', '%c %b %M', 'rm_CH')
4 avr avrigl
select date_format('2001-06-01', '%c %b %M', 'rm_CH');
date_format('2001-06-01', '%c %b %M', 'rm_CH')
6 zercl zercladur
select date_format('2001-08-01', '%c %b %M', 'rm_CH');
date_format('2001-08-01', '%c %b %M', 'rm_CH')
8 avust avust
select date_format('2001-10-01', '%c %b %M', 'rm_CH');
date_format('2001-10-01', '%c %b %M', 'rm_CH')
10 oct october
select date_format('2001-12-01', '%c %b %M', 'rm_CH');
date_format('2001-12-01', '%c %b %M', 'rm_CH')
12 dec december
select date_format('2001-01-06', '%w %a %W', 'de_CH');
date_format('2001-01-06', '%w %a %W', 'de_CH')
6 Sa Samstag
select date_format('2001-09-01', '%c %b %M', 'de_CH');
date_format('2001-09-01', '%c %b %M', 'de_CH')
9 Sep September
#
# MDEV-30630 locale: Chinese error message for ZH_CN
#
SET lc_messages=ZH_CN;
SELECT x;
ERROR 42S22: 未知列'x'在'SELECT'
SET lc_messages=DEFAULT;
#
# End of 10.4 tests
#
#
# MDEV-30789 Add Georgian error messages and locale
#
SET lc_messages=ka_GE;
SELECT x;
ERROR 42S22: უცნობი სვეტი 'x' 'SELECT'-ში
SET lc_messages=DEFAULT;
#
# Add Swahili error messages and locale
#
SET lc_messages=sw_KE;
SELECT x;
ERROR 42S22: Safu wima isiyojulikana 'x' katika 'SELECT'
SET lc_messages=DEFAULT;
#
# MDEV-30997 SIGSEGV in __strlen_avx2 | make_date_time | Item_func_date_format::val_str
#
SET lc_messages=en_US;
SET lc_time_names=111;
SELECT DATE_FORMAT('1-12-01','%c %b %M');
DATE_FORMAT('1-12-01','%c %b %M')
12 დეკ დეკემბერი
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12);
SELECT d, DATE_FORMAT(d, '%b') AS MONTH_ABBR, MONTHNAME(d) FROM
(
SELECT CAST(CONCAT('2001-', i, '-01') AS DATE) AS d FROM t1
) d1 ORDER BY d;
d MONTH_ABBR MONTHNAME(d)
2001-01-01 იან იანვარი
2001-02-01 თებ თებერვალი
2001-03-01 მარ მარტი
2001-04-01 აპრ აპრილი
2001-05-01 მაი მაისი
2001-06-01 ივნ ივნისი
2001-07-01 ივლ ივლისი
2001-08-01 აგვ აგვისტო
2001-09-01 სექტ სექტემბერი
2001-10-01 ოქტ ოქტომბერი
2001-11-01 ნოე ნოემბერი
2001-12-01 დეკ დეკემბერი
SELECT d, WEEKDAY(d), DATE_FORMAT(d, '%a') AS DAY_ABBR, DAYNAME(d) FROM
(
SELECT CAST(CONCAT('2001-01-', i) AS DATE) AS d FROM t1 WHERE i BETWEEN 1 AND 7
) d1 ORDER BY d;
d WEEKDAY(d) DAY_ABBR DAYNAME(d)
2001-01-01 0 ორშ ორშაბათი
2001-01-02 1 სამშ სამშაბათი
2001-01-03 2 ოთხშ ოთხშაბათი
2001-01-04 3 ხუთშ ხუთშაბათი
2001-01-05 4 პარ პარასკევი
2001-01-06 5 შაბ შაბათი
2001-01-07 6 კვ კვირა
DROP TABLE t1;
SET lc_time_names=DEFAULT;
SET lc_messages=DEFAULT;
#
# End of 10.11 tests
#