1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.1' into 10.2

This commit is contained in:
Oleksandr Byelkin
2018-09-14 08:47:22 +02:00
321 changed files with 6852 additions and 195819 deletions

View File

@@ -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);