diff options
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/ctype_utf8.test | 20 | ||||
-rw-r--r-- | mysql-test/t/disabled.def | 1 | ||||
-rw-r--r-- | mysql-test/t/mix_innodb_myisam_binlog.test | 2 | ||||
-rw-r--r-- | mysql-test/t/mysqlbinlog.test | 24 | ||||
-rw-r--r-- | mysql-test/t/mysqldump.test | 38 | ||||
-rw-r--r-- | mysql-test/t/rpl_charset_sjis.test | 25 | ||||
-rw-r--r-- | mysql-test/t/rpl_do_grant.test | 16 | ||||
-rw-r--r-- | mysql-test/t/rpl_locale.test | 22 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 44 |
9 files changed, 172 insertions, 20 deletions
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 71259dab0c9..04b7ec78842 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/disabled.def b/mysql-test/t/disabled.def index 53b73363c22..697f77493d8 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -11,6 +11,7 @@ ############################################################################## ndb_load : Bug#17233 +rpl_locale : Bug#22645 user_limits : Bug#23921 random failure of user_limits.test flush2 : Bug#24805 Pushbuild can't handle test with --disable-log-bin diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test index 66440f1236e..c289f537d38 100644 --- a/mysql-test/t/mix_innodb_myisam_binlog.test +++ b/mysql-test/t/mix_innodb_myisam_binlog.test @@ -290,6 +290,6 @@ eval select is not null; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval select -@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%", +@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", @a not like "%#%error_code=%error_code=%"; drop table t1, t2; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 0691cb7c76b..a0cd21acec1 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -134,6 +134,30 @@ flush logs; --exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000006 | $MYSQL select * from t5 /* must be (1),(1) */; +# +# Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails +# +--disable_warnings +drop procedure if exists p1; +--enable_warnings +flush logs; +delimiter //; +create procedure p1() +begin +select 1; +end; +// +delimiter ;// +flush logs; +call p1(); +drop procedure p1; +--error 1305 +call p1(); +--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007 +--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007 | $MYSQL +call p1(); +drop procedure p1; + # clean up drop table t1, t2, t03, t04, t3, t4, t5; diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 5e604061744..ea85d7f4f55 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -713,6 +713,25 @@ create table t1 (a int); --exec $MYSQL_DUMP --skip-comments --force test t1 --where='xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 2>&1 drop table t1; +--echo # +--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character +--echo # + +--disable_warnings +DROP TABLE IF EXISTS `t1`; +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`; +--enable_warnings + --echo End of 4.1 tests --echo # @@ -1394,25 +1413,6 @@ drop database mysqldump_myDB; use test; --echo # ---echo # BUG#13926: --order-by-primary fails if PKEY contains quote character ---echo # - ---disable_warnings -DROP TABLE IF EXISTS `t1`; -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`; ---enable_warnings - ---echo # --echo # Bug #19745: mysqldump --xml produces invalid xml --echo # diff --git a/mysql-test/t/rpl_charset_sjis.test b/mysql-test/t/rpl_charset_sjis.test new file mode 100644 index 00000000000..2469b0db8a2 --- /dev/null +++ b/mysql-test/t/rpl_charset_sjis.test @@ -0,0 +1,25 @@ +source include/have_sjis.inc; +source include/master-slave.inc; + +--disable_warnings +drop table if exists t1; +drop procedure if exists p1; +--enable_warnings +create table t1 (a varchar(255) character set sjis); +create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a); + +SET NAMES binary; +CALL p1 ('–\\'); +select "--- on master ---"; +select hex(a) from t1 ; +sync_slave_with_master; +connection slave; +select "--- on slave ---"; +select hex(a) from t1; +connection master; +drop table t1; +drop procedure p1; +sync_slave_with_master; +connection master; + +# End of 5.0 tests diff --git a/mysql-test/t/rpl_do_grant.test b/mysql-test/t/rpl_do_grant.test index 54287a67657..4a9c1554630 100644 --- a/mysql-test/t/rpl_do_grant.test +++ b/mysql-test/t/rpl_do_grant.test @@ -33,6 +33,22 @@ connection slave; sync_with_master; select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant'; +# +# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES +# +connection master; +update mysql.user set password='' where user='rpl_do_grant'; +flush privileges; +select password<>'' from mysql.user where user='rpl_do_grant'; +set sql_mode='ANSI_QUOTES'; +set password for rpl_do_grant@localhost=password('does it work?'); +set sql_mode=''; +save_master_pos; +connection slave; +sync_with_master; +select password<>'' from mysql.user where user='rpl_do_grant'; + + # clear what we have done, to not influence other tests. connection master; delete from mysql.user where user=_binary'rpl_do_grant'; 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 d855b4d8266..5edb8fb754b 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -461,6 +461,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; |