summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2010-09-23 08:10:53 -0700
committerIgor Babaev <igor@askmonty.org>2010-09-23 08:10:53 -0700
commitb969df8bbdc6acbaf1506b52346d24306e84a48c (patch)
treeb0b9eaa82a121c87f17487c57926bd9968d3ef20 /sql/sp_head.cc
parentcfbd9270243e4b429cdc26e8554bcc99690f2422 (diff)
parent709a0a131021135e9fb7a2095fcfcbc223dfb126 (diff)
downloadmariadb-git-b969df8bbdc6acbaf1506b52346d24306e84a48c.tar.gz
Merge of the mwl106 tree into the latest 5.3 tree.
Resolved conflicts. Adjusted some test results
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index f7dc2c83641..4100efc9d08 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2818,6 +2818,9 @@ int sp_instr::exec_open_and_lock_tables(THD *thd, TABLE_LIST *tables)
result= -1;
else
result= 0;
+ /* Prepare all derived tables/views to catch possible errors. */
+ if (!result)
+ result= mysql_handle_derived(thd->lex, DT_PREPARE) ? -1 : 0;
return result;
}