summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/ctype_big5.test2
-rw-r--r--mysql-test/t/ctype_cp932.test2
-rw-r--r--mysql-test/t/ctype_gbk.test2
-rw-r--r--mysql-test/t/ctype_latin1.test2
-rw-r--r--mysql-test/t/ctype_sjis.test2
-rw-r--r--mysql-test/t/ctype_tis620.test2
-rw-r--r--mysql-test/t/ctype_uca.test1
-rw-r--r--mysql-test/t/ctype_ucs.test2
-rw-r--r--mysql-test/t/ctype_ujis.test2
-rw-r--r--mysql-test/t/ctype_utf8.test2
-rw-r--r--mysql-test/t/rpl_flush_tables.test10
-rw-r--r--mysql-test/t/rpl_multi_update3.test59
-rw-r--r--mysql-test/t/rpl_openssl.test2
-rw-r--r--mysql-test/t/select.test4
-rw-r--r--mysql-test/t/subselect.test6
-rw-r--r--mysql-test/t/subselect2.test2
-rw-r--r--mysql-test/t/type_decimal.test14
-rw-r--r--mysql-test/t/type_float.test13
18 files changed, 127 insertions, 2 deletions
diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test
index 73d9f06042c..1788dce755b 100644
--- a/mysql-test/t/ctype_big5.test
+++ b/mysql-test/t/ctype_big5.test
@@ -15,9 +15,11 @@ SET NAMES big5;
SET collation_connection='big5_chinese_ci';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
SET collation_connection='big5_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
#
# Bugs#9357: TEXT columns break string with special word in BIG5 charset.
diff --git a/mysql-test/t/ctype_cp932.test b/mysql-test/t/ctype_cp932.test
index 8e6c53af095..d6c3c226140 100644
--- a/mysql-test/t/ctype_cp932.test
+++ b/mysql-test/t/ctype_cp932.test
@@ -427,8 +427,10 @@ DROP table t1;
SET collation_connection='cp932_japanese_ci';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
SET collation_connection='cp932_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
# End of 4.1 tests
diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test
index 2210891454e..5eeade96186 100644
--- a/mysql-test/t/ctype_gbk.test
+++ b/mysql-test/t/ctype_gbk.test
@@ -15,9 +15,11 @@ SET NAMES gbk;
SET collation_connection='gbk_chinese_ci';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
SET collation_connection='gbk_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
#
# Bug#11987 mysql will truncate the text when
diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test
index 1b83373da29..8953aaecaf8 100644
--- a/mysql-test/t/ctype_latin1.test
+++ b/mysql-test/t/ctype_latin1.test
@@ -64,8 +64,10 @@ select 'a' regexp 'A' collate latin1_bin;
SET collation_connection='latin1_swedish_ci';
-- source include/ctype_filesort.inc
+-- source include/ctype_like_escape.inc
SET collation_connection='latin1_bin';
-- source include/ctype_filesort.inc
+-- source include/ctype_like_escape.inc
#
# Bug#8041
diff --git a/mysql-test/t/ctype_sjis.test b/mysql-test/t/ctype_sjis.test
index 252f0a0b6c8..1d807b5e9a8 100644
--- a/mysql-test/t/ctype_sjis.test
+++ b/mysql-test/t/ctype_sjis.test
@@ -67,9 +67,11 @@ drop table t1;
SET collation_connection='sjis_japanese_ci';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
SET collation_connection='sjis_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
# Check parsing of string literals in SJIS with multibyte characters that
# have an embedded \ in them. (Bug #8303)
diff --git a/mysql-test/t/ctype_tis620.test b/mysql-test/t/ctype_tis620.test
index d649828eda3..c49540de24b 100644
--- a/mysql-test/t/ctype_tis620.test
+++ b/mysql-test/t/ctype_tis620.test
@@ -155,7 +155,9 @@ DROP TABLE t1;
SET collation_connection='tis620_thai_ci';
-- source include/ctype_filesort.inc
+-- source include/ctype_like_escape.inc
SET collation_connection='tis620_bin';
-- source include/ctype_filesort.inc
+-- source include/ctype_like_escape.inc
# End of 4.1 tests
diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test
index 9d81aa74e90..2300abca69d 100644
--- a/mysql-test/t/ctype_uca.test
+++ b/mysql-test/t/ctype_uca.test
@@ -455,5 +455,6 @@ drop table t1;
SET collation_connection='utf8_unicode_ci';
-- source include/ctype_filesort.inc
+-- source include/ctype_like_escape.inc
# End of 4.1 tests
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index 4a5c80bed6e..2c9e71ddff5 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -370,9 +370,11 @@ drop table t1;
SET collation_connection='ucs2_general_ci';
-- source include/ctype_filesort.inc
+-- source include/ctype_like_escape.inc
SET NAMES latin1;
SET collation_connection='ucs2_bin';
-- source include/ctype_filesort.inc
+-- source include/ctype_like_escape.inc
#
# Bug#10344 Some string functions fail for UCS2
diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test
index 88386500c9f..bf74371510b 100644
--- a/mysql-test/t/ctype_ujis.test
+++ b/mysql-test/t/ctype_ujis.test
@@ -1146,8 +1146,10 @@ DROP TABLE t1;
SET collation_connection='ujis_japanese_ci';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
SET collation_connection='ujis_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
+-- source include/ctype_like_escape.inc
# End of 4.1 tests
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 0cdda648899..23824a58dab 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -685,8 +685,10 @@ drop table t1;
SET collation_connection='utf8_general_ci';
-- source include/ctype_filesort.inc
+-- source include/ctype_like_escape.inc
SET collation_connection='utf8_bin';
-- source include/ctype_filesort.inc
+-- source include/ctype_like_escape.inc
#
# Bug #7874 CONCAT() gives wrong results mixing
diff --git a/mysql-test/t/rpl_flush_tables.test b/mysql-test/t/rpl_flush_tables.test
index 04158aed9e0..378fa479f09 100644
--- a/mysql-test/t/rpl_flush_tables.test
+++ b/mysql-test/t/rpl_flush_tables.test
@@ -37,4 +37,14 @@ select * from t3;
# Note that all this confusion may cause warnings 'table xx is open on rename'
# in the .err files; these are not fatal and are not reported by mysql-test-run.
+stop slave;
+connection master;
+drop table t1;
+connection slave;
+flush tables with read lock;
+start slave;
+sleep 1;
+--error 1192
+stop slave;
+
# End of 4.1 tests
diff --git a/mysql-test/t/rpl_multi_update3.test b/mysql-test/t/rpl_multi_update3.test
index 64e46882c16..36ac7a59cb3 100644
--- a/mysql-test/t/rpl_multi_update3.test
+++ b/mysql-test/t/rpl_multi_update3.test
@@ -158,4 +158,63 @@ SELECT * FROM t1;
connection master;
DROP TABLE t1, t2, t3;
+##############################################################################
+#
+# BUG#12618
+#
+# TEST: Replication of a statement containing a join in a multi-update.
+
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+
+CREATE TABLE t1 (
+ idp int(11) NOT NULL default '0',
+ idpro int(11) default NULL,
+ price decimal(19,4) default NULL,
+ PRIMARY KEY (idp)
+);
+
+CREATE TABLE t2 (
+ idpro int(11) NOT NULL default '0',
+ price decimal(19,4) default NULL,
+ nbprice int(11) default NULL,
+ PRIMARY KEY (idpro)
+);
+
+INSERT INTO t1 VALUES
+ (1,1,'3.0000'),
+ (2,2,'1.0000'),
+ (3,1,'1.0000'),
+ (4,1,'4.0000'),
+ (5,3,'2.0000'),
+ (6,2,'4.0000');
+
+INSERT INTO t2 VALUES
+ (1,'0.0000',0),
+ (2,'0.0000',0),
+ (3,'0.0000',0);
+
+# This update sets t2 to the minimal prices for each product
+update
+ t2
+ join
+ ( select idpro, min(price) as min_price, count(*) as nbr_price
+ from t1
+ where idpro>0 and price>0
+ group by idpro
+ ) as table_price
+on t2.idpro = table_price.idpro
+set t2.price = table_price.min_price,
+ t2.nbprice = table_price.nbr_price;
+
+select "-- MASTER AFTER JOIN --" as "";
+select * from t1;
+select * from t2;
+
+sync_slave_with_master;
+
+select "-- SLAVE AFTER JOIN --" as "";
+select * from t1;
+select * from t2;
+
# End of 4.1 tests
diff --git a/mysql-test/t/rpl_openssl.test b/mysql-test/t/rpl_openssl.test
index a9138d1d46a..83a3a340e6d 100644
--- a/mysql-test/t/rpl_openssl.test
+++ b/mysql-test/t/rpl_openssl.test
@@ -7,7 +7,7 @@ source include/master-slave.inc;
# creating replication user for whom ssl auth is required
# preparing playground
connection master;
-grant replication slave on *.* to replssl@'%' require ssl;
+grant replication slave on *.* to replssl@localhost require ssl;
create table t1 (t int);
save_master_pos;
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index bdadd5c536b..e6f91389d7b 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2172,6 +2172,10 @@ create table t2(f3 int);
select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,1));
select f1 from t1,t2 where f1=f2 and (f1,NULL) = ((1,1));
select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,NULL));
+insert into t1 values(1,1),(2,null);
+insert into t2 values(2);
+select * from t1,t2 where f1=f3 and (f1,f2) = (2,null);
+select * from t1,t2 where f1=f3 and (f1,f2) <=> (2,null);
drop table t1,t2;
# End of 4.1 tests
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 3d21456ee45..cbc7a3afb5f 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -1814,4 +1814,10 @@ SELECT * FROM t1
DROP TABLE t1,t2,t3;
+#
+# BUG #10308: purge log with subselect
+#
+
+purge master logs before (select adddate(current_timestamp(), interval -4 day));
+
# End of 4.1 tests
diff --git a/mysql-test/t/subselect2.test b/mysql-test/t/subselect2.test
index 839e94206d0..b21eda176b6 100644
--- a/mysql-test/t/subselect2.test
+++ b/mysql-test/t/subselect2.test
@@ -25,6 +25,8 @@ DOCID VARCHAR(32)BINARY NOT NULL
) ENGINE=InnoDB
;
+INSERT INTO t1 (DOCID) VALUES ("1"), ("2");
+
CREATE TABLE t2
(
DOCID VARCHAR(32)BINARY NOT NULL
diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test
index 1f133666910..cc5e9278b12 100644
--- a/mysql-test/t/type_decimal.test
+++ b/mysql-test/t/type_decimal.test
@@ -1,7 +1,7 @@
# bug in decimal() with negative numbers by kaido@tradenet.ee
--disable_warnings
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, t2, t3;
--enable_warnings
SET SQL_WARNINGS=1;
@@ -276,4 +276,16 @@ update t1 set b=a;
select * from t1;
drop table t1;
+#
+# Bug #13372 (decimal union)
+#
+create table t1 (d decimal(10,1));
+create table t2 (d decimal(10,9));
+insert into t1 values ("100000000.0");
+insert into t2 values ("1.23456780");
+create table t3 select * from t2 union select * from t1;
+select * from t3;
+show create table t3;
+drop table t1, t2, t3;
+
# End of 4.1 tests
diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test
index 2d4a90911a1..abaf72ea2ed 100644
--- a/mysql-test/t/type_float.test
+++ b/mysql-test/t/type_float.test
@@ -149,4 +149,17 @@ select * from t1 where reckey=109;
select * from t1 where reckey=1.09E2;
drop table t1;
+#
+# Bug #13372 (decimal union)
+#
+create table t1 (d double(10,1));
+create table t2 (d double(10,9));
+insert into t1 values ("100000000.0");
+insert into t2 values ("1.23456780");
+create table t3 select * from t2 union select * from t1;
+select * from t3;
+show create table t3;
+drop table t1, t2, t3;
+
+
# End of 4.1 tests