summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-07-25 13:27:11 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-07-25 13:27:11 +0200
commitae476868a5394041a00e75a29c7d45917e8dfae8 (patch)
treeb2f82005fe87bc5ce1ea92504b505a9d4e8b9781 /sql/sql_insert.cc
parent8d0dabc56b09c6b40db15aac7da0da43d988759d (diff)
parent2536c0b1ebf6c5012ae34435d82fb2f5fa54aea5 (diff)
downloadmariadb-git-ae476868a5394041a00e75a29c7d45917e8dfae8.tar.gz
Merge branch '5.5' into 10.1
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 da76f10596d..1ad74bd0f5a 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -3871,8 +3871,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;
/*