1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Cleanup session tracker

- call current_schema::mark_as_changed() directly
- call state_change::mark_as_changed() directly
- replaced SESSION_TRACKER_CHANGED with dummy tracker
- replaced Session_tracker::mark_as_changed() with
  State_tracker::mark_as_changed()
- hide and devirtualize original State_tracker::mark_as_changed(),
  rename it to set_changed()
- all implementations of mark_as_changed() now check is_enabled() for
  consistency
- no argument casts anymore
This commit is contained in:
Sergey Vojtovich
2019-09-20 22:52:00 +04:00
parent edef6a0074
commit ad77e3ac09
9 changed files with 50 additions and 54 deletions

View File

@ -1089,7 +1089,7 @@ exit:
if (unlikely(thd->db.str && cmp_db_names(&thd->db, db) && !error))
{
mysql_change_db_impl(thd, NULL, 0, thd->variables.collation_server);
SESSION_TRACKER_CHANGED(thd, CURRENT_SCHEMA_TRACKER, NULL);
thd->session_tracker.current_schema.mark_as_changed(thd);
}
my_dirend(dirp);
DBUG_RETURN(error);
@ -1650,8 +1650,8 @@ uint mysql_change_db(THD *thd, const LEX_CSTRING *new_db_name,
mysql_change_db_impl(thd, &new_db_file_name, db_access, db_default_cl);
done:
SESSION_TRACKER_CHANGED(thd, CURRENT_SCHEMA_TRACKER, NULL);
SESSION_TRACKER_CHANGED(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
thd->session_tracker.current_schema.mark_as_changed(thd);
thd->session_tracker.state_change.mark_as_changed(thd);
DBUG_RETURN(0);
}