← Back to team overview

percona-discussion team mailing list archive

[Bug 378834] Re: test failure for mysql/5.0/percona_maintained/microslow_innodb.patch

 

Arjen, I could use some advice on this problem.  The "right" fix wasn't very clear
to me.

The new variable type is called "double", but its really a fixed point number, with
magic done by sys_var_thd_microtime.

I'm working on an absolutely minimal patch that just changes the assert to all ULL
and DOUBLE values.  But I suspect the name of GET_DOUBLE will confuse folks in
the future.

-- 
test failure for mysql/5.0/percona_maintained/microslow_innodb.patch
https://bugs.launchpad.net/bugs/378834
You received this bug notification because you are a member of Percona
developers, which is the registrant for Percona patches.

Status in OurDelta - Builds for MySQL: Confirmed
Status in Patches for MySQL by Percona: New

Bug description:

I've been trying to get ready to submit a patch back for ourdelta, and as part of the process I've been trying to get the test suites to run before I change anything.

I found an assertion error in the variables test when applying the mysql/5.0/percona_maintained/microslow_innodb.patch.
(To enable the assertions I configured mysql with the --with-debug=full option).

When the variables test is run it fails the assertion at mysys/my_getopt.c line 830:

    DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL);

The optp->var_type value is 11 (a double); the code was expecting an
unsigned long long.

This is the contents of the optp that caused the assertion to fail:

(gdb) print *optp
$1 = {name = 0x97fb96 "long_query_time", id = 415, 
  comment = 0x97fba8 "Log all queries that have taken more than long_query_time seconds to execute to file.", value = 0xe17450, u_max_value = 0xe17690, 
  str_values = 0x0, var_type = 11, arg_type = REQUIRED_ARG, 
  def_value = 10000000, min_value = 0, max_value = 31536000000000, 
  sub_size = 0, block_size = 1, app_type = 0}

The "long_query_time" variable is broken.

I think the underlying problem is that query time was originally changed from seconds to microseconds, and then to a double for input/output purposes, but still an unsigned long long internally.  The failing assertion is picking up this
mismatch.

I realize this is probably just a test error, but at the very least we should change the test to not be run to avoid
false errors when testing the ourdelta patches.  Alternately the underlying code could actually be fixed to not
fail the assertion :->



Follow ups