summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@oracle.com>2011-07-18 18:18:03 +0100
committerAlfranio Correia <alfranio.correia@oracle.com>2011-07-18 18:18:03 +0100
commitc1d55fb255f543bbd7ea62c1f7531b4fba3aa8ea (patch)
tree045e03de93e7d0ce497903a3edb125a6b87f45d4 /sql/sql_yacc.yy
parent201448009668caa116de9c2ff0e224d8e8fa3de1 (diff)
downloadmariadb-git-c1d55fb255f543bbd7ea62c1f7531b4fba3aa8ea.tar.gz
BUG#11809016 - NO WAY TO DISCOVER AN INSTANCE IS NO LONGER A SLAVE FOLLOWING MYSQL BUG#28796
Before BUG#28796, an empty host was used to identify that an instance was no longer a slave. However, BUG#28796 changed this behavior and one cannot set an empty host. Besides, a RESET SLAVE only cleans up information on the next event to retrieve from the master, disables ssl and resets heartbeat period. So a call to SHOW SLAVE STATUS after issuing a RESET SLAVE still returns some valid information, such as host, port, user and password. To fix this problem, we have introduced the command RESET SLAVE ALL that does what a regular RESET SLAVE does and also clears host, port, user and password information thus allowing users to identify when an instance is no longer a slave.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 564250a9bf2..90a55471792 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -11337,10 +11337,16 @@ reset_options:
reset_option:
SLAVE { Lex->type|= REFRESH_SLAVE; }
+ slave_reset_options { }
| MASTER_SYM { Lex->type|= REFRESH_MASTER; }
| QUERY_SYM CACHE_SYM { Lex->type|= REFRESH_QUERY_CACHE;}
;
+slave_reset_options:
+ /* empty */ { Lex->reset_slave_info.all= false; }
+ | ALL { Lex->reset_slave_info.all= true; }
+ ;
+
purge:
PURGE
{