Bug #42444 | main.change_user: result from com_select differs between embedded and other runs | ||
---|---|---|---|
Submitted: | 29 Jan 2009 10:23 | Modified: | 30 Jan 2009 18:09 |
Reporter: | Luis Soares | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Tests: Replication | Severity: | S7 (Test Cases) |
Version: | 6.0-rpl | OS: | Any |
Assigned to: | Luis Soares | CPU Architecture: | Any |
Tags: | 6.0-rpl-green, pushbuild, test failure |
[29 Jan 2009 10:23]
Luis Soares
[29 Jan 2009 10:25]
Luis Soares
OBSERVATIONS ------------ --> 1. This test passes in main trees both in embedded and other runs with value 114 (according to my 6.0-main local clone). --> 2. I digged into this and by setting a SHOW GLOBAL STATUS LIKE com_select'; as the first instruction in the test file, ie, before any select is done, the result obtained when running the test in -rpl trees is the following: * RUNNING IN EMBEDDED MODE ./mtr --embedded change_user (...) +SHOW GLOBAL STATUS LIKE 'com_select'; +Variable_name Value +Com_select 0 * RUNNING IN OTHER MODE ./mtr change_user (...) +SHOW GLOBAL STATUS LIKE 'com_select'; +Variable_name Value +Com_select 5 --> 3. There is a "--force-restart" in the t/change_user-master.opt file, which I assume it states that the server should be restarted before running the test (so that global server variables get reset!?). --> 4. I started the server manually and as first instruction I issued the SHOW command in a mysql shell. Got the following: mysql> SHOW GLOBAL STATUS LIKE 'com_select'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | Com_select | 1 | +---------------+-------+ 1 row in set (0.00 sec) CONCLUSION ---------- a) From 2. and 3. I get the impression that mtr is doing some selects after starting a mysqld instance. This does not seem to happen in embedded mode, thence the difference (embedded: 0, other: 5). b) From 4. I get the impression that some other select is happening behind the curtains either when mysql client connects to the server (just to be sure, running SHOW GLOBAL STATUS LIKE 'com_select' several times we get the same value, so ruling out that some select happens on behalf of the SHOW command).
[29 Jan 2009 10:26]
Luis Soares
After discuss this with magnus, he said that: "The difference is probably that "check_testcase" is not run in embedded mode."
[29 Jan 2009 10:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/64434 2805 Luis Soares 2009-01-29 BUG#42444: main.change_user: result from com_select differs between embedded and other runs In 6.0-rpl this test was failing when mtr was running tests in embedded mode. This happened because when in embedded mode, mtr does run "check_testcase" which seems to cause extra selects. Since this test case relies on SHOW GLOBAL STATUS LIKE 'com_select'; for passing this will get different values whether mtr is run in embedded mode or other modes. This patch address this issue by making the part of the test dependent from SHOW GLOBAL STATUS LIKE 'com_select'; to work with relative instead of absolute values (have a test start timestamp and then subtract it in the checks).
[29 Jan 2009 11:05]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/64438 2805 Luis Soares 2009-01-29 BUG#42444: main.change_user: result from com_select differs between embedded and other runs In 6.0-rpl this test was failing when mtr was running tests in embedded mode. This happened because when in embedded mode, mtr does run "check_testcase" which seems to cause extra selects. Since this test case relies on: SHOW GLOBAL STATUS LIKE 'com_select'; for passing, this will get different values whether mtr is run in embedded mode or other modes, therefore the test failure surfaces. This patch address this issue by making the part of the test dependent from SHOW GLOBAL STATUS LIKE 'com_select'; to work with relative instead of absolute values (have a test start timestamp and then subtract it in the checks).
[30 Jan 2009 13:27]
Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 18:09]
Paul DuBois
Test case changes. No changelog entry needed.