Debian Codegraph @

mysql-test/suite/sys_vars/t/lc_time_names_func.test

raw
1 ###################### mysql-test\t\lc_time_names_func.test ##################
2 # #
3 # Variable Name: lc_time_names #
4 # Scope: GLOBAL | SESSION #
5 # Access Type: Dynamic #
6 # Data Type: string #
7 # Default Value: en_US #
8 # Range: NA #
9 # #
10 # #
11 # Creation Date: 2008-03-08 #
12 # Author: Rizwan #
13 # #
14 # Description: Test Cases of Dynamic System Variable lc_time_names #
15 # that checks the behavior of this variable #
16 # #
17 # Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
18 # server-system-variables.html #
19 # #
20 ###############################################################################
21
22 --echo '#--------------------FN_DYNVARS_060_01-------------------------#'
23 ######################################################################
24 # Check if setting global lc_time_names is changed in new connection #
25 ######################################################################
26
27 SET @@global.lc_time_names = "en_CA";
28 --echo 'connect (con1,localhost,root,,,,)'
29 connect (con1,localhost,root,,,,);
30 --echo 'connection con1'
31 connection con1;
32 SELECT @@global.lc_time_names;
33 SELECT @@session.lc_time_names;
34 SET @@global.lc_time_names = "en_IN";
35 --echo 'connect (con2,localhost,root,,,,)'
36 connect (con2,localhost,root,,,,);
37 --echo 'connection con2'
38 connection con2;
39 SELECT @@global.lc_time_names;
40 SELECT @@session.lc_time_names;
41 disconnect con2;
42 disconnect con1;
43
44
45 --echo '#--------------------FN_DYNVARS_060_02-------------------------#'
46 #################################################################
47 # Begin the functionality Testing of lc_time_names #
48 #################################################################
49
50 --echo 'connection default'
51 connection default;
52
53 SET NAMES 'utf8';
54
55 SET @@session.lc_time_names = 'en_US';
56 SELECT DATE_FORMAT('2010-01-01','%W %a %M %b'), DAYNAME('2010-05-05'),MONTHNAME('2010-12-12');
57
58
59 SET @@session.lc_time_names = 'ar_AE';
60 SELECT DATE_FORMAT('2010-01-01','%W %a %M %b'), DAYNAME('2010-05-05'),MONTHNAME('2010-12-12');
61
62 SET @@session.lc_time_names = 'es_ES';
63 SELECT DATE_FORMAT('2010-01-01','%W %a %M %b'), DAYNAME('2010-05-05'),MONTHNAME('2010-12-12');
64
65 SET @@session.lc_time_names = 'fi_FI';
66 SELECT DATE_FORMAT('2010-01-01','%W %a %M %b'), DAYNAME('2010-05-05'),MONTHNAME('2010-12-12');
67
68 SET @@session.lc_time_names = 'gu_IN';
69 SELECT DATE_FORMAT('2010-01-01','%W %a %M %b'), DAYNAME('2010-05-05'),MONTHNAME('2010-12-12');
70
71 SET @@session.lc_time_names = 'it_IT';
72 SELECT DATE_FORMAT('2010-01-01','%W %a %M %b'), DAYNAME('2010-05-05'),MONTHNAME('2010-12-12');
73
74 SET @@session.lc_time_names = 'pt_BR';
75 SELECT DATE_FORMAT('2010-01-01','%W %a %M %b'), DAYNAME('2010-05-05'),MONTHNAME('2010-12-12');
76
77 SET @@session.lc_time_names = 'ur_PK';
78 SELECT DATE_FORMAT('2010-01-01','%W %a %M %b'), DAYNAME('2010-05-05'),MONTHNAME('2010-12-12');
79
80
81 # restore default
82 SET @@global.lc_time_names = "en_US";
83
84 ##########################################################
85 # End of functionality Testing for lc_time_names #
86 ##########################################################
87