1DROP TABLE IF EXISTS t1; 2Start of 5.4 tests 3# 4# WL#4642 Greek locale for DAYNAME, MONTHNAME, DATE_FORMAT 5# 6SET NAMES utf8; 7SET @@lc_time_names=109; 8SELECT @@lc_time_names; 9@@lc_time_names 10el_GR 11CREATE TABLE t1 (a DATE); 12INSERT INTO t1 VALUES 13('2006-01-01'),('2006-01-02'),('2006-01-03'), 14('2006-01-04'),('2006-01-05'),('2006-01-06'),('2006-01-07'); 15SELECT a, date_format(a,'%a') as abday, dayname(a) as day FROM t1 ORDER BY a; 16a abday day 172006-01-01 Κυρ Κυριακή 182006-01-02 Δευ Δευτέρα 192006-01-03 Τρί Τρίτη 202006-01-04 Τετ Τετάρτη 212006-01-05 Πέμ Πέμπτη 222006-01-06 Παρ Παρασκευή 232006-01-07 Σάβ Σάββατο 24DROP TABLE t1; 25CREATE TABLE t1 (a DATE); 26INSERT INTO t1 VALUES 27('2006-01-01'),('2006-02-01'),('2006-03-01'), 28('2006-04-01'),('2006-05-01'),('2006-06-01'), 29('2006-07-01'),('2006-08-01'),('2006-09-01'), 30('2006-10-01'),('2006-11-01'),('2006-12-01'); 31SELECT a, date_format(a,'%b') as abmon, monthname(a) as mon FROM t1 ORDER BY a; 32a abmon mon 332006-01-01 Ιαν Ιανουάριος 342006-02-01 Φεβ Φεβρουάριος 352006-03-01 Μάρ Μάρτιος 362006-04-01 Απρ Απρίλιος 372006-05-01 Μάι Μάιος 382006-06-01 Ιούν Ιούνιος 392006-07-01 Ιούλ Ιούλιος 402006-08-01 Αύγ Αύγουστος 412006-09-01 Σεπ Σεπτέμβριος 422006-10-01 Οκτ Οκτώβριος 432006-11-01 Νοέ Νοέμβριος 442006-12-01 Δεκ Δεκέμβριος 45SELECT format(123456.789, 3, 'el_GR'); 46format(123456.789, 3, 'el_GR') 47123456,789 48DROP TABLE t1; 49# 50# Bug#46633 Obsolete Serbian locale name 51# 52SET lc_messages=sr_YU; 53Warnings: 54Warning 1287 'sr_YU' is deprecated and will be removed in a future release. Please use sr_RS instead 55SHOW VARIABLES LIKE 'lc_messages'; 56Variable_name Value 57lc_messages sr_RS 58SET lc_messages=sr_RS; 59SHOW VARIABLES LIKE 'lc_messages'; 60Variable_name Value 61lc_messages sr_RS 62SET lc_time_names=sr_RS; 63SELECT format(123456.789, 3, 'sr_RS'); 64format(123456.789, 3, 'sr_RS') 65123456.789 66# 67# Bug#43207 wrong LC_TIME names for romanian locale 68# 69SET NAMES utf8; 70SET lc_time_names=ro_RO; 71SELECT DATE_FORMAT('2001-01-01', '%w %a %W'); 72DATE_FORMAT('2001-01-01', '%w %a %W') 731 Lu Luni 74SELECT DATE_FORMAT('2001-01-02', '%w %a %W'); 75DATE_FORMAT('2001-01-02', '%w %a %W') 762 Ma Marţi 77SELECT DATE_FORMAT('2001-01-03', '%w %a %W'); 78DATE_FORMAT('2001-01-03', '%w %a %W') 793 Mi Miercuri 80SELECT DATE_FORMAT('2001-01-04', '%w %a %W'); 81DATE_FORMAT('2001-01-04', '%w %a %W') 824 Jo Joi 83SELECT DATE_FORMAT('2001-01-05', '%w %a %W'); 84DATE_FORMAT('2001-01-05', '%w %a %W') 855 Vi Vineri 86SELECT DATE_FORMAT('2001-01-06', '%w %a %W'); 87DATE_FORMAT('2001-01-06', '%w %a %W') 886 Sâ Sâmbătă 89SELECT DATE_FORMAT('2001-01-07', '%w %a %W'); 90DATE_FORMAT('2001-01-07', '%w %a %W') 910 Du Duminică 92End of 5.4 tests 93# 94# Start of 5.6 tests 95# 96# 97# WL#5303 Romansh locale for DAYNAME, MONTHNAME, DATE_FORMAT 98# 99SET NAMES utf8; 100SET @old_50915_lc_time_names := @@lc_time_names; 101SET lc_time_names=en_US; 102SELECT DATE_FORMAT('2001-01-01', '%w %a %W'); 103DATE_FORMAT('2001-01-01', '%w %a %W') 1041 Mon Monday 105SELECT DATE_FORMAT('2001-03-01', '%c %b %M'); 106DATE_FORMAT('2001-03-01', '%c %b %M') 1073 Mar March 108SET lc_time_names=rm_CH; 109SELECT DATE_FORMAT('2001-01-01', '%w %a %W'); 110DATE_FORMAT('2001-01-01', '%w %a %W') 1111 gli glindesdi 112SELECT DATE_FORMAT('2001-01-02', '%w %a %W'); 113DATE_FORMAT('2001-01-02', '%w %a %W') 1142 ma mardi 115SELECT DATE_FORMAT('2001-01-03', '%w %a %W'); 116DATE_FORMAT('2001-01-03', '%w %a %W') 1173 me mesemna 118SELECT DATE_FORMAT('2001-01-04', '%w %a %W'); 119DATE_FORMAT('2001-01-04', '%w %a %W') 1204 gie gievgia 121SELECT DATE_FORMAT('2001-01-05', '%w %a %W'); 122DATE_FORMAT('2001-01-05', '%w %a %W') 1235 ve venderdi 124SELECT DATE_FORMAT('2001-01-06', '%w %a %W'); 125DATE_FORMAT('2001-01-06', '%w %a %W') 1266 so sonda 127SELECT DATE_FORMAT('2001-01-07', '%w %a %W'); 128DATE_FORMAT('2001-01-07', '%w %a %W') 1290 du dumengia 130SELECT DATE_FORMAT('2001-01-01', '%c %b %M'); 131DATE_FORMAT('2001-01-01', '%c %b %M') 1321 schan schaner 133SELECT DATE_FORMAT('2001-02-01', '%c %b %M'); 134DATE_FORMAT('2001-02-01', '%c %b %M') 1352 favr favrer 136SELECT DATE_FORMAT('2001-03-01', '%c %b %M'); 137DATE_FORMAT('2001-03-01', '%c %b %M') 1383 mars mars 139SELECT DATE_FORMAT('2001-04-01', '%c %b %M'); 140DATE_FORMAT('2001-04-01', '%c %b %M') 1414 avr avrigl 142SELECT DATE_FORMAT('2001-05-01', '%c %b %M'); 143DATE_FORMAT('2001-05-01', '%c %b %M') 1445 matg matg 145SELECT DATE_FORMAT('2001-06-01', '%c %b %M'); 146DATE_FORMAT('2001-06-01', '%c %b %M') 1476 zercl zercladur 148SELECT DATE_FORMAT('2001-07-01', '%c %b %M'); 149DATE_FORMAT('2001-07-01', '%c %b %M') 1507 fan fanadur 151SELECT DATE_FORMAT('2001-08-01', '%c %b %M'); 152DATE_FORMAT('2001-08-01', '%c %b %M') 1538 avust avust 154SELECT DATE_FORMAT('2001-09-01', '%c %b %M'); 155DATE_FORMAT('2001-09-01', '%c %b %M') 1569 sett settember 157SELECT DATE_FORMAT('2001-10-01', '%c %b %M'); 158DATE_FORMAT('2001-10-01', '%c %b %M') 15910 oct october 160SELECT DATE_FORMAT('2001-11-01', '%c %b %M'); 161DATE_FORMAT('2001-11-01', '%c %b %M') 16211 nov november 163SELECT DATE_FORMAT('2001-12-01', '%c %b %M'); 164DATE_FORMAT('2001-12-01', '%c %b %M') 16512 dec december 166SET lc_time_names=de_CH; 167SELECT DATE_FORMAT('2001-01-06', '%w %a %W'); 168DATE_FORMAT('2001-01-06', '%w %a %W') 1696 Sa Samstag 170SELECT DATE_FORMAT('2001-09-01', '%c %b %M'); 171DATE_FORMAT('2001-09-01', '%c %b %M') 1729 Sep September 173SELECT DATE_FORMAT('2010-03-23 11:00:00','%h %p'); 174DATE_FORMAT('2010-03-23 11:00:00','%h %p') 17511 AM 176SELECT DATE_FORMAT('2010-03-23 13:00:00','%h %p'); 177DATE_FORMAT('2010-03-23 13:00:00','%h %p') 17801 PM 179SELECT format(123456789,2,'rm_CH'); 180format(123456789,2,'rm_CH') 181123'456'789,00 182SET lc_messages=rm_CH; 183SELECT * FROM non_existent; 184ERROR 42S02: Table 'test.non_existent' doesn't exist 185SET lc_time_names=@old_50915_lc_time_names; 186# 187# End of 5.6 tests 188# 189