-
unknown authored
VIEWs, Prepared statement": we didn't mark the nested views as 'prelockng placeholders' when building the prelocking list. This resulted in these views being processed (merged, materialized) before they are actually used. mysql-test/r/sp-prelocking.result: Test results fixed (Bug#15683) mysql-test/t/sp-prelocking.test: Add a test case for Bug#15683 sql/sql_view.cc: When initializing tables used in a view, inherite its 'prelocking_placeholder' flag. This flag is set when we're opening the view in order to build the prelocking list for a query. In this case we should only calculate the list to prelock, and should not merge neither this view nor any of the nested views, of there are any. The flag is used to indicate this mode.
1d73c16b