• Konstantin Osipov's avatar
    A fix and a test case for Bug#56540 "Exception (crash) in · 248625d9
    Konstantin Osipov authored
    sql_show.cc during rqg_info_schema test on Windows".
    
    Ensure we do not access freed memory when filling
    information_schema.views when one of the views
    could not be properly opened.
    
    
    
    mysql-test/r/information_schema.result:
      Update results - a fix for Bug#56540.
    mysql-test/t/information_schema.test:
      Add a test case for Bug#56540
    sql/sql_base.cc:
      Push an error into the Diagnostics area
      when we return an error.
      This directs get_all_tables() to the execution
      branch which doesn't involve 'process_table()'
      when no table/view was opened.
    sql/sql_show.cc:
      Do not try to access underlying table fields
      when opening of a view failed. The underlying
      table is closed in that case, and accessing
      its fields may lead to dereferencing a damaged 
      pointer.
    248625d9
sql_base.cc 295 KB