MXS-2713 Classify SET PASSWORD as QUERY_TYPE_WRITE
A change of the password is replicated to the slaves, so it must only be sent to the master.
This commit is contained in:
@ -2730,6 +2730,13 @@ public:
|
||||
}
|
||||
break;
|
||||
|
||||
case TK_SET:
|
||||
if (m_keyword_2 == TK_PASSWORD)
|
||||
{
|
||||
m_type_mask = QUERY_TYPE_WRITE;
|
||||
}
|
||||
break;
|
||||
|
||||
case TK_START:
|
||||
switch (m_keyword_2)
|
||||
{
|
||||
@ -2932,6 +2939,9 @@ public:
|
||||
&& pVariable->op == TK_ID
|
||||
&& strcasecmp(pVariable->u.zToken, "password") == 0)
|
||||
{
|
||||
// Even though SET PASSWORD looks like a session command it
|
||||
// is not, the password change will be replicated to slaves.
|
||||
m_type_mask = QUERY_TYPE_WRITE;
|
||||
// Ok, it was, so we break out.
|
||||
i = pList->nExpr;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user