1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
Files
mariadb/mysql-test/t
unknown 7114fbb943 Bug#34587 Creating a view inside a stored procedure leads to a server crash
The problem is that when a stored procedure is being parsed for
the first execution, the body is copied to a temporary buffer
which is disregarded sometime after the statement is parsed.
And during this parsing phase, the rule for CREATE VIEW was
holding a reference to the string being parsed for use during
the execution of the CREATE VIEW statement, leading to invalid
memory access later.

The solution is to allocate and copy the SELECT of a CREATE
VIEW statement using the thread memory root, which is set to
the permanent arena of the stored procedure. 


mysql-test/r/view.result:
  Add test case result for Bug#34587
mysql-test/t/view.test:
  Add test case for Bug#34587
sql/sql_lex.h:
  Remove start and end position variables. The SELECT of a
  CREATE VIEW is now allocated at parse time.
sql/sql_view.cc:
  Remove assertion that is not true when the statement is
  being re-executed. Use string that was trimmed of leading
  and trailing whitespace at parse time.
sql/sql_yacc.yy:
  Allocate the SELECT of a CREATE VIEW using the current thread
  memory root and remove any leading and trailing whitespace.
2008-02-20 17:26:50 -03:00
..
2007-08-07 05:35:20 -04:00
2007-08-02 12:45:56 -07:00
2007-07-23 23:35:43 -07:00
2007-11-01 12:30:03 -07:00
2007-09-26 12:45:08 +02:00
2007-11-24 15:02:29 +04:00
2008-02-04 19:55:36 +01:00
2007-07-11 18:45:35 -07:00
2007-11-02 13:40:34 +03:00
2007-08-31 16:59:07 +05:00
2007-08-31 16:59:07 +05:00
2007-11-20 20:15:20 +04:00
2008-02-07 12:00:48 -07:00
2008-01-07 21:06:18 +01:00
2007-09-24 12:42:44 +02:00
2007-08-22 15:43:16 +03:00
2007-11-26 22:21:46 +03:00
2007-07-15 21:51:36 +04:00
2008-02-05 12:27:52 +03:00