• Vlad Lesin's avatar
    MDEV-32554 mon_lock_wait_current_count test causes innodb.monitor failure · 2fdf89ec
    Vlad Lesin authored
    This commit will be applied during 10.5->10.6 merging as a part of
    conflicts resolution.
    
    -------------------------
    SET GLOBAL innodb_monitor_disable=all;
    -------------------------
    
    was set at the the beggining of mon_lock_wait_current_count test,
    because lock_row_lock_time_avg is filled under lock_sys.wait_mutex lock,
    which is held by connection 2:
    
    --------------------------
    --connect (con2,localhost,root,,)
    SET DEBUG_SYNC="lock_wait_before_suspend SIGNAL blocked WAIT_FOR cont";
    BEGIN;
    --send SELECT * FROM t FOR UPDATE
    -------------------------
    
    That is why the followin SELECT is blocked:
    
    -----------------------
    SELECT name, count FROM information_schema.innodb_metrics
      WHERE name ='lock_row_lock_current_waits';
    -----------------------
    
    And setting innodb_monitor_disable=all causes innodb monitor enabling
    status changing. And the status is not restored to default value even
    after
    -----------------------
    SET GLOBAL innodb_monitor_reset_all=default;
    SET GLOBAL innodb_monitor_enable=default;
    -----------------------
    execution. See MDEV-32553 for details.
    
    The fix is to disable not all the monitors at the beggining of the test,
    but only the monitor, which causes hanging, i.e. lock_row_lock_time_avg.
    
    MDEV-32553 it the root case, the current fix is just workaround.
    10.5 is not affected, as there is difference in innodb.monitor.
    2fdf89ec
mon_lock_wait_current_count.test 3.67 KB