Skip to content
  • Pavan Naik's avatar
    42bb3fcb
    WL#11832: [1/5] MTR: Enhance [disable|enable]_warnings commands to disable · 42bb3fcb
    Pavan Naik authored
                    or enable a specific list of warnings
    
    Description:
    ------------
    When there is an issue, server sometimes generates warnings on client.
    These warnings are expected server behavior and a user wants to test
    this in a MTR test. However these kind of tests might become complex
    over the period of time generating multiple warning messages.
    
    'disable_warnings' and 'enable_warnings' mysqltest commands provides a
    mechanism to disable or enable warnings generated. But these commands
    doesn't provide a way to suppress a particular warning message and
    might hide some product bug by suppressing all warnings generated.
    
    This WL extends the functionality of 'disable_warnings' and
    'enable_warnings' commands to take an optional argument containing
    comma separated list of warnings. Each warning specified should be a
    symbolic error name from mysqld_error.h file.
    
    --disable_warnings ER_BAD_TABLE_ERROR
    DROP TABLE IF EXISTS t1;
    --enable_warnings ER_BAD_TABLE_ERROR
    
    The argument "ONCE" to disable_warnings and enable_warnings commands
    is made as the second optional argument now i.e warning list argument
    is must for second argument "ONCE" to use.
    
    --disable_warnings ER_BAD_TABLE_ERROR ONCE
    DROP TABLE IF EXISTS t1;
    
    or
    
    --disable_warnings
    ...
    ...
    --enable_warnings ER_BAD_TABLE_ERROR ONCE
    DROP TABLE IF EXISTS t1;
    ...
    ...
    --enable_warnings
    
    * Error numbers are not allowed as argument to disable/enable_warnings
      command.
    
    * All the disabled warnings must be enabled before end of the test.
    
    * $DISABLED_WARNINGS_LIST variable will contain the list of currently
      disabled warnings. This variable will contain disabled warnings only
      when all the warnings are enabled and, then user disables particular
      warnings by specifying warning list argument to disable_warnings
      command.
    
    * $ENABLED_WARNINGS_LIST variable will contain the list of currently
      enabled warnings. This variable will contain enabled warnings only
      when all the warnings are disabled and, then user enables particular
      warnings by specifying warning list argument to enable_warnings
      command.
    
    Change-Id: I8c6351364ad4cf5c9470ecf830c83067f3ef37b7
    42bb3fcb
    WL#11832: [1/5] MTR: Enhance [disable|enable]_warnings commands to disable
    Pavan Naik authored
                    or enable a specific list of warnings
    
    Description:
    ------------
    When there is an issue, server sometimes generates warnings on client.
    These warnings are expected server behavior and a user wants to test
    this in a MTR test. However these kind of tests might become complex
    over the period of time generating multiple warning messages.
    
    'disable_warnings' and 'enable_warnings' mysqltest commands provides a
    mechanism to disable or enable warnings generated. But these commands
    doesn't provide a way to suppress a particular warning message and
    might hide some product bug by suppressing all warnings generated.
    
    This WL extends the functionality of 'disable_warnings' and
    'enable_warnings' commands to take an optional argument containing
    comma separated list of warnings. Each warning specified should be a
    symbolic error name from mysqld_error.h file.
    
    --disable_warnings ER_BAD_TABLE_ERROR
    DROP TABLE IF EXISTS t1;
    --enable_warnings ER_BAD_TABLE_ERROR
    
    The argument "ONCE" to disable_warnings and enable_warnings commands
    is made as the second optional argument now i.e warning list argument
    is must for second argument "ONCE" to use.
    
    --disable_warnings ER_BAD_TABLE_ERROR ONCE
    DROP TABLE IF EXISTS t1;
    
    or
    
    --disable_warnings
    ...
    ...
    --enable_warnings ER_BAD_TABLE_ERROR ONCE
    DROP TABLE IF EXISTS t1;
    ...
    ...
    --enable_warnings
    
    * Error numbers are not allowed as argument to disable/enable_warnings
      command.
    
    * All the disabled warnings must be enabled before end of the test.
    
    * $DISABLED_WARNINGS_LIST variable will contain the list of currently
      disabled warnings. This variable will contain disabled warnings only
      when all the warnings are enabled and, then user disables particular
      warnings by specifying warning list argument to disable_warnings
      command.
    
    * $ENABLED_WARNINGS_LIST variable will contain the list of currently
      enabled warnings. This variable will contain enabled warnings only
      when all the warnings are disabled and, then user enables particular
      warnings by specifying warning list argument to enable_warnings
      command.
    
    Change-Id: I8c6351364ad4cf5c9470ecf830c83067f3ef37b7
Loading