diff options
author | Eugene Kosov <claprix@yandex.ru> | 2018-05-22 22:32:14 +0300 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-05-23 18:06:51 +0400 |
commit | c13e3c37be4fd5252ce0cad45b616815b236272a (patch) | |
tree | d8fb356671b8a916a3961fb8326b4dcc5a1338ae /sql | |
parent | 611488e3d9029f617884e10e47da208b0a77efec (diff) | |
download | mariadb-git-c13e3c37be4fd5252ce0cad45b616815b236272a.tar.gz |
cleanup TABLE_LIST
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_insert.cc | 6 | ||||
-rw-r--r-- | sql/table.cc | 5 | ||||
-rw-r--r-- | sql/table.h | 5 |
3 files changed, 5 insertions, 11 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index b03cde54abb..4187cb19c59 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -749,12 +749,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, table_list->table_name.str); DBUG_RETURN(TRUE); } - /* - mark the table_list as a target for insert, to skip the DT/view prepare phase - for correct access rights checks - TODO: remove this hack - */ - table_list->skip_prepare_derived= TRUE; if (table_list->lock_type == TL_WRITE_DELAYED) { diff --git a/sql/table.cc b/sql/table.cc index ced8f8c0ae8..6d4387aba8a 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -8275,7 +8275,10 @@ bool TABLE_LIST::change_refs_to_fields() if (!used_items.elements) return FALSE; - materialized_items= (Item**)thd->calloc(sizeof(void*) * table->s->fields); + Item **materialized_items= + (Item **)thd->calloc(sizeof(void *) * table->s->fields); + if (!materialized_items) + return TRUE; while ((ref= (Item_direct_ref*)li++)) { diff --git a/sql/table.h b/sql/table.h index 977c247d1a1..6655346cd45 100644 --- a/sql/table.h +++ b/sql/table.h @@ -2268,7 +2268,7 @@ struct TABLE_LIST /* TABLE_TYPE_UNKNOWN if any type is acceptable */ Table_type required_type; handlerton *db_type; /* table_type for handler */ - char timestamp_buffer[20]; /* buffer for timestamp (19+1) */ + char timestamp_buffer[MAX_DATETIME_WIDTH + 1]; /* This TABLE_LIST object is just placeholder for prelocking, it will be used for implicit LOCK TABLES only and won't be used in real statement. @@ -2300,8 +2300,6 @@ struct TABLE_LIST /* TODO: replace with derived_type */ bool merged; bool merged_for_insert; - /* TRUE <=> don't prepare this derived table/view as it should be merged.*/ - bool skip_prepare_derived; bool sequence; /* Part of NEXTVAL/CURVAL/LASTVAL */ /* @@ -2311,7 +2309,6 @@ struct TABLE_LIST List<Item> used_items; /* Sublist (tail) of persistent used_items */ List<Item> persistent_used_items; - Item **materialized_items; /* View creation context. */ |