List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:March 27 2009 12:53pm
Subject:Re: Review of WL#2360 Performance Schema
View as plain text  
Hello,

Marc Alff a écrit, Le 03/27/2009 12:00 PM:
>> 2) Bug report: under Linux (BUILD/compile-pentium-valgrind-max-no-ndb),
>> I run a statement which I know locks THR_LOCK_maria for sure, but
>> EVENTS_WAITS_CURRENT does not show any call to this mutex. Here are the
>> steps:
>> CREATE TABLE t1 (a int) ENGINE=MARIA;
>> SELECT * FROM EVENTS_WAITS_CURRENT; # no "maria" things in output
>> Even though the "CREATE TABLE" locks THR_LOCK_maria in maria_create(). I
>> haven't touched SETUP_ tables (fresh mysqld created by "./mtr --start
>> alias").
>> Debugged this a bit: during server initialization, a server-level mutex
>> gets instrumentation enabled, but not a Maria mutex:
>> - during MYSQL_MUTEX_INIT(LOCK_mdl) the thread-specific key (THR_PFS) is
>> non-null.
>> - during MYSQL_MUTEX_INIT(THR_LOCK_maria) the thread-specific key
>> (THR_PFS) is null.
>> - but the OS thread is the same in both cases (the thread which runs
>> main()); it's just that the THR_PFS is first set to non-NULL right in
>> the beginning of main(), stays non-NULL for initializing LOCK_mdl, but
>> when we come to plugin_load() (which initializes engines like Maria), we
>> have this in plugin_load():
>>
> 
> Thanks for this analysis, it's spot on and saved me a lot of time.

Thanks :)

> THD::store_globals() has now been fixed

Good but... I had written "I suggest that we discuss the fixes first 
before implementation; I'd like to see first at what place and how this 
would be fixed, to save future review time." ..........
The "bool real_thread" fix does not ignite my enthusiasm, precisely. But 
as it's now all written and pushed, I'll come back to it later.

-- 
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com
Thread
Review of WL#2360 Performance SchemaGuilhem Bichot26 Mar
  • Re: Review of WL#2360 Performance SchemaGuilhem Bichot26 Mar
  • Re: Review of WL#2360 Performance SchemaMarc Alff27 Mar
    • Re: Review of WL#2360 Performance SchemaGuilhem Bichot27 Mar
    • Re: Review of WL#2360 Performance SchemaGuilhem Bichot27 Mar
      • Re: Review of WL#2360 Performance SchemaSergei Golubchik27 Mar
    • Re: Review of WL#2360 Performance SchemaGuilhem Bichot30 Mar
      • Re: Review of WL#2360 Performance SchemaMarc Alff1 Apr
        • Re: Review of WL#2360 Performance SchemaGuilhem Bichot1 Apr
          • Re: Review of WL#2360 Performance SchemaMarc Alff2 Apr