• Sergey Glukhov's avatar
    Bug#39040 valgrind errors/crash when creating views with binlog logging enabled · 380f1a84
    Sergey Glukhov authored
    A string buffers which were included in the 'view' data structure
    were allocated on the stack, causing an invalid pointer when used
    after the function returned.
    The fix: use copy of values for view->md5 & view->queries
    
    
    mysql-test/r/view.result:
      test result
    mysql-test/t/view.test:
      test case
    sql/sql_view.cc:
      A string buffers which were included in the 'view' data structure
      were allocated on the stack, causing an invalid pointer when used
      after the function returned.
      The fix: use copy of values for view->md5 & view->queries
    380f1a84
sql_view.cc 56.1 KB