diff options
author | unknown <lars/lthalmann@mysql.com/dl145j.mysql.com> | 2007-03-31 00:15:20 +0200 |
---|---|---|
committer | unknown <lars/lthalmann@mysql.com/dl145j.mysql.com> | 2007-03-31 00:15:20 +0200 |
commit | f47c23288a1cf6b5b43363542de72276eaf6a923 (patch) | |
tree | 44c65e78263fa346e74dd5a121df765f6e7dccc7 /mysql-test/t | |
parent | fe8c67effa5b11ccb7ed668c6cfcec39f756281d (diff) | |
parent | 905bc913fd9dc99640764e635dc82d67be46474a (diff) | |
download | mariadb-git-f47c23288a1cf6b5b43363542de72276eaf6a923.tar.gz |
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
sql/mysqld.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/ctype_uca.test | 10 | ||||
-rw-r--r-- | mysql-test/t/ctype_ucs.test | 14 | ||||
-rw-r--r-- | mysql-test/t/ctype_utf8.test | 8 | ||||
-rw-r--r-- | mysql-test/t/rpl_misc_functions.test | 70 |
4 files changed, 100 insertions, 2 deletions
diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test index 3e49b9de883..64349bc40a6 100644 --- a/mysql-test/t/ctype_uca.test +++ b/mysql-test/t/ctype_uca.test @@ -475,3 +475,13 @@ ALTER TABLE t1 MODIFY a VARCHAR(30) character set utf8 collate utf8_turkish_ci; SELECT a, length(a) la, @l:=lower(a) l, length(@l) ll, @u:=upper(a) u, length(@u) lu FROM t1 ORDER BY id; DROP TABLE t1; + +# +# Bug #27079 Crash while grouping empty ucs2 strings +# +CREATE TABLE t1 ( + c1 text character set ucs2 collate ucs2_polish_ci NOT NULL +) ENGINE=MyISAM; +insert into t1 values (''),('a'); +SELECT COUNT(*), c1 FROM t1 GROUP BY c1; +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index 5a3720dc431..c3320159c41 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -573,6 +573,20 @@ drop table t1; deallocate prepare stmt; # +# Bug#22638 SOUNDEX broken for international characters +# +set names latin1; +set character_set_connection=ucs2; +select soundex(''),soundex('he'),soundex('hello all folks'),soundex('#3556 in bugdb'); +select hex(soundex('')),hex(soundex('he')),hex(soundex('hello all folks')),hex(soundex('#3556 in bugdb')); +select 'mood' sounds like 'mud'; +# Cyrillic A, BE, VE +select hex(soundex(_ucs2 0x041004110412)); +# Make sure that "U+00BF INVERTED QUESTION MARK" is not considered as letter +select hex(soundex(_ucs2 0x00BF00C0)); +set names latin1; + +# # Bug #14290: character_maximum_length for text fields # create table t1(a blob, b text charset utf8, c text charset ucs2); diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 04b7ec78842..79b73fc7880 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -702,6 +702,14 @@ select * from t1 where soundex(a) = soundex('TEST'); select * from t1 where soundex(a) = soundex('test'); drop table t1; +# +# Bug#22638 SOUNDEX broken for international characters +# +select soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB); +select hex(soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)); +select soundex(_utf8 0xD091D092D093); +select hex(soundex(_utf8 0xD091D092D093)); + SET collation_connection='utf8_general_ci'; -- source include/ctype_filesort.inc diff --git a/mysql-test/t/rpl_misc_functions.test b/mysql-test/t/rpl_misc_functions.test index 6e0bda90503..f00beff583a 100644 --- a/mysql-test/t/rpl_misc_functions.test +++ b/mysql-test/t/rpl_misc_functions.test @@ -28,10 +28,76 @@ create table t2 like t1; eval load data local infile '$MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2; # compare them with the replica; the SELECT below should return no row select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); -stop slave; -drop table t1; connection master; drop table t1; # End of 4.1 tests + +# +# BUG#25543 test calling rand() multiple times on the master in +# a stored procedure. +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (col_a double default NULL); + +DELIMITER |; + +# Use a SP that calls rand() multiple times +CREATE PROCEDURE test_replication_sp1() +BEGIN + INSERT INTO t1 VALUES (rand()), (rand()); + INSERT INTO t1 VALUES (rand()); +END| + +# Use a SP that calls another SP to call rand() multiple times +CREATE PROCEDURE test_replication_sp2() +BEGIN + CALL test_replication_sp1(); + CALL test_replication_sp1(); +END| + +# Use a SF that calls rand() multiple times +CREATE FUNCTION test_replication_sf() RETURNS DOUBLE DETERMINISTIC +BEGIN + RETURN (rand() + rand()); +END| + +DELIMITER ;| + +# Exercise the functions and procedures then compare the results on +# the master to those on the slave. +CALL test_replication_sp1(); +CALL test_replication_sp2(); +INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 VALUES (test_replication_sf()); + +# Record the results of the query on the master +--exec $MYSQL --port=$MASTER_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql + +--sync_slave_with_master + +# Record the results of the query on the slave +--exec $MYSQL --port=$SLAVE_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql + +# Compare the results from the master to the slave. +--exec diff $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql + +# Cleanup +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test_replication_sp1; +DROP PROCEDURE IF EXISTS test_replication_sp2; +DROP FUNCTION IF EXISTS test_replication_sf; +DROP TABLE IF EXISTS t1; +--enable_warnings +--sync_slave_with_master + +# If all is good, when can cleanup our dump files. +--system rm $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql +--system rm $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql |