summaryrefslogtreecommitdiff
path: root/mysql-test/t/variables.test
diff options
context:
space:
mode:
authorbar@bar.intranet.mysql.r18.ru <>2006-12-05 16:09:27 +0400
committerbar@bar.intranet.mysql.r18.ru <>2006-12-05 16:09:27 +0400
commit293a3562775b4981ccf778d59b134211cb86eb08 (patch)
tree15b9590db38a89ab16b077137abc4073a06e2991 /mysql-test/t/variables.test
parent8f59d9917a3de76f0aef89d71c8b33c5f8846b35 (diff)
parent7c1b675e721ce3775a342dc7e812c0a1a1c06fb2 (diff)
downloadmariadb-git-293a3562775b4981ccf778d59b134211cb86eb08.tar.gz
Merge mysql.com:/usr/home/bar/mysql-5.0.b22645
into mysql.com:/usr/home/bar/mysql-5.1.b22645
Diffstat (limited to 'mysql-test/t/variables.test')
-rw-r--r--mysql-test/t/variables.test44
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 7cbc7ee153b..4f91b75ced1 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -497,6 +497,50 @@ set names latin1;
select @@have_innodb;
#
+# Tests for lc_time_names
+# Note, when adding new locales, please fix ID accordingly:
+# - to test the last ID (currently 108)
+# - and the next after the last (currently 109)
+#
+--echo *** Various tests with LC_TIME_NAMES
+--echo *** LC_TIME_NAMES: testing case insensitivity
+set @@lc_time_names='ru_ru';
+select @@lc_time_names;
+--echo *** LC_TIME_NAMES: testing with a user variable
+set @lc='JA_JP';
+set @@lc_time_names=@lc;
+select @@lc_time_names;
+--echo *** LC_TIME_NAMES: testing with string expressions
+set lc_time_names=concat('de','_','DE');
+select @@lc_time_names;
+--error 1105
+set lc_time_names=concat('de','+','DE');
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing with numeric expressions
+set @@lc_time_names=1+2;
+select @@lc_time_names;
+--error 1232
+set @@lc_time_names=1/0;
+select @@lc_time_names;
+set lc_time_names=en_US;
+--echo LC_TIME_NAMES: testing NULL and a negative number:
+--error 1231
+set lc_time_names=NULL;
+--error 1105
+set lc_time_names=-1;
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing locale with the last ID:
+set lc_time_names=108;
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing a number beyond the valid ID range:
+--error 1105
+set lc_time_names=109;
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing that 0 is en_US:
+set lc_time_names=0;
+select @@lc_time_names;
+
+#
# Bug #13334: query_prealloc_size default less than minimum
#
set @test = @@query_prealloc_size;