← Back to team overview

maria-developers team mailing list archive

Re: microslow-innodb ported to 5.1

 

Sergei,

Yes, I understand  this is not best implementation, however is there any
other way to have per-thread statistics for plugin and then have access
to it to write to slow-log ?

Correct implementation may require changes in plugin interface, but I am
open for recommendations.

Thanks!
Vadim


Sergei Golubchik wrote:
> Hi, Vadim!
> 
> On May 27, Vadim Tkachenko wrote:
>> Monty,
>>
>> I made merge proposal:
>>
>> https://code.launchpad.net/~maria-captains/maria/slow-extended-patch/+merge/6840
>>
>> You can find patch there.
> 
> Eh, I certainly hope it won't be merged in its current form.
> I didn't look too far, but even the very first lines:
> 
>> === modified file 'include/mysql/plugin.h'
>> --- include/mysql/plugin.h	2008-04-28 16:24:05 +0000
>> +++ include/mysql/plugin.h	2009-05-28 05:00:21 +0000
>> @@ -687,6 +687,16 @@
>>  const char *set_thd_proc_info(MYSQL_THD, const char * info, const char *func,
>>                                const char *file, const unsigned int line);
>>  
>> +void increment_thd_innodb_stats(MYSQL_THD thd,
>> +                    long io_reads,
>> +                    long long io_read,
>> +                    long io_reads_wait_timer,
>> +                    long lock_que_wait_timer,
>> +                    long que_wait_timer,
>> +                    long page_access);
>> +unsigned long thd_log_slow_verbosity(const MYSQL_THD thd);
>> +int thd_opt_slow_log();
> 
> Like, hello ? increment_thd_innodb_stats in plugin.h ? Really ? Any
> arbitrary plugin (as plugin.h is a generic, common to all plugins,
> header) may have an urgent need of incrementing InnoDB statistics ?  May
> I call it from my ftparser plugin, please ?
> 
> Regards,
> Sergei
> 
> P.S.:
> And below I've seen thd->innodb_* something, why not thd->seqengine, for
> example (http://seqengine.org/) ? We have to hard-code in THD statistics
> fields for any possible storage engine out there ?
> 
> 


-- 
Vadim Tkachenko, CTO
Percona Inc.
ICQ: 369-510-335, Skype: vadimtk153, Phone +1-888-401-3403
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.percona.com/



Follow ups

References