• unknown's avatar
    BUG#34656 - KILL a query = Assertion failed: m_status == DA_ERROR || · af929434
    unknown authored
                m_status == DA_OK
    
    Reading from information_scema.tables or information_schema.columns
    may cause assertion failure in debug builds. This may happen under
    rare circumstances when information_schema fails to get information
    about a table (e.g. when a connection is killed).
    
    This happens because open_normal_and_derived_tables() can return an
    error without setting an error message in THD. But information_schema
    attempts to get an error message from THD unconditionally.
    
    With this fix information_schema attempts to get an error message
    from THD only in case error message is set in THD.
    
    
    mysql-test/r/information_schema.result:
      A test case for BUG#34656.
    mysql-test/t/information_schema.test:
      A test case for BUG#34656.
    sql/item_func.cc:
      Set proc info to "User sleep".
    sql/sql_show.cc:
      open_normal_and_derived_tables() can return an error without
      setting an error message in THD. That means we must access
      error message conditionally, only in case thd->is_error() is
      true.
    af929434
sql_show.cc 232 KB