summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/Makefile.am3
-rw-r--r--mysql-test/r/analyze.result7
-rw-r--r--mysql-test/r/create.result79
-rw-r--r--mysql-test/r/csv.result47
-rw-r--r--mysql-test/r/fulltext.result4
-rw-r--r--mysql-test/r/handler.result18
-rw-r--r--mysql-test/r/mix_innodb_myisam_binlog.result51
-rw-r--r--mysql-test/r/myisam.result28
-rw-r--r--mysql-test/r/ndb_alter_table.result3
-rw-r--r--mysql-test/r/ndb_basic.result4
-rw-r--r--mysql-test/r/ndb_charset.result22
-rw-r--r--mysql-test/t/analyze.test9
-rw-r--r--mysql-test/t/create.test71
-rw-r--r--mysql-test/t/csv.test37
-rw-r--r--mysql-test/t/fulltext.test6
-rw-r--r--mysql-test/t/handler.test28
-rw-r--r--mysql-test/t/mix_innodb_myisam_binlog.test30
-rw-r--r--mysql-test/t/myisam.test30
-rw-r--r--mysql-test/t/ndb_alter_table.test4
-rw-r--r--mysql-test/t/ndb_basic.test8
-rw-r--r--mysql-test/t/ndb_charset.test19
21 files changed, 489 insertions, 19 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index d062ee79827..9a88aff8300 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -87,6 +87,9 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
+uninstall-local:
+ @RM@ -f -r $(DESTDIR)$(testdir)
+
std_data/client-key.pem:
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
std_data/client-cert.pem:
diff --git a/mysql-test/r/analyze.result b/mysql-test/r/analyze.result
index 0b44a502b13..796b382f5d6 100644
--- a/mysql-test/r/analyze.result
+++ b/mysql-test/r/analyze.result
@@ -30,3 +30,10 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
+CREATE TABLE t1 (a int);
+prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()";
+execute stmt1;
+Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
+execute stmt1;
+Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
+deallocate prepare stmt1;
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 55ad6e3304a..a933027cdb1 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -1,4 +1,4 @@
-drop table if exists t1,t2,t3;
+drop table if exists t1,t2,t3,t4,t5;
drop database if exists mysqltest;
create table t1 (b char(0));
insert into t1 values (""),(null);
@@ -632,3 +632,80 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+CREATE TABLE t2 (
+a int(11) default NULL
+);
+insert into t2 values(111);
+create table t1 (
+a varchar(12) charset utf8 collate utf8_bin not null,
+b int not null, primary key (a)
+) select a, 1 as b from t2 ;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(12) character set utf8 collate utf8_bin NOT NULL default '',
+ `b` int(11) NOT NULL default '0',
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (
+a varchar(12) charset utf8 collate utf8_bin not null,
+b int not null, primary key (a)
+) select 'a' as a , 1 as b from t2 ;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(12) character set utf8 collate utf8_bin NOT NULL default '',
+ `b` int(11) NOT NULL default '0',
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (
+a varchar(12) charset utf8 collate utf8_bin,
+b int not null, primary key (a)
+) select 'a' as a , 1 as b from t2 ;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(12) character set utf8 collate utf8_bin NOT NULL default '',
+ `b` int(11) NOT NULL default '0',
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1, t2;
+create table t1 (
+a1 int not null,
+a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
+);
+insert into t1 values (1,1,1, 1,1,1, 1,1,1);
+create table t2 (
+a1 varchar(12) charset utf8 collate utf8_bin not null,
+a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
+primary key (a1)
+) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
+drop table t2;
+create table t2 (
+a1 varchar(12) charset utf8 collate utf8_bin,
+a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
+) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1;
+drop table t1, t2;
+create table t1 (
+a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
+);
+insert into t1 values (1,1,1, 1,1,1, 1,1,1);
+create table t2 (
+a1 varchar(12) charset utf8 collate utf8_bin not null,
+a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
+primary key (a1)
+) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
+drop table t2;
+create table t2 ( a int default 3, b int default 3)
+select a1,a2 from t1;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) default '3',
+ `b` int(11) default '3',
+ `a1` int(11) default NULL,
+ `a2` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1, t2;
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index ea0d34271b5..2e3d11ad461 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/r/csv.result
@@ -4929,3 +4929,50 @@ Warnings:
Note 1051 Unknown table 't2'
Note 1051 Unknown table 't3'
Note 1051 Unknown table 't4'
+DROP TABLE IF EXISTS bug13894;
+CREATE TABLE bug13894 ( val integer ) ENGINE = CSV;
+INSERT INTO bug13894 VALUES (5);
+INSERT INTO bug13894 VALUES (10);
+INSERT INTO bug13894 VALUES (11);
+INSERT INTO bug13894 VALUES (10);
+SELECT * FROM bug13894;
+val
+5
+10
+11
+10
+UPDATE bug13894 SET val=6 WHERE val=10;
+SELECT * FROM bug13894;
+val
+5
+11
+6
+6
+DROP TABLE bug13894;
+DROP TABLE IF EXISTS bug14672;
+CREATE TABLE bug14672 (c1 integer) engine = CSV;
+INSERT INTO bug14672 VALUES (1), (2), (3);
+SELECT * FROM bug14672;
+c1
+1
+2
+3
+DELETE FROM bug14672 WHERE c1 = 2;
+SELECT * FROM bug14672;
+c1
+1
+3
+INSERT INTO bug14672 VALUES (4);
+SELECT * FROM bug14672;
+c1
+1
+3
+4
+INSERT INTO bug14672 VALUES (5);
+SELECT * FROM bug14672;
+c1
+1
+3
+4
+5
+DROP TABLE bug14672;
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index 8fa2df2e756..87551f96a13 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -428,4 +428,8 @@ REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
SET myisam_repair_threads=@@global.myisam_repair_threads;
+INSERT INTO t1 VALUES('testword\'\'');
+SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE);
+a
+testword''
DROP TABLE t1;
diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result
index 072d4582cbc..9b0c6dbc263 100644
--- a/mysql-test/r/handler.result
+++ b/mysql-test/r/handler.result
@@ -445,3 +445,21 @@ drop table t2;
drop table t3;
drop table t4;
drop table t5;
+create table t1 (c1 int);
+insert into t1 values (1);
+handler t1 open;
+handler t1 read first;
+c1
+1
+send the below to another connection, do not wait for the result
+ optimize table t1;
+proceed with the normal connection
+handler t1 read next;
+c1
+1
+handler t1 close;
+read the result from the other connection
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+proceed with the normal connection
+drop table t1;
diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result
index 72288d1027b..e9613bac833 100644
--- a/mysql-test/r/mix_innodb_myisam_binlog.result
+++ b/mysql-test/r/mix_innodb_myisam_binlog.result
@@ -93,6 +93,7 @@ master-bin.000001 79 Query 1 79 use `test`; BEGIN
master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(8)
master-bin.000001 178 Query 1 79 use `test`; insert into t2 select * from t1
master-bin.000001 244 Query 1 244 use `test`; ROLLBACK
+master-bin.000001 287 Query 1 287 use `test`; DO RELEASE_LOCK("a")
delete from t1;
delete from t2;
reset master;
@@ -202,3 +203,53 @@ select (@after-@before) >= 2;
(@after-@before) >= 2
1
drop table t1,t2;
+commit;
+begin;
+create temporary table ti (a int) engine=innodb;
+rollback;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+insert into ti values(1);
+set autocommit=0;
+create temporary table t1 (a int) engine=myisam;
+commit;
+insert t1 values (1);
+rollback;
+create table t0 (n int);
+insert t0 select * from t1;
+set autocommit=1;
+insert into t0 select GET_LOCK("lock1",null);
+set autocommit=0;
+create table t2 (n int) engine=innodb;
+insert into t2 values (3);
+select get_lock("lock1",60);
+get_lock("lock1",60)
+1
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.000001 79 Query 1 79 use `test`; BEGIN
+master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(16)
+master-bin.000001 179 Query 1 79 use `test`; insert into t1 values(18)
+master-bin.000001 239 Query 1 239 use `test`; COMMIT
+master-bin.000001 280 Query 1 280 use `test`; delete from t1
+master-bin.000001 329 Query 1 329 use `test`; delete from t2
+master-bin.000001 378 Query 1 378 use `test`; alter table t2 type=MyISAM
+master-bin.000001 439 Query 1 439 use `test`; insert into t1 values (1)
+master-bin.000001 499 Query 1 499 use `test`; insert into t2 values (20)
+master-bin.000001 560 Query 1 560 use `test`; drop table t1,t2
+master-bin.000001 611 Query 1 611 use `test`; BEGIN
+master-bin.000001 651 Query 1 611 use `test`; create temporary table ti (a int) engine=innodb
+master-bin.000001 733 Query 1 733 use `test`; ROLLBACK
+master-bin.000001 776 Query 1 776 use `test`; insert into ti values(1)
+master-bin.000001 835 Query 1 835 use `test`; BEGIN
+master-bin.000001 875 Query 1 835 use `test`; create temporary table t1 (a int) engine=myisam
+master-bin.000001 957 Query 1 957 use `test`; COMMIT
+master-bin.000001 998 Query 1 998 use `test`; create table t0 (n int)
+master-bin.000001 1056 Query 1 1056 use `test`; insert t0 select * from t1
+master-bin.000001 1117 Query 1 1117 use `test`; DO RELEASE_LOCK("a")
+master-bin.000001 1172 Query 1 1172 use `test`; insert into t0 select GET_LOCK("lock1",null)
+master-bin.000001 1251 Query 1 1251 use `test`; create table t2 (n int) engine=innodb
+master-bin.000001 1323 Query 1 1323 use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `test`.`t1`,`test`.`ti`
+master-bin.000001 1424 Query 1 1424 use `test`; DO RELEASE_LOCK("lock1")
+do release_lock("lock1");
+drop table t0,t2;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 17dba82dc00..d2d0417f6e6 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -498,6 +498,16 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary
1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct
drop table t1,t2;
+create table t1 (
+c1 varchar(32),
+key (c1)
+) engine=myisam;
+alter table t1 disable keys;
+insert into t1 values ('a'), ('b');
+select c1 from t1 order by c1 limit 1;
+c1
+a
+drop table t1;
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
Got one of the listed errors
create table t1 (a int, b varchar(200), c text not null) checksum=1;
@@ -702,3 +712,21 @@ t1 1 a 2 b A 0 NULL NULL YES BTREE
t1 1 a 3 c A 0 NULL NULL YES BTREE
t1 1 a 4 d A 0 NULL NULL YES BTREE
set myisam_stats_method=DEFAULT;
+drop table t1;
+create table t1(
+cip INT NOT NULL,
+time TIME NOT NULL,
+score INT NOT NULL DEFAULT 0,
+bob TINYBLOB
+);
+insert into t1 (cip, time) VALUES (1, '00:01'), (2, '00:02'), (3,'00:03');
+insert into t1 (cip, bob, time) VALUES (4, 'a', '00:04'), (5, 'b', '00:05'),
+(6, 'c', '00:06');
+select * from t1 where bob is null and cip=1;
+cip time score bob
+1 00:01:00 0 NULL
+create index bug on t1 (bob(22), cip, time);
+select * from t1 where bob is null and cip=1;
+cip time score bob
+1 00:01:00 0 NULL
+drop table t1;
diff --git a/mysql-test/r/ndb_alter_table.result b/mysql-test/r/ndb_alter_table.result
index 3714ea14e16..62e8455ae9f 100644
--- a/mysql-test/r/ndb_alter_table.result
+++ b/mysql-test/r/ndb_alter_table.result
@@ -179,8 +179,7 @@ a b c
2 two two
alter table t1 drop index c;
select * from t1 where b = 'two';
-a b c
-2 two two
+ERROR HY000: Table definition has changed, please retry transaction
select * from t1 where b = 'two';
a b c
2 two two
diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result
index 3712fa2b5ca..42b5a39d3d8 100644
--- a/mysql-test/r/ndb_basic.result
+++ b/mysql-test/r/ndb_basic.result
@@ -667,3 +667,7 @@ counter datavalue
57 newval
58 newval
drop table t1;
+CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb;
+select * from t1;
+b
+drop table t1;
diff --git a/mysql-test/r/ndb_charset.result b/mysql-test/r/ndb_charset.result
index 00bc36a7c0d..b8d881fca83 100644
--- a/mysql-test/r/ndb_charset.result
+++ b/mysql-test/r/ndb_charset.result
@@ -190,12 +190,22 @@ p a
6 AAA
drop table t1;
create table t1 (
-a varchar(10) primary key
-) engine=ndb;
-insert into t1 values ('jonas % ');
-replace into t1 values ('jonas % ');
-replace into t1 values ('jonas % ');
+a char(10) primary key
+) engine=ndbcluster default charset=latin1;
+insert into t1 values ('aaabb');
+select * from t1;
+a
+aaabb
+replace into t1 set a = 'AAABB';
+select * from t1;
+a
+AAABB
+replace into t1 set a = 'aAaBb';
+select * from t1;
+a
+aAaBb
+replace into t1 set a = 'aaabb';
select * from t1;
a
-jonas %
+aaabb
drop table t1;
diff --git a/mysql-test/t/analyze.test b/mysql-test/t/analyze.test
index 3c3b3933bc3..5d653b65579 100644
--- a/mysql-test/t/analyze.test
+++ b/mysql-test/t/analyze.test
@@ -39,4 +39,13 @@ check table t1;
drop table t1;
+#
+# procedure in PS BUG#13673
+#
+CREATE TABLE t1 (a int);
+prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()";
+execute stmt1;
+execute stmt1;
+deallocate prepare stmt1;
+
# End of 4.1 tests
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 966be8b58a3..c9d16916f8a 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -3,7 +3,7 @@
#
--disable_warnings
-drop table if exists t1,t2,t3;
+drop table if exists t1,t2,t3,t4,t5;
drop database if exists mysqltest;
--enable_warnings
@@ -534,4 +534,73 @@ create table t1 (
show create table t1;
drop table t1;
+#
+# BUG#14480: assert failure in CREATE ... SELECT because of wrong
+# calculation of number of NULLs.
+#
+CREATE TABLE t2 (
+ a int(11) default NULL
+);
+insert into t2 values(111);
+
+create table t1 (
+ a varchar(12) charset utf8 collate utf8_bin not null,
+ b int not null, primary key (a)
+) select a, 1 as b from t2 ;
+show create table t1;
+drop table t1;
+
+create table t1 (
+ a varchar(12) charset utf8 collate utf8_bin not null,
+ b int not null, primary key (a)
+) select 'a' as a , 1 as b from t2 ;
+show create table t1;
+drop table t1;
+
+create table t1 (
+ a varchar(12) charset utf8 collate utf8_bin,
+ b int not null, primary key (a)
+) select 'a' as a , 1 as b from t2 ;
+show create table t1;
+drop table t1, t2;
+
+create table t1 (
+ a1 int not null,
+ a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
+);
+insert into t1 values (1,1,1, 1,1,1, 1,1,1);
+
+create table t2 (
+ a1 varchar(12) charset utf8 collate utf8_bin not null,
+ a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
+ primary key (a1)
+) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
+drop table t2;
+
+create table t2 (
+ a1 varchar(12) charset utf8 collate utf8_bin,
+ a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
+) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1;
+
+drop table t1, t2;
+create table t1 (
+ a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
+);
+insert into t1 values (1,1,1, 1,1,1, 1,1,1);
+
+create table t2 (
+ a1 varchar(12) charset utf8 collate utf8_bin not null,
+ a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
+ primary key (a1)
+) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
+
+# Test the default value
+drop table t2;
+
+create table t2 ( a int default 3, b int default 3)
+ select a1,a2 from t1;
+show create table t2;
+
+drop table t1, t2;
+
# End of 4.1 tests
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index 2ac46d75f9a..5b693335a43 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1314,4 +1314,41 @@ select period from t1;
drop table if exists t1,t2,t3,t4;
+#
+# Bug #13894 Server crashes on update of CSV table
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS bug13894;
+--enable_warnings
+
+CREATE TABLE bug13894 ( val integer ) ENGINE = CSV;
+INSERT INTO bug13894 VALUES (5);
+INSERT INTO bug13894 VALUES (10);
+INSERT INTO bug13894 VALUES (11);
+INSERT INTO bug13894 VALUES (10);
+SELECT * FROM bug13894;
+UPDATE bug13894 SET val=6 WHERE val=10;
+SELECT * FROM bug13894;
+DROP TABLE bug13894;
+
+#
+# Bug #14672 Bug in deletion
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS bug14672;
+--enable_warnings
+
+CREATE TABLE bug14672 (c1 integer) engine = CSV;
+INSERT INTO bug14672 VALUES (1), (2), (3);
+SELECT * FROM bug14672;
+DELETE FROM bug14672 WHERE c1 = 2;
+SELECT * FROM bug14672;
+INSERT INTO bug14672 VALUES (4);
+SELECT * FROM bug14672;
+INSERT INTO bug14672 VALUES (5);
+SELECT * FROM bug14672;
+DROP TABLE bug14672;
+
# End of 4.1 tests
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index fa63778c4c1..7c7927b638b 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -348,6 +348,12 @@ INSERT INTO t1 VALUES('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
SET myisam_repair_threads=2;
REPAIR TABLE t1;
SET myisam_repair_threads=@@global.myisam_repair_threads;
+
+#
+# BUG#5686 - #1034 - Incorrect key file for table - only utf8
+#
+INSERT INTO t1 VALUES('testword\'\'');
+SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE);
DROP TABLE t1;
# End of 4.1 tests
diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test
index 1bb9b1d3504..a78800d3d5a 100644
--- a/mysql-test/t/handler.test
+++ b/mysql-test/t/handler.test
@@ -347,4 +347,32 @@ drop table t3;
drop table t4;
drop table t5;
+#
+# Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
+#
+create table t1 (c1 int);
+insert into t1 values (1);
+# client 1
+handler t1 open;
+handler t1 read first;
+# client 2
+connect (con2,localhost,root,,);
+connection con2;
+--exec echo send the below to another connection, do not wait for the result
+send optimize table t1;
+--sleep 1
+# client 1
+--exec echo proceed with the normal connection
+connection default;
+handler t1 read next;
+handler t1 close;
+# client 2
+--exec echo read the result from the other connection
+connection con2;
+reap;
+# client 1
+--exec echo proceed with the normal connection
+connection default;
+drop table t1;
+
# End of 4.1 tests
diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test
index 6eb9eae2d99..4581736ac8c 100644
--- a/mysql-test/t/mix_innodb_myisam_binlog.test
+++ b/mysql-test/t/mix_innodb_myisam_binlog.test
@@ -206,7 +206,35 @@ select (@after:=unix_timestamp())*0; # always give repeatable output
# the bug, the reap would return immediately after the insert into t2.
select (@after-@before) >= 2;
-# cleanup
drop table t1,t2;
+commit;
+
+# test for BUG#7947 - DO RELEASE_LOCK() not written to binlog on rollback in the middle
+# of a transaction
+
+connection con2;
+begin;
+create temporary table ti (a int) engine=innodb;
+rollback;
+insert into ti values(1);
+set autocommit=0;
+create temporary table t1 (a int) engine=myisam;
+commit;
+insert t1 values (1);
+rollback;
+create table t0 (n int);
+insert t0 select * from t1;
+set autocommit=1;
+insert into t0 select GET_LOCK("lock1",null);
+set autocommit=0;
+create table t2 (n int) engine=innodb;
+insert into t2 values (3);
+disconnect con2;
+connection con3;
+select get_lock("lock1",60);
+show binlog events from 79;
+do release_lock("lock1");
+drop table t0,t2;
+
# End of 4.1 tests
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index fbde658660d..ce40cae3266 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -474,6 +474,18 @@ explain select distinct t1.a from t1,t2 order by t2.a;
drop table t1,t2;
#
+# Bug#14616 - Freshly imported table returns error 124 when using LIMIT
+#
+create table t1 (
+ c1 varchar(32),
+ key (c1)
+) engine=myisam;
+alter table t1 disable keys;
+insert into t1 values ('a'), ('b');
+select c1 from t1 order by c1 limit 1;
+drop table t1;
+
+#
# Test RTREE index
#
--error 1235, 1289
@@ -656,4 +668,22 @@ analyze table t1;
show index from t1;
set myisam_stats_method=DEFAULT;
+drop table t1;
+
+# BUG#13814 - key value packed incorrectly for TINYBLOBs
+
+create table t1(
+ cip INT NOT NULL,
+ time TIME NOT NULL,
+ score INT NOT NULL DEFAULT 0,
+ bob TINYBLOB
+);
+
+insert into t1 (cip, time) VALUES (1, '00:01'), (2, '00:02'), (3,'00:03');
+insert into t1 (cip, bob, time) VALUES (4, 'a', '00:04'), (5, 'b', '00:05'),
+ (6, 'c', '00:06');
+select * from t1 where bob is null and cip=1;
+create index bug on t1 (bob(22), cip, time);
+select * from t1 where bob is null and cip=1;
+drop table t1;
# End of 4.1 tests
diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test
index 5c792f76316..d89b81859e7 100644
--- a/mysql-test/t/ndb_alter_table.test
+++ b/mysql-test/t/ndb_alter_table.test
@@ -138,6 +138,7 @@ INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0);
select c from t1 order by c;
drop table t1;
+--disable_ps_protocol
create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) )
engine=ndb;
insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three');
@@ -147,10 +148,13 @@ select * from t1 where b = 'two';
connection server1;
alter table t1 drop index c;
connection server2;
+# This should fail since index information is not automatically refreshed
+--error 1105
select * from t1 where b = 'two';
select * from t1 where b = 'two';
connection server1;
drop table t1;
+--enable_ps_protocol
#--disable_warnings
#DROP TABLE IF EXISTS t2;
diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test
index 144e466d937..c8cf5823500 100644
--- a/mysql-test/t/ndb_basic.test
+++ b/mysql-test/t/ndb_basic.test
@@ -606,4 +606,12 @@ select * from t1 order by counter;
drop table t1;
+#
+# BUG#14514 Creating table with packed key fails silently
+#
+
+CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb;
+select * from t1;
+drop table t1;
+
# End of 4.1 tests
diff --git a/mysql-test/t/ndb_charset.test b/mysql-test/t/ndb_charset.test
index 89f1ed17cfb..a885427f593 100644
--- a/mysql-test/t/ndb_charset.test
+++ b/mysql-test/t/ndb_charset.test
@@ -159,14 +159,17 @@ select * from t1 where a = 'AaA' order by p;
select * from t1 where a = 'AAA' order by p;
drop table t1;
-# bug
+# bug#14007
create table t1 (
- a varchar(10) primary key
-) engine=ndb;
-insert into t1 values ('jonas % ');
-replace into t1 values ('jonas % ');
-replace into t1 values ('jonas % ');
+ a char(10) primary key
+) engine=ndbcluster default charset=latin1;
+
+insert into t1 values ('aaabb');
+select * from t1;
+replace into t1 set a = 'AAABB';
+select * from t1;
+replace into t1 set a = 'aAaBb';
+select * from t1;
+replace into t1 set a = 'aaabb';
select * from t1;
drop table t1;
-
-# End of 4.1 tests