Skip to content

Commit

Permalink
mysqltest: Allow HANDLER READ in --ps-protocol tests
Browse files Browse the repository at this point in the history
adjust tests
  • Loading branch information
vuvova committed Jun 11, 2018
1 parent e7ca377 commit 6da8192
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:]]|"
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/r/lock.result
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/handler/handler.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/handler/interface.result
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/handler/interface.test
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/t/lock.test
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6da8192

Please sign in to comment.