From 380f1a84403a88b4b45f3d14fe98882a04c4773d Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Mon, 27 Oct 2008 14:22:38 +0400 Subject: Bug#39040 valgrind errors/crash when creating views with binlog logging enabled 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 --- mysql-test/t/view.test | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/t/view.test') diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 9fa981ccb9a..bcf31a4501d 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3560,6 +3560,15 @@ DROP VIEW v1; ########################################################################### +# +# Bug#39040: valgrind errors/crash when creating views with binlog logging +# enabled +# +# Bug is visible only when running in valgrind with binary logging. +CREATE VIEW v1 AS SELECT 1; +DROP VIEW v1; + + --echo # ----------------------------------------------------------------- --echo # -- End of 5.0 tests. --echo # ----------------------------------------------------------------- -- cgit v1.2.1