XtraDB does unnecessary slow log stats accounting even with the slow log disabled

Bug #1123915 reported by Alexey Kopytov on 2013-02-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Alexey Kopytov
Alexey Kopytov
Alexey Kopytov

Bug Description

ha_innobase::external_lock() does some extra stats accounting work for slow log even if neither the slow log itself nor log_slow_verbosity=innodb are enabled:

 if (trx->n_mysql_tables_in_use == 0) {
     (unsigned long long) trx->descr->id,

  trx->io_reads = 0;
  trx->io_read = 0;
  trx->io_reads_wait_timer = 0;
  trx->lock_que_wait_timer = 0;
  trx->innodb_que_wait_timer = 0;
  trx->distinct_page_access = 0;
  if (trx->distinct_page_access_hash)
   memset(trx->distinct_page_access_hash, 0, DPAH_SIZE);

The trx stats themselves are only updated if trx->take_stats is TRUE, but the code above does not check this.

Related branches

tags: added: slow-extended
Alexey Kopytov (akopytov) wrote :

Assigning to myself, as this needs to be fixed for internal tests.

Please also consider
which I should be implementing soon. Maybe I would need to add another
option to trigger XtraDB statistics collection but no actual logging to
the traditional slow log. I was hoping to accomplish this task entirely
within the plugin and not rely on any InnoDB/XtraDB changes.

On 2/20/2013 11:03 AM, Alexey Kopytov wrote:
> Assigning to myself, as this needs to be fixed for internal tests.
> ** Changed in: percona-server/5.1
> Assignee: Laurynas Biveinis (laurynas-biveinis) => Alexey Kopytov (akopytov)
> ** Changed in: percona-server/5.5
> Assignee: Laurynas Biveinis (laurynas-biveinis) => Alexey Kopytov (akopytov)

George O. Lorch III
Software Engineer, Percona
+1-888-401-3401 x542 US/Arizona (GMT -7)
skype: george.ormond.lorch.iii

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers