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 bc3d6f2ac7
commit 994299b4f1
4 changed files with 32 additions and 6 deletions

View File

@ -833,7 +833,15 @@ static void update_field_infos(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