MXS-1043: Handle @@identity like @@last_insert_id

The type of @@identity, @@last_insert_id and last_insert_id() is
now the same, that is, QUERY_TYPE_READ|QUERY_TYPE_MASTER_READ.
This commit is contained in:
Johan Wikman
2016-12-02 10:58:21 +02:00
parent ac0f975f9c
commit 0218ac9e9c
4 changed files with 32 additions and 6 deletions

View File

@ -670,7 +670,15 @@ static void update_affected_fields(QC_SQLITE_INFO* info,
}
else
{
info->types |= QUERY_TYPE_SYSVAR_READ;
if ((strcasecmp(&zToken[2], "identity") == 0) ||
(strcasecmp(&zToken[2], "last_insert_id") == 0))
{
info->types |= QUERY_TYPE_MASTER_READ;
}
else
{
info->types |= QUERY_TYPE_SYSVAR_READ;
}
}
}
else