summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/federated.inc1
-rw-r--r--mysql-test/include/have_archive.inc2
-rw-r--r--mysql-test/include/have_blackhole.inc2
-rw-r--r--mysql-test/include/have_csv.inc2
-rw-r--r--mysql-test/include/have_exampledb.inc2
-rw-r--r--mysql-test/include/have_federated_db.inc2
-rw-r--r--mysql-test/include/have_innodb.inc2
-rw-r--r--mysql-test/include/have_multi_ndb.inc4
-rw-r--r--mysql-test/include/have_ndb.inc2
-rw-r--r--mysql-test/include/mix1.inc31
-rw-r--r--mysql-test/include/rpl_events.inc3
-rw-r--r--mysql-test/include/unsafe_binlog.inc22
-rw-r--r--mysql-test/include/wait_for_slave_io_to_stop.inc4
-rw-r--r--mysql-test/include/wait_for_slave_param.inc26
14 files changed, 84 insertions, 21 deletions
diff --git a/mysql-test/include/federated.inc b/mysql-test/include/federated.inc
index dde24cd8198..925ecdd9682 100644
--- a/mysql-test/include/federated.inc
+++ b/mysql-test/include/federated.inc
@@ -1,3 +1,4 @@
+--source include/have_log_bin.inc
--source include/not_embedded.inc
--source ./include/have_federated_db.inc
diff --git a/mysql-test/include/have_archive.inc b/mysql-test/include/have_archive.inc
index 9f0038db97a..82399ca4c6c 100644
--- a/mysql-test/include/have_archive.inc
+++ b/mysql-test/include/have_archive.inc
@@ -1,4 +1,4 @@
--disable_query_log
--require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'archive';
+select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'archive';
--enable_query_log
diff --git a/mysql-test/include/have_blackhole.inc b/mysql-test/include/have_blackhole.inc
index e13cff52094..6c4da01d61d 100644
--- a/mysql-test/include/have_blackhole.inc
+++ b/mysql-test/include/have_blackhole.inc
@@ -1,4 +1,4 @@
disable_query_log;
--require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'blackhole';
+select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'blackhole';
enable_query_log;
diff --git a/mysql-test/include/have_csv.inc b/mysql-test/include/have_csv.inc
index 3175fc16fe7..410caa95285 100644
--- a/mysql-test/include/have_csv.inc
+++ b/mysql-test/include/have_csv.inc
@@ -1,4 +1,4 @@
disable_query_log;
--require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'csv';
+select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'csv';
enable_query_log;
diff --git a/mysql-test/include/have_exampledb.inc b/mysql-test/include/have_exampledb.inc
index e3fd068b485..db3985e3c7c 100644
--- a/mysql-test/include/have_exampledb.inc
+++ b/mysql-test/include/have_exampledb.inc
@@ -1,4 +1,4 @@
disable_query_log;
--require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'example';
+select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'example';
enable_query_log;
diff --git a/mysql-test/include/have_federated_db.inc b/mysql-test/include/have_federated_db.inc
index abef5a64d30..041a29f460b 100644
--- a/mysql-test/include/have_federated_db.inc
+++ b/mysql-test/include/have_federated_db.inc
@@ -1,4 +1,4 @@
disable_query_log;
--require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'federated';
+select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'federated';
enable_query_log;
diff --git a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc
index be8850725e5..cbffe6a2574 100644
--- a/mysql-test/include/have_innodb.inc
+++ b/mysql-test/include/have_innodb.inc
@@ -1,4 +1,4 @@
disable_query_log;
--require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'innodb';
+select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'innodb';
enable_query_log;
diff --git a/mysql-test/include/have_multi_ndb.inc b/mysql-test/include/have_multi_ndb.inc
index 819518b2674..e9baf7d56e5 100644
--- a/mysql-test/include/have_multi_ndb.inc
+++ b/mysql-test/include/have_multi_ndb.inc
@@ -10,7 +10,7 @@ drop table if exists t1, t2;
--enable_warnings
flush tables;
--require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
+select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster';
enable_query_log;
# Check that server2 has NDB support
@@ -21,7 +21,7 @@ drop table if exists t1, t2;
--enable_warnings
flush tables;
--require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
+select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster';
enable_query_log;
# Check should be here as well...
diff --git a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc
index c9603634508..638a88f3956 100644
--- a/mysql-test/include/have_ndb.inc
+++ b/mysql-test/include/have_ndb.inc
@@ -1,7 +1,7 @@
# Check that server is compiled and started with support for NDB
disable_query_log;
--require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
+select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster';
enable_query_log;
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index 98323e44e97..cc2f0e0588e 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -641,6 +641,37 @@ alter table t1 comment '123';
show create table t1;
drop table t1;
+#
+# Bug #25866: Getting "#HY000 Can't find record in..." on and INSERT
+#
+CREATE TABLE t1 (a CHAR(2), KEY (a)) ENGINE = InnoDB DEFAULT CHARSET=UTF8;
+INSERT INTO t1 VALUES ('uk'),('bg');
+SELECT * FROM t1 WHERE a = 'uk';
+DELETE FROM t1 WHERE a = 'uk';
+SELECT * FROM t1 WHERE a = 'uk';
+UPDATE t1 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t1 WHERE a = 'uk';
+
+CREATE TABLE t2 (a CHAR(2), KEY (a)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES ('uk'),('bg');
+SELECT * FROM t2 WHERE a = 'uk';
+DELETE FROM t2 WHERE a = 'uk';
+SELECT * FROM t2 WHERE a = 'uk';
+INSERT INTO t2 VALUES ('uk');
+UPDATE t2 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t2 WHERE a = 'uk';
+
+CREATE TABLE t3 (a CHAR(2), KEY (a)) ENGINE = MyISAM;
+INSERT INTO t3 VALUES ('uk'),('bg');
+SELECT * FROM t3 WHERE a = 'uk';
+DELETE FROM t3 WHERE a = 'uk';
+SELECT * FROM t3 WHERE a = 'uk';
+INSERT INTO t3 VALUES ('uk');
+UPDATE t3 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t3 WHERE a = 'uk';
+
+DROP TABLE t1,t2,t3;
+
--echo End of 5.0 tests
#
diff --git a/mysql-test/include/rpl_events.inc b/mysql-test/include/rpl_events.inc
index 04885f31997..bbe52d3628b 100644
--- a/mysql-test/include/rpl_events.inc
+++ b/mysql-test/include/rpl_events.inc
@@ -29,6 +29,9 @@ SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name
# wait 3 seconds, so the event can trigger
--real_sleep 3
+let $wait_condition=
+ SELECT count(*) = 1 FROM t1 WHERE c = 'from justonce';
+--source include/wait_condition.inc
# check that table t1 contains something
--echo "in the master"
diff --git a/mysql-test/include/unsafe_binlog.inc b/mysql-test/include/unsafe_binlog.inc
index 6fbbdcb6d6c..2fc2ad77bc9 100644
--- a/mysql-test/include/unsafe_binlog.inc
+++ b/mysql-test/include/unsafe_binlog.inc
@@ -23,7 +23,7 @@
#
--disable_warnings
-drop table if exists t1,t2;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
--enable_warnings
eval create table t1 (id int not null, f_id int not null, f int not null,
primary key(f_id, id)) engine = $engine_type;
@@ -59,7 +59,7 @@ set autocommit = 0;
#
# S-lock to records (2,2),(4,2), and (6,2) should not be released in a update
#
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
select * from t1 where a = 2 and b = 2 for update;
connection a;
commit;
@@ -213,39 +213,39 @@ set autocommit = 0;
create table t10(a int not null, b int, primary key(a)) select * from t2 for update;
connection b;
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
reap;
connection c;
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
reap;
connection d;
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
reap;
connection e;
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
reap;
connection f;
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
reap;
connection g;
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
reap;
connection h;
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
reap;
connection i;
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
reap;
connection j;
---error 1205
+--error ER_LOCK_WAIT_TIMEOUT
reap;
connection a;
diff --git a/mysql-test/include/wait_for_slave_io_to_stop.inc b/mysql-test/include/wait_for_slave_io_to_stop.inc
index 87be1819227..004f8bbbd8d 100644
--- a/mysql-test/include/wait_for_slave_io_to_stop.inc
+++ b/mysql-test/include/wait_for_slave_io_to_stop.inc
@@ -6,10 +6,12 @@
#Details:
# 1) Fill in and setup variables
# 2) loop through looking for
-# IO thread to stop
+# sql threads to stop
# 3) If loops too long die.
####################################################
connection slave;
+let $my_show= SHOW SLAVE STATUS;
+let $sql_running= Slave_IO_Running;
let $row_number= 1;
let $run= 1;
let $counter= 300;
diff --git a/mysql-test/include/wait_for_slave_param.inc b/mysql-test/include/wait_for_slave_param.inc
new file mode 100644
index 00000000000..fed97195aba
--- /dev/null
+++ b/mysql-test/include/wait_for_slave_param.inc
@@ -0,0 +1,26 @@
+# include/wait_for_slave_param.inc
+#
+# SUMMARY
+#
+# Waits until SHOW SLAVE STATUS has returned a spicified value.
+#
+# USAGE
+#
+# let $slave_param= Slave_SQL_Running;
+# let $slave_param_value= No;
+# --source include/slave_wait_param.inc
+
+let $slave_wait_param_counter= 300;
+let $slave_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1);
+while (`select "$slave_value" != "$slave_param_value"`)
+{
+ dec $slave_wait_param_counter;
+ if (!$slave_wait_param_counter)
+ {
+ --echo ERROR: failed while waiting for slave parameter $slave_param: $slave_param_value
+ query_vertical show slave status;
+ exit;
+ }
+ sleep 0.1;
+ let $slave_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1);
+}