summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-06-10 17:23:53 +0200
committerSergei Golubchik <serg@mariadb.org>2018-06-11 09:57:54 +0200
commit6da8192174f033c2958ddafb2a15c14360bb1ecc (patch)
tree87763e307a6b4ce0252c239c16d0294e0ae4deb0
parente7ca377cb73a64e40832e9306194412fb07b8fa5 (diff)
downloadmariadb-git-6da8192174f033c2958ddafb2a15c14360bb1ecc.tar.gz
mysqltest: Allow HANDLER READ in --ps-protocol tests
adjust tests
-rw-r--r--client/mysqltest.cc1
-rw-r--r--mysql-test/r/lock.result2
-rw-r--r--mysql-test/suite/handler/handler.inc2
-rw-r--r--mysql-test/suite/handler/interface.result2
-rw-r--r--mysql-test/suite/handler/interface.test2
-rw-r--r--mysql-test/t/lock.test2
6 files changed, 7 insertions, 4 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 98e35136b2a..43dbff981d3 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -8672,6 +8672,7 @@ void init_re(void)
"[[:space:]]*SELECT[[:space:]]|"
"[[:space:]]*CREATE[[:space:]]+TABLE[[:space:]]|"
"[[:space:]]*DO[[:space:]]|"
+ "[[:space:]]*HANDLER[[:space:]]+.*[[:space:]]+READ[[:space:]]|"
"[[:space:]]*SET[[:space:]]+OPTION[[:space:]]|"
"[[:space:]]*DELETE[[:space:]]+MULTI[[:space:]]|"
"[[:space:]]*UPDATE[[:space:]]+MULTI[[:space:]]|"
diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result
index 501c379b257..0dcc0de828f 100644
--- a/mysql-test/r/lock.result
+++ b/mysql-test/r/lock.result
@@ -407,7 +407,7 @@ LOCK TABLE t1 WRITE;
HANDLER t1 OPEN;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
HANDLER t1 READ FIRST;
-ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+Got one of the listed errors
HANDLER t1 CLOSE;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
UNLOCK TABLES;
diff --git a/mysql-test/suite/handler/handler.inc b/mysql-test/suite/handler/handler.inc
index 5b2dd5ef7e9..bfc21a3b2c3 100644
--- a/mysql-test/suite/handler/handler.inc
+++ b/mysql-test/suite/handler/handler.inc
@@ -377,7 +377,9 @@ send optimize table t1;
# client 1
--echo proceed with the normal connection
connection default;
+--disable_ps_protocol
handler t1 read next;
+--enable_ps_protocol
handler t1 close;
# client 2
--echo read the result from the other connection
diff --git a/mysql-test/suite/handler/interface.result b/mysql-test/suite/handler/interface.result
index fb633bb94c4..c9cffba33f7 100644
--- a/mysql-test/suite/handler/interface.result
+++ b/mysql-test/suite/handler/interface.result
@@ -269,7 +269,7 @@ handler t1 open;
lock table t1 write;
alter table t1 engine=csv;
handler t1 read a next;
-ERROR HY000: Table storage engine for 't1' doesn't have this option
+Got one of the listed errors
handler t1 close;
unlock tables;
drop table t1;
diff --git a/mysql-test/suite/handler/interface.test b/mysql-test/suite/handler/interface.test
index 2ef617c3ce7..06797ed6980 100644
--- a/mysql-test/suite/handler/interface.test
+++ b/mysql-test/suite/handler/interface.test
@@ -326,7 +326,7 @@ let $wait_condition=
info = "alter table t1 engine=csv";
--source include/wait_condition.inc
connection default;
---error ER_ILLEGAL_HA
+--error ER_ILLEGAL_HA,ER_KEY_DOES_NOT_EXITS
handler t1 read a next;
handler t1 close;
connection con1;
diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test
index 78f0e2ecf8d..6cfaf9fc320 100644
--- a/mysql-test/t/lock.test
+++ b/mysql-test/t/lock.test
@@ -481,7 +481,7 @@ LOCK TABLE t1 WRITE;
--echo # HANDLER commands are not allowed in LOCK TABLES mode
--error ER_LOCK_OR_ACTIVE_TRANSACTION
HANDLER t1 OPEN;
---error ER_LOCK_OR_ACTIVE_TRANSACTION
+--error ER_LOCK_OR_ACTIVE_TRANSACTION,ER_UNKNOWN_TABLE
HANDLER t1 READ FIRST;
--error ER_LOCK_OR_ACTIVE_TRANSACTION
HANDLER t1 CLOSE;