diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-07-03 10:22:43 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-07-03 10:22:43 +0300 |
commit | c3289d27eef39a47fed2ce1ff239013ed6870f39 (patch) | |
tree | 2a6e2434287921eb6f5f7c7877e8da061803ed9e /sql/sql_base.cc | |
parent | 358ae4b46dd52b329154cff901b58e96fd223773 (diff) | |
parent | eaab98f7022732b26b4ea590e1bb44308e253be8 (diff) | |
download | mariadb-git-c3289d27eef39a47fed2ce1ff239013ed6870f39.tar.gz |
Merge mariadb-10.3.8 into 10.3
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 80939cbe59b..490f21aa950 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1572,6 +1572,12 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx) DBUG_RETURN(true); } + if (!table_list->db.str) + { + my_error(ER_NO_DB_ERROR, MYF(0)); + DBUG_RETURN(true); + } + key_length= get_table_def_key(table_list, &key); /* @@ -5601,6 +5607,9 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name, si column reference. See create_view_field() for details. */ item= nj_col->create_item(thd); + if (!item) + DBUG_RETURN(NULL); + /* *ref != NULL means that *ref contains the item that we need to replace. If the item was aliased by the user, set the alias to |