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 | df9ab0ffea2eb603179f2bd2abcc66d2c652cdda (patch) | |
| tree | 72b4e0a98e981e6980b8bbc7503413b8863472ab /sql/sql_insert.cc | |
| parent | fdd7c28bd80339921fdbf1a8db537a0d41e0084c (diff) | |
| download | mariadb-git-df9ab0ffea2eb603179f2bd2abcc66d2c652cdda.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.
Diffstat (limited to 'sql/sql_insert.cc')
0 files changed, 0 insertions, 0 deletions
