diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-06-10 15:31:19 +0400 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-06-10 15:31:19 +0400 |
commit | 47b9f64c534f51af037d1bad7b27dfa9a1d1c284 (patch) | |
tree | 72b4e0a98e981e6980b8bbc7503413b8863472ab /sql/event_scheduler.cc | |
parent | 75d7bb91a3013cc0fa99003c638f154930966b12 (diff) | |
download | mariadb-git-47b9f64c534f51af037d1bad7b27dfa9a1d1c284.tar.gz |
A pre-requisite patch for WL#5419 "LOCK_open scalability:
make tdc_refresh_version an atomic counter".
To avoid orphaned TABLE_SHARE objects left in the
cache, make sure that wherever we set table->s->version
we take care of removing all unused table share objects
from the table cache.
Always set table->s->version under LOCK_open, to make sure
that no other connection sees an old value of the
version and adds the table to unused_tables list.
Add an assert to table_def_unuse_table() that we never
'unuse' a talbe of a share that has an old version.
With this patch, only three places are left in the code
that manipulate with table->s->version:
- tdc_remove_table(). In most cases we have an X mdl lock
in tdc_remove_table(), the two remaining cases when we
don't are 'FLUSH TABLE' and mysql_admin_table().
- sql_view.cc - a crude hack that needs a separate fix
- initial assignment from refresh_version in table.cc.
sql/sql_base.cc:
Add an assert.
Don't manipulate with table->s->version in auto-repair, auto-discover.
Use tdc_remove_table() in auto_repair_table() and drop_open_table().
sql/sql_table.cc:
Remove dead code from mysql_admin_table().
Manipulate with table->s->version through the TDC API.
Diffstat (limited to 'sql/event_scheduler.cc')
0 files changed, 0 insertions, 0 deletions