summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index a64c120f14c..29be1c4c645 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -4048,8 +4048,12 @@ void select_insert::abort_result_set() {
example), no table will have been opened and therefore 'table'
will be NULL. In that case, we still need to execute the rollback
and the end of the function.
+
+ If it fail due to inability to insert in multi-table view for example,
+ table will be assigned with view table structure, but that table will
+ not be opened really (it is dummy to check fields types & Co).
*/
- if (table)
+ if (table && table->file->get_table())
{
bool changed, transactional_table;
/*