summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/ctype_filesort.inc15
-rw-r--r--mysql-test/r/ctype_big5.result21
-rw-r--r--mysql-test/r/ctype_latin1.result20
-rw-r--r--mysql-test/r/ctype_latin1_de.result9
-rw-r--r--mysql-test/r/ctype_sjis.result20
-rw-r--r--mysql-test/r/ctype_tis620.result20
-rw-r--r--mysql-test/r/ctype_uca.result10
-rw-r--r--mysql-test/r/ctype_ucs.result21
-rw-r--r--mysql-test/r/ctype_ujis.result20
-rw-r--r--mysql-test/r/ctype_utf8.result24
-rw-r--r--mysql-test/r/func_gconcat.result5
-rw-r--r--mysql-test/r/func_sapdb.result7
-rw-r--r--mysql-test/r/show_check.result70
-rw-r--r--mysql-test/r/type_float.result15
-rw-r--r--mysql-test/r/type_float.result.es15
-rw-r--r--mysql-test/r/type_timestamp.result10
-rw-r--r--mysql-test/t/ctype_big5.test6
-rw-r--r--mysql-test/t/ctype_latin1.test6
-rw-r--r--mysql-test/t/ctype_latin1_de.test2
-rw-r--r--mysql-test/t/ctype_sjis.test6
-rw-r--r--mysql-test/t/ctype_tis620.test6
-rw-r--r--mysql-test/t/ctype_uca.test3
-rw-r--r--mysql-test/t/ctype_ucs.test6
-rw-r--r--mysql-test/t/ctype_ujis.test6
-rw-r--r--mysql-test/t/ctype_utf8.test6
-rw-r--r--mysql-test/t/func_gconcat.test7
-rw-r--r--mysql-test/t/func_sapdb.test1
-rw-r--r--mysql-test/t/show_check.test32
-rw-r--r--mysql-test/t/type_float.test10
-rw-r--r--mysql-test/t/type_timestamp.test12
30 files changed, 407 insertions, 4 deletions
diff --git a/mysql-test/include/ctype_filesort.inc b/mysql-test/include/ctype_filesort.inc
new file mode 100644
index 00000000000..2068463d4e2
--- /dev/null
+++ b/mysql-test/include/ctype_filesort.inc
@@ -0,0 +1,15 @@
+#
+# Set desired charset_connection and collation_collation
+# before including this file.
+#
+
+# The next query creates a LONGTEXT column
+# using the current character_set_connection
+# and collation_connection.
+
+create table t1 select repeat('a',4000) a;
+delete from t1;
+
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+drop table t1;
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
index 9b9fcbccbe0..8f4ee3d0558 100644
--- a/mysql-test/r/ctype_big5.result
+++ b/mysql-test/r/ctype_big5.result
@@ -56,3 +56,24 @@ DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
SET collation_server= @safe_collation_server;
+SET NAMES big5;
+SET collation_connection='big5_chinese_ci';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+big5_chinese_ci 6109
+big5_chinese_ci 61
+big5_chinese_ci 6120
+drop table t1;
+SET collation_connection='big5_bin';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+big5_bin 6109
+big5_bin 61
+big5_bin 6120
+drop table t1;
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index 355f53b63a5..cd804939a75 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -305,3 +305,23 @@ select 'a' regexp 'A' collate latin1_general_cs;
select 'a' regexp 'A' collate latin1_bin;
'a' regexp 'A' collate latin1_bin
0
+SET collation_connection='latin1_swedish_ci';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+latin1_swedish_ci 6109
+latin1_swedish_ci 61
+latin1_swedish_ci 6120
+drop table t1;
+SET collation_connection='latin1_bin';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+latin1_bin 6109
+latin1_bin 61
+latin1_bin 6120
+drop table t1;
diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result
index f890250e0a3..f9deca3a771 100644
--- a/mysql-test/r/ctype_latin1_de.result
+++ b/mysql-test/r/ctype_latin1_de.result
@@ -317,3 +317,12 @@ FIELD('ue',s1) FIELD('Ü',s1) s1='ue' s1='Ü'
1 1 1 1
1 1 1 1
DROP TABLE t1;
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+latin1_german2_ci 6109
+latin1_german2_ci 61
+latin1_german2_ci 6120
+drop table t1;
diff --git a/mysql-test/r/ctype_sjis.result b/mysql-test/r/ctype_sjis.result
index 944fa0602a9..1f414f89e20 100644
--- a/mysql-test/r/ctype_sjis.result
+++ b/mysql-test/r/ctype_sjis.result
@@ -71,3 +71,23 @@ B1
B2
B3
drop table t1;
+SET collation_connection='sjis_japanese_ci';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+sjis_japanese_ci 6109
+sjis_japanese_ci 61
+sjis_japanese_ci 6120
+drop table t1;
+SET collation_connection='sjis_bin';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+sjis_bin 6109
+sjis_bin 61
+sjis_bin 6120
+drop table t1;
diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result
index 0f29c564fa8..5734f7cac86 100644
--- a/mysql-test/r/ctype_tis620.result
+++ b/mysql-test/r/ctype_tis620.result
@@ -2937,3 +2937,23 @@ Screensaver 2 2002-01-22 491 0 519 0 0
3 http://www.siamzone.com/download/download/000003-jasonx2(800x600).jpg Jaso
n X Wallpapers 1 2002-05-31 579 0 1091 0 0
DROP TABLE t1;
+SET collation_connection='tis620_thai_ci';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+tis620_thai_ci 6109
+tis620_thai_ci 61
+tis620_thai_ci 6120
+drop table t1;
+SET collation_connection='tis620_bin';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+tis620_bin 6109
+tis620_bin 61
+tis620_bin 6120
+drop table t1;
diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result
index 0573092e39b..dd5a7ebf6a4 100644
--- a/mysql-test/r/ctype_uca.result
+++ b/mysql-test/r/ctype_uca.result
@@ -2386,3 +2386,13 @@ a 1
b 0
c 0
drop table t1;
+SET collation_connection='utf8_unicode_ci';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+utf8_unicode_ci 6109
+utf8_unicode_ci 61
+utf8_unicode_ci 6120
+drop table t1;
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 891786961b1..175a02b63f1 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -602,3 +602,24 @@ a NULL
b NULL
c NULL
drop table t1;
+SET collation_connection='ucs2_general_ci';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+ucs2_general_ci 00610009
+ucs2_general_ci 0061
+ucs2_general_ci 00610020
+drop table t1;
+SET NAMES latin1;
+SET collation_connection='ucs2_bin';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+ucs2_bin 00610009
+ucs2_bin 0061
+ucs2_bin 00610020
+drop table t1;
diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result
index 263da67e16b..a00e68b596e 100644
--- a/mysql-test/r/ctype_ujis.result
+++ b/mysql-test/r/ctype_ujis.result
@@ -2207,3 +2207,23 @@ F4FC
F4FD
F4FE
DROP TABLE t1;
+SET collation_connection='ujis_japanese_ci';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+ujis_japanese_ci 6109
+ujis_japanese_ci 61
+ujis_japanese_ci 6120
+drop table t1;
+SET collation_connection='ujis_bin';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+ujis_bin 6109
+ujis_bin 61
+ujis_bin 6120
+drop table t1;
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index c7d1d94e208..719d125ae64 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -412,7 +412,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 default NULL,
- UNIQUE KEY `a` (`c`(1))
+ UNIQUE KEY `a` TYPE HASH (`c`(1))
) ENGINE=HEAP DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
@@ -570,7 +570,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 collate utf8_bin default NULL,
- UNIQUE KEY `a` (`c`(1))
+ UNIQUE KEY `a` TYPE HASH (`c`(1))
) ENGINE=HEAP DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
@@ -829,3 +829,23 @@ select * from t1 where soundex(a) = soundex('test');
id a
1 Test
drop table t1;
+SET collation_connection='utf8_general_ci';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+utf8_general_ci 6109
+utf8_general_ci 61
+utf8_general_ci 6120
+drop table t1;
+SET collation_connection='utf8_bin';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a) hex(a)
+utf8_bin 6109
+utf8_bin 61
+utf8_bin 6120
+drop table t1;
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index dfaf5758699..272f6f592b1 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -464,3 +464,8 @@ group_concat(a)
ABW
ABW
drop table t1;
+CREATE TABLE t1 (id int);
+SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
+gc
+NULL
+DROP TABLE t1;
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
index f80b0281dd8..6556d2be6ad 100644
--- a/mysql-test/r/func_sapdb.result
+++ b/mysql-test/r/func_sapdb.result
@@ -107,13 +107,16 @@ timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002")
46:58:57.999999
select timediff("1997-12-30 23:59:59.000001","1997-12-31 23:59:59.000002");
timediff("1997-12-30 23:59:59.000001","1997-12-31 23:59:59.000002")
--23:59:59.999999
+-24:00:00.000001
select timediff("1997-12-31 23:59:59.000001","23:59:59.000001");
timediff("1997-12-31 23:59:59.000001","23:59:59.000001")
NULL
select timediff("2000:01:01 00:00:00", "2000:01:01 00:00:00.000001");
timediff("2000:01:01 00:00:00", "2000:01:01 00:00:00.000001")
-00:00:00.000001
+select timediff("2005-01-11 15:48:49.999999", "2005-01-11 15:48:50");
+timediff("2005-01-11 15:48:49.999999", "2005-01-11 15:48:50")
+-00:00:00.000001
select maketime(10,11,12);
maketime(10,11,12)
10:11:12
@@ -185,7 +188,7 @@ f8 date YES NULL
f9 time YES NULL
select * from t1;
f1 f2 f3 f4 f5 f6 f7 f8 f9
-1997-01-01 1998-01-02 01:01:00 49:01:01 46:58:57 -23:59:59 10:11:12 2001-12-01 01:01:01 1997-12-31 23:59:59
+1997-01-01 1998-01-02 01:01:00 49:01:01 46:58:57 -24:00:00 10:11:12 2001-12-01 01:01:01 1997-12-31 23:59:59
create table test(t1 datetime, t2 time, t3 time, t4 datetime);
insert into test values
('2001-01-01 01:01:01', '01:01:01', null, '2001-02-01 01:01:01'),
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 6efb1c4b995..ef5b692fb2c 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -406,3 +406,73 @@ where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
delete from mysql.db
where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
flush privileges;
+CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL,
+ KEY `i` (`i`)
+) ENGINE=HEAP DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL,
+ KEY `i` TYPE HASH (`i`)
+) ENGINE=HEAP DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL,
+ KEY `i` TYPE BTREE (`i`)
+) ENGINE=HEAP DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL,
+ KEY `i` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL,
+ KEY `i` TYPE BTREE (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL,
+ KEY `i` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE t1 ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL,
+ KEY `i` (`i`)
+) ENGINE=HEAP DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL,
+ KEY `i` TYPE BTREE (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE t1 ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL,
+ KEY `i` TYPE BTREE (`i`)
+) ENGINE=HEAP DEFAULT CHARSET=latin1
+DROP TABLE t1;
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 26cfbdeffd0..cc42c506abe 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -182,3 +182,18 @@ f
9.999
9.999
drop table if exists t1;
+create table t1 (c char(20));
+insert into t1 values (5e-28);
+select * from t1;
+c
+5e-28
+drop table t1;
+create table t1 (c char(6));
+insert into t1 values (2e5),(2e6),(2e-4),(2e-5);
+select * from t1;
+c
+200000
+2e+06
+0.0002
+2e-05
+drop table t1;
diff --git a/mysql-test/r/type_float.result.es b/mysql-test/r/type_float.result.es
index d1c72a2ee53..2751e6cb33b 100644
--- a/mysql-test/r/type_float.result.es
+++ b/mysql-test/r/type_float.result.es
@@ -179,3 +179,18 @@ f
9.999
9.999
drop table if exists t1;
+create table t1 (c char(20));
+insert into t1 values (5e-28);
+select * from t1;
+c
+5e-28
+drop table t1;
+create table t1 (c char(6));
+insert into t1 values (2e5),(2e6),(2e-4),(2e-5);
+select * from t1;
+c
+200000
+2e+06
+0.0002
+2e-05
+drop table t1;
diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result
index 61c167c6264..1e0b5deaf25 100644
--- a/mysql-test/r/type_timestamp.result
+++ b/mysql-test/r/type_timestamp.result
@@ -426,3 +426,13 @@ max(t)
2004-01-01 01:00:00
2004-02-01 00:00:00
drop table t1;
+set sql_mode='maxdb';
+create table t1 (a timestamp, b timestamp(19));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE "t1" (
+ "a" datetime default NULL,
+ "b" datetime default NULL
+)
+set sql_mode='';
+drop table t1;
diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test
index b1d71a6af15..8b75123ca32 100644
--- a/mysql-test/t/ctype_big5.test
+++ b/mysql-test/t/ctype_big5.test
@@ -10,3 +10,9 @@ drop table if exists t1;
SET @test_character_set= 'big5';
SET @test_collation= 'big5_chinese_ci';
-- source include/ctype_common.inc
+
+SET NAMES big5;
+SET collation_connection='big5_chinese_ci';
+-- source include/ctype_filesort.inc
+SET collation_connection='big5_bin';
+-- source include/ctype_filesort.inc
diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test
index 677acd9faa9..cee0324d12f 100644
--- a/mysql-test/t/ctype_latin1.test
+++ b/mysql-test/t/ctype_latin1.test
@@ -60,3 +60,9 @@ DROP TABLE t1;
select 'a' regexp 'A' collate latin1_general_ci;
select 'a' regexp 'A' collate latin1_general_cs;
select 'a' regexp 'A' collate latin1_bin;
+
+
+SET collation_connection='latin1_swedish_ci';
+-- source include/ctype_filesort.inc
+SET collation_connection='latin1_bin';
+-- source include/ctype_filesort.inc
diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test
index 1c9576c1c56..ce4fdc4e3c9 100644
--- a/mysql-test/t/ctype_latin1_de.test
+++ b/mysql-test/t/ctype_latin1_de.test
@@ -114,3 +114,5 @@ SELECT s1,COUNT(*) FROM t1 GROUP BY s1;
SELECT COUNT(DISTINCT s1) FROM t1;
SELECT FIELD('ue',s1), FIELD('Ü',s1), s1='ue', s1='Ü' FROM t1;
DROP TABLE t1;
+
+-- source include/ctype_filesort.inc
diff --git a/mysql-test/t/ctype_sjis.test b/mysql-test/t/ctype_sjis.test
index a3a44789975..58ca3c6a997 100644
--- a/mysql-test/t/ctype_sjis.test
+++ b/mysql-test/t/ctype_sjis.test
@@ -62,3 +62,9 @@ CREATE TABLE t1 (
insert into t1 values(0xb1),(0xb2),(0xb3);
select hex(c) from t1;
drop table t1;
+
+
+SET collation_connection='sjis_japanese_ci';
+-- source include/ctype_filesort.inc
+SET collation_connection='sjis_bin';
+-- source include/ctype_filesort.inc
diff --git a/mysql-test/t/ctype_tis620.test b/mysql-test/t/ctype_tis620.test
index 21ec314dca7..87047db9b54 100644
--- a/mysql-test/t/ctype_tis620.test
+++ b/mysql-test/t/ctype_tis620.test
@@ -151,3 +151,9 @@ INSERT INTO t1 VALUES
n X Wallpapers',1,'','2002-05-31','',579,0,'',1091,0,0,'');
select * from t1 order by id;
DROP TABLE t1;
+
+
+SET collation_connection='tis620_thai_ci';
+-- source include/ctype_filesort.inc
+SET collation_connection='tis620_bin';
+-- source include/ctype_filesort.inc
diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test
index 8bca2a4b3c2..dfca82fa70a 100644
--- a/mysql-test/t/ctype_uca.test
+++ b/mysql-test/t/ctype_uca.test
@@ -452,3 +452,6 @@ create table t1 (a varchar(1)) character set utf8 collate utf8_estonian_ci;
insert into t1 values ('A'),('B'),('C'),('a'),('b'),('c');
select a, a regexp '[a]' from t1 order by binary a;
drop table t1;
+
+SET collation_connection='utf8_unicode_ci';
+-- source include/ctype_filesort.inc
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index 506c47ae55a..4780f51ebaa 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -386,3 +386,9 @@ alter table t1 add b char(1);
show warnings;
select * from t1 order by a;
drop table t1;
+
+SET collation_connection='ucs2_general_ci';
+-- source include/ctype_filesort.inc
+SET NAMES latin1;
+SET collation_connection='ucs2_bin';
+-- source include/ctype_filesort.inc
diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test
index 3f0e9882179..407287be30a 100644
--- a/mysql-test/t/ctype_ujis.test
+++ b/mysql-test/t/ctype_ujis.test
@@ -1141,3 +1141,9 @@ INSERT INTO t1 VALUES(0xF4FD);
INSERT INTO t1 VALUES(0xF4FE);
SELECT HEX(c) FROM t1 ORDER BY BINARY c;
DROP TABLE t1;
+
+
+SET collation_connection='ujis_japanese_ci';
+-- source include/ctype_filesort.inc
+SET collation_connection='ujis_bin';
+-- source include/ctype_filesort.inc
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 214c2712665..a57db4455ab 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -675,3 +675,9 @@ select * from t1 where soundex(a) = soundex('Test');
select * from t1 where soundex(a) = soundex('TEST');
select * from t1 where soundex(a) = soundex('test');
drop table t1;
+
+
+SET collation_connection='utf8_general_ci';
+-- source include/ctype_filesort.inc
+SET collation_connection='utf8_bin';
+-- source include/ctype_filesort.inc
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index c5147dc381e..a1fac51371c 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -279,6 +279,13 @@ select group_concat(distinct b order by b) from t1 group by a;
drop table t1;
#
+# bug #7769: group_concat returning null is checked in having
+#
+CREATE TABLE t1 (id int);
+SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
+DROP TABLE t1;
+
+#
# Bug #6475
#
diff --git a/mysql-test/t/func_sapdb.test b/mysql-test/t/func_sapdb.test
index 3f547739679..cb3ab12b5fc 100644
--- a/mysql-test/t/func_sapdb.test
+++ b/mysql-test/t/func_sapdb.test
@@ -60,6 +60,7 @@ select timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002");
select timediff("1997-12-30 23:59:59.000001","1997-12-31 23:59:59.000002");
select timediff("1997-12-31 23:59:59.000001","23:59:59.000001");
select timediff("2000:01:01 00:00:00", "2000:01:01 00:00:00.000001");
+select timediff("2005-01-11 15:48:49.999999", "2005-01-11 15:48:50");
--enable_ps_protocol
select maketime(10,11,12);
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 6aafbed6b97..81e0d9f32ef 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -329,3 +329,35 @@ flush privileges;
#--replace_column 7 # 8 # 9 #
#show table status from `ä` LIKE 'ä';
#drop database `ä`;
+
+# Test that USING <keytype> is always shown in SHOW CREATE TABLE when it was
+# specified during table creation, but not otherwise. (Bug #7235)
+CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+# Test that when an index is created with the default key algorithm and
+# altered to another storage engine, it gets the default key algorithm
+# for that storage engine, but when it is specified, the specified type is
+# preserved.
+CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ENGINE=MEMORY;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test
index 913034dac0e..d49f0465dfe 100644
--- a/mysql-test/t/type_float.test
+++ b/mysql-test/t/type_float.test
@@ -104,3 +104,13 @@ create table t1 (f double(4,3));
insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
select * from t1;
drop table if exists t1;
+
+# Check conversion of floats to character field (Bug #7774)
+create table t1 (c char(20));
+insert into t1 values (5e-28);
+select * from t1;
+drop table t1;
+create table t1 (c char(6));
+insert into t1 values (2e5),(2e6),(2e-4),(2e-5);
+select * from t1;
+drop table t1;
diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test
index 0a92afeb57d..62e7510405d 100644
--- a/mysql-test/t/type_timestamp.test
+++ b/mysql-test/t/type_timestamp.test
@@ -288,3 +288,15 @@ insert into t1 values ('a', '2004-01-01 00:00:00'), ('a', '2004-01-01 01:00:00')
('b', '2004-02-01 00:00:00');
select max(t) from t1 group by a;
drop table t1;
+
+#
+# Test for bug #7418 "TIMESTAMP not always converted to DATETIME in MAXDB
+# mode". TIMESTAMP columns should be converted DATETIME columns in MAXDB
+# mode regardless of whether a display width is given.
+#
+set sql_mode='maxdb';
+create table t1 (a timestamp, b timestamp(19));
+show create table t1;
+# restore default mode
+set sql_mode='';
+drop table t1;