summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/analyze_failure_sync_with_master.test15
-rw-r--r--mysql-test/include/ctype_like_escape.inc4
-rw-r--r--mysql-test/include/mix1.inc56
-rw-r--r--mysql-test/include/mysqltest_while.inc137
-rw-r--r--mysql-test/include/sourced.inc1
-rw-r--r--mysql-test/include/sourced1.inc1
-rw-r--r--mysql-test/include/wait_for_query_to_suceed.inc25
7 files changed, 91 insertions, 148 deletions
diff --git a/mysql-test/include/analyze_failure_sync_with_master.test b/mysql-test/include/analyze_failure_sync_with_master.test
new file mode 100644
index 00000000000..e6fd32d2f46
--- /dev/null
+++ b/mysql-test/include/analyze_failure_sync_with_master.test
@@ -0,0 +1,15 @@
+# Connect to both master and slave
+connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
+
+vertical_results;
+
+echo == MASTER ===========================================================;
+connection master;
+show master status;
+show slave status;
+
+echo == SLAVE ===========================================================;
+connection slave;
+show master status;
+show slave status;
diff --git a/mysql-test/include/ctype_like_escape.inc b/mysql-test/include/ctype_like_escape.inc
index ac97fbaa1a0..d4abc33c178 100644
--- a/mysql-test/include/ctype_like_escape.inc
+++ b/mysql-test/include/ctype_like_escape.inc
@@ -11,8 +11,8 @@ insert into t1 values('ab_def');
insert into t1 values('abc_ef');
insert into t1 values('abcd_f');
insert into t1 values('abcde_');
--- should return ab_def
+# should return ab_def
select c1 as c1u from t1 where c1 like 'ab\_def';
--- should return ab_def
+# should return ab_def
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
drop table t1;
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index aad637be1fb..7fe369cfb1e 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -31,13 +31,6 @@ eval SET SESSION STORAGE_ENGINE = $engine_type;
drop table if exists t1,t2,t1m,t1i,t2m,t2i,t4;
--enable_warnings
-#
-# Bug#17530: Incorrect key truncation on table creation caused server crash.
-#
-create table t1(f1 varchar(800) binary not null, key(f1))
- character set utf8 collate utf8_general_ci;
-insert into t1 values('aaa');
-drop table t1;
# BUG#16798: Uninitialized row buffer reads in ref-or-null optimizer
# (repeatable only w/innodb).
@@ -154,6 +147,31 @@ SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` =
DROP TABLE t1, t2;
#
+# Bug #22728 - Handler_rollback value is growing
+#
+
+let $before= `show /*!50002 GLOBAL */ status like 'Handler_rollback'`;
+create table t1 (c1 int) engine=innodb;
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+connection con2;
+handler t1 open;
+handler t1 read first;
+disconnect con2;
+connection con1;
+let $after= `show /*!50002 GLOBAL */ status like 'Handler_rollback'`;
+# Compare the before and after value, it should be equal
+--disable_query_log
+eval select STRCMP("$before", "$after") as "Before and after comparison";
+--enable_query_log
+connection default;
+drop table t1;
+disconnect con1;
+
+--echo End of 4.1 tests
+
+
+#
# Bug #12882 min/max inconsistent on empty table
#
@@ -425,6 +443,28 @@ create table t1(f1 varchar(800) binary not null, key(f1))
insert into t1 values('aaa');
drop table t1;
+
+#
+# Bug#22781: SQL_BIG_RESULT fails to influence sort plan
+#
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
+
+INSERT INTO t1 VALUES ( 1 , 1 , 1);
+INSERT INTO t1 SELECT a + 1 , MOD(a + 1 , 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 2 , MOD(a + 2 , 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 4 , MOD(a + 4 , 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 8 , MOD(a + 8 , 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 16, MOD(a + 16, 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 32, MOD(a + 32, 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 64, MOD(a + 64, 20), 1 FROM t1;
+
+EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
+EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
+DROP TABLE t1;
+
+--echo End of 5.0 tests
+
+
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
# UPDATE": if the row is updated, it's like a regular UPDATE:
# LAST_INSERT_ID() is not affected.
@@ -476,3 +516,5 @@ select last_insert_id();
select * from t2;
drop table t2;
+
+--echo End of 5.1 tests
diff --git a/mysql-test/include/mysqltest_while.inc b/mysql-test/include/mysqltest_while.inc
deleted file mode 100644
index 90b05ee2695..00000000000
--- a/mysql-test/include/mysqltest_while.inc
+++ /dev/null
@@ -1,137 +0,0 @@
-let $1 = 10;
-while ($1)
-{
-while ($1)
-{
-while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- while ($1)
-{
- echo $1;
- dec $1;
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
-}
diff --git a/mysql-test/include/sourced.inc b/mysql-test/include/sourced.inc
deleted file mode 100644
index be1a270641a..00000000000
--- a/mysql-test/include/sourced.inc
+++ /dev/null
@@ -1 +0,0 @@
-echo here is the sourced script;
diff --git a/mysql-test/include/sourced1.inc b/mysql-test/include/sourced1.inc
deleted file mode 100644
index 920561e5de2..00000000000
--- a/mysql-test/include/sourced1.inc
+++ /dev/null
@@ -1 +0,0 @@
---source include/sourced.inc
diff --git a/mysql-test/include/wait_for_query_to_suceed.inc b/mysql-test/include/wait_for_query_to_suceed.inc
new file mode 100644
index 00000000000..6ac1144620e
--- /dev/null
+++ b/mysql-test/include/wait_for_query_to_suceed.inc
@@ -0,0 +1,25 @@
+#
+# Run a query over and over until it suceeds ot timeout occurs
+#
+
+
+let $counter= 100;
+
+disable_abort_on_error;
+disable_query_log;
+disable_result_log;
+eval $query;
+while ($mysql_errno)
+{
+ eval $query;
+ sleep 0.1;
+ dec $counter;
+
+ if (!$counter)
+ {
+ die("Waited too long for query to suceed");
+ }
+}
+enable_abort_on_error;
+enable_query_log;
+enable_result_log;