MXS-1527 Do not consider sysvars to be updated in SELECT
A statement like select if(@@hostname='box02','prod_mariadb02','n'); does not modify @@hostname. Hence the type mask should be QUERY_TYPE_READ|QUERY_TYPE_SYSVAR_READ and NOT QUERY_TYPE_READ|QUERY_TYPE_GSYSVAR_WRITE.
This commit is contained in:
parent
58373b3495
commit
ba9b4a3bf6
@ -1023,7 +1023,10 @@ static void update_field_infos(QC_SQLITE_INFO* info,
|
||||
{
|
||||
if (zToken[1] == '@')
|
||||
{
|
||||
if ((prev_token == TK_EQ) && (pos == QC_TOKEN_LEFT))
|
||||
// TODO: This should actually be "... && (info->operation == QUERY_OP_SET)"
|
||||
// TODO: but there is no QUERY_OP_SET at the moment.
|
||||
if ((prev_token == TK_EQ) && (pos == QC_TOKEN_LEFT) &&
|
||||
(info->operation != QUERY_OP_SELECT))
|
||||
{
|
||||
info->type_mask |= QUERY_TYPE_GSYSVAR_WRITE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user