summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2017-07-17 22:34:07 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2017-07-18 13:49:58 +0200
commite7fd6ed3875bd91dbd30a62291ae471c35da8fdf (patch)
tree06a694ac391095f16bd217dcd66446bade49ade6 /sql
parent7e44eabdad59993c504699e01d15ddb106f64e9b (diff)
downloadmariadb-git-e7fd6ed3875bd91dbd30a62291ae471c35da8fdf.tar.gz
MDEV-11240: Server crashes in check_view_single_update or Assertion `derived->table' failed in mysql_derived_merge_for_insert
Move table pointer for single table view (even if it is view over other view) to make the access universal.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_derived.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 20fca2de8cf..493f0eccc8c 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -525,7 +525,9 @@ bool mysql_derived_merge_for_insert(THD *thd, LEX *lex, TABLE_LIST *derived)
derived->schema_table= derived->merge_underlying_list->schema_table;
derived->merged_for_insert= TRUE;
}
- }
+ }
+ else
+ derived->table= derived->merge_underlying_list->table;
DBUG_RETURN(FALSE);
}