diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-06-07 18:53:50 +0400 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-06-07 18:53:50 +0400 |
commit | 5196821127d48dcf767c1751570b2a8a468bc5f3 (patch) | |
tree | a3ffdeb48eac052ad5626080a9358db4e9495074 /sql/sql_lex.cc | |
parent | 666f5544c2ce8d8c5ab2e276412d8c2e0a4a3a1a (diff) | |
download | mariadb-git-5196821127d48dcf767c1751570b2a8a468bc5f3.tar.gz |
Backport two small cleanups from trunk-iplus tree:
1) No mutex and no function call if we're not using
plugins.
2) If we're above the table definition cache limit,
delete the oldest unused share, not the share on our hands.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index e87204ffd40..3f3c650d1e8 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -435,8 +435,11 @@ void lex_end(LEX *lex) DBUG_PRINT("enter", ("lex: 0x%lx", (long) lex)); /* release used plugins */ - plugin_unlock_list(0, (plugin_ref*)lex->plugins.buffer, - lex->plugins.elements); + if (lex->plugins.elements) /* No function call and no mutex if no plugins. */ + { + plugin_unlock_list(0, (plugin_ref*)lex->plugins.buffer, + lex->plugins.elements); + } reset_dynamic(&lex->plugins); DBUG_VOID_RETURN; |