diff options
author | unknown <lars/lthalmann@mysql.com/dl145j.mysql.com> | 2007-01-12 12:21:44 +0100 |
---|---|---|
committer | unknown <lars/lthalmann@mysql.com/dl145j.mysql.com> | 2007-01-12 12:21:44 +0100 |
commit | 6dc02026171c61eaae4cab9998b4d928da65e5e3 (patch) | |
tree | 4c83a872ad4f2c66c270224772b8270490d964ee /mysql-test/t | |
parent | c81140f5a18602844d2419c49b326cf0fddea5e7 (diff) | |
parent | 5aa8705ab66618f386b81da38f4228b83fb8de4d (diff) | |
download | mariadb-git-6dc02026171c61eaae4cab9998b4d928da65e5e3.tar.gz |
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-4.1-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-4.1-merge
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/ctype_utf8.test | 20 | ||||
-rw-r--r-- | mysql-test/t/mysqldump.test | 15 | ||||
-rw-r--r-- | mysql-test/t/rpl_locale.test | 22 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 44 |
4 files changed, 101 insertions, 0 deletions
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index af40121852f..0b3f9ed2400 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -94,6 +94,26 @@ select * from t1; drop table t1; # +# Bug#22646 LC_TIME_NAMES: Assignment to non-UTF8 target fails +# +set names utf8; +set LC_TIME_NAMES='fr_FR'; +create table t1 (s1 char(20) character set latin1); +insert into t1 values (date_format('2004-02-02','%M')); +select hex(s1) from t1; +drop table t1; +create table t1 (s1 char(20) character set koi8r); +set LC_TIME_NAMES='ru_RU'; +insert into t1 values (date_format('2004-02-02','%M')); +insert into t1 values (date_format('2004-02-02','%b')); +insert into t1 values (date_format('2004-02-02','%W')); +insert into t1 values (date_format('2004-02-02','%a')); +select hex(s1), s1 from t1; +drop table t1; +set LC_TIME_NAMES='en_US'; + + +# # Bug #2366 Wrong utf8 behaviour when data is truncated # set names koi8r; diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index b0df2bb9db2..4a077f1ffa3 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -702,4 +702,19 @@ create table t1 (a int); --exec $MYSQL_DUMP --skip-comments --force test t1 --where='xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 2>&1 drop table t1; +# +# BUG#13926: --order-by-primary fails if PKEY contains quote character +# +CREATE TABLE `t1` ( + `a b` INT, + `c"d` INT, + `e``f` INT, + PRIMARY KEY (`a b`, `c"d`, `e``f`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +insert into t1 values (0815, 4711, 2006); + +--exec $MYSQL_DUMP --skip-comments --compatible=ansi --order-by-primary test t1 +--exec $MYSQL_DUMP --skip-comments --order-by-primary test t1 +DROP TABLE `t1`; + --echo End of 4.1 tests diff --git a/mysql-test/t/rpl_locale.test b/mysql-test/t/rpl_locale.test new file mode 100644 index 00000000000..530a3d77636 --- /dev/null +++ b/mysql-test/t/rpl_locale.test @@ -0,0 +1,22 @@ +# Replication of locale variables + +source include/master-slave.inc; + +# +# Bug#22645 LC_TIME_NAMES: Statement not replicated +# +connection master; +create table t1 (s1 char(10)); +set lc_time_names= 'de_DE'; +insert into t1 values (date_format('2001-01-01','%W')); +select * from t1; +sync_slave_with_master; +connection slave; +select * from t1; +connection master; +drop table t1; +sync_slave_with_master; + +# End of 4.1 tests + + diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 8322c0f84bd..808dc0973d4 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -397,6 +397,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; |