MXS-2898 Classify @@last_insert_id() and last_insert_id() identically
With this change, both 'SET @my_id = (SELECT LAST_INSERT_ID())' and 'SET @my_id = (SELECT @@LAST_INSERT_ID)' are classified as QUERY_TYPE_MASTER_READ|QUERY_TYPE_SESSION_WRITE|QUERY_TYPE_USERVAR_WRITE Earlier @@last_insert_id had the QUERY_TYPE_READ bit set as well, which indirectly caused the problems of MXS-2898.
This commit is contained in:
@ -1016,7 +1016,7 @@ public:
|
||||
{
|
||||
if (strcasecmp(zToken, "last_insert_id") == 0)
|
||||
{
|
||||
m_type_mask |= (QUERY_TYPE_READ | QUERY_TYPE_MASTER_READ);
|
||||
m_type_mask |= QUERY_TYPE_MASTER_READ;
|
||||
}
|
||||
else if (is_sequence_related_function(zToken))
|
||||
{
|
||||
|
Reference in New Issue
Block a user