1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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
This commit is contained in:
Sergey Glukhov
2008-10-27 14:22:38 +04:00
parent eafe728fc5
commit 380f1a8440
3 changed files with 24 additions and 3 deletions

View File

@ -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.
# -----------------------------------------------------------------

View File

@ -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 # -----------------------------------------------------------------