3491 Bjorn Munch 2011-08-12
Small followup fix to WL 5710:
Test mysql_plugin failed if version string ended in -mN
modified:
mysql-test/t/mysql_plugin.test
3490 Dmitry Lenev 2011-08-11
Fix for bug #12828477 - "MDL SUBSYSTEM CREATES BIG OVERHEAD
FOR CERTAIN QUERIES TO INFORMATION_SCHEMA".
The problem was that metadata locking subsystem introduced
too much overhead for queries to I_S which were processed by
opening only .FRM or .TRG files and had to scanned a lot of
tables (e.g. SELECT COUNT(*) FROM I_S.TRIGGERS was affected).
The same effect was not observed for similar queries which
performed full-blown table open in order to fill I_S table.
The problem stemmed from the fact that in case when I_S
implementation opened only .FRM or .TRG file for each table
processed it didn't release metadata lock it has acquired on
the table after finishing its processing. As result, list
of acquired metadata locks were growing until the end of
statement. Since acquisition of each new lock required
search in the list of already acquired locks performance
degraded.
The same effect is not observed when I_S implementation
performs full-blown table open for each table being
processed, as in the latter cases metadata lock on the
table is released right after table processing.
This fix addressed the problem by ensuring that I_S
implementation releases metadata lock after processing
the table in both cases of full-blown table open and in
case when only .FRM or .TRG file is read.
@ mysql-test/r/information_schema.result
Added coverage for bug #12828477 - "MDL SUBSYSTEM CREATES BIG
OVERHEAD FOR CERTAIN QUERIES TO INFORMATION_SCHEMA".
@ mysql-test/t/information_schema.test
Added coverage for bug #12828477 - "MDL SUBSYSTEM CREATES BIG
OVERHEAD FOR CERTAIN QUERIES TO INFORMATION_SCHEMA".
@ sql/sql_show.cc
Changed fill_schema_table_from_frm() to release metadata lock
it has acquired after processing the .FRM or .TRG file for
table.
Without this step metadata locks acquired for each table
processed will be accumulated. In situation when a lot of
tables are processed by I_S query this will result in
transaction with too many metadata locks. As result
performance of acquisition of new lock will degrade.
modified:
mysql-test/r/information_schema.result
mysql-test/t/information_schema.test
sql/sql_show.cc
=== modified file 'mysql-test/t/mysql_plugin.test'
--- a/mysql-test/t/mysql_plugin.test 2011-08-09 19:09:28 +0000
+++ b/mysql-test/t/mysql_plugin.test 2011-08-12 10:49:38 +0000
@@ -288,11 +288,11 @@ let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n
--echo # Show the help.
--echo #
replace_result $MYSQL_PLUGIN mysql_plugin;
---replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/
+--replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/
--exec $MYSQL_PLUGIN --help
replace_result $MYSQL_PLUGIN mysql_plugin;
---replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/
+--replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/
--exec $MYSQL_PLUGIN --version
#
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5 branch (bjorn.munch:3490 to 3491) | Bjorn Munch | 16 Aug |