diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-09-14 08:47:22 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-09-14 08:47:22 +0200 |
commit | 28f08d3753eb10a1393a63e6c581d43aad9f93b9 (patch) | |
tree | 86c9df8c3fb6d4ebd99d431697c84f06ef242989 /sql/table.h | |
parent | 38665893087e20c3ad65d5b0e227a75185a4865e (diff) | |
parent | f1bcfbb4373e40dda2c18c137f76fc6ff32e1a45 (diff) | |
download | mariadb-git-28f08d3753eb10a1393a63e6c581d43aad9f93b9.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/sql/table.h b/sql/table.h index c0cca1026ea..fc3102fc9a5 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1507,6 +1507,7 @@ typedef struct st_foreign_key_info } FOREIGN_KEY_INFO; LEX_CSTRING *fk_option_name(enum_fk_option opt); +bool fk_modifies_child(enum_fk_option opt); #define MY_I_S_MAYBE_NULL 1U #define MY_I_S_UNSIGNED 2U @@ -1755,6 +1756,14 @@ struct TABLE_LIST const char *alias_arg, enum thr_lock_type lock_type_arg) { + enum enum_mdl_type mdl_type; + if (lock_type_arg >= TL_WRITE_ALLOW_WRITE) + mdl_type= MDL_SHARED_WRITE; + else if (lock_type_arg == TL_READ_NO_INSERT) + mdl_type= MDL_SHARED_NO_WRITE; + else + mdl_type= MDL_SHARED_READ; + bzero((char*) this, sizeof(*this)); db= (char*) db_name_arg; db_length= db_length_arg; @@ -1762,10 +1771,7 @@ struct TABLE_LIST table_name_length= table_name_length_arg; alias= (char*) (alias_arg ? alias_arg : table_name_arg); lock_type= lock_type_arg; - mdl_request.init(MDL_key::TABLE, db, table_name, - (lock_type >= TL_WRITE_ALLOW_WRITE) ? - MDL_SHARED_WRITE : MDL_SHARED_READ, - MDL_TRANSACTION); + mdl_request.init(MDL_key::TABLE, db, table_name, mdl_type, MDL_TRANSACTION); } inline void init_one_table_for_prelocking(const char *db_name_arg, @@ -1792,6 +1798,7 @@ struct TABLE_LIST *last_ptr= &next_global; } + /* List of tables local to a subquery (used by SQL_I_List). Considers views as leaves (unlike 'next_leaf' below). Created at parse time @@ -2402,6 +2409,16 @@ struct TABLE_LIST void check_pushable_cond_for_table(Item *cond); Item *build_pushable_cond_for_table(THD *thd, Item *cond); + void remove_join_columns() + { + if (join_columns) + { + join_columns->empty(); + join_columns= NULL; + is_join_columns_complete= FALSE; + } + } + private: bool prep_check_option(THD *thd, uint8 check_opt_type); bool prep_where(THD *thd, Item **conds, bool no_where_clause); |