summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2008-10-27 14:22:38 +0400
committerSergey Glukhov <Sergey.Glukhov@sun.com>2008-10-27 14:22:38 +0400
commit380f1a84403a88b4b45f3d14fe98882a04c4773d (patch)
tree5921b8414b255d11ccfc72f51b3431b7587460ab /mysql-test
parenteafe728fc53cac1fb5e80f0f54e040e395010d7e (diff)
downloadmariadb-git-380f1a84403a88b4b45f3d14fe98882a04c4773d.tar.gz
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
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/view.result2
-rw-r--r--mysql-test/t/view.test9
2 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index eb7a89c3d12..8cbe3fc36cf 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -3677,6 +3677,8 @@ DROP VIEW v1;
# -- End of test case for Bug#35193.
+CREATE VIEW v1 AS SELECT 1;
+DROP VIEW v1;
# -----------------------------------------------------------------
# -- End of 5.0 tests.
# -----------------------------------------------------------------
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 # -----------------------------------------------------------------