mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
This commit is contained in:
@ -3460,7 +3460,7 @@ static bool show_status_array(THD *thd, const char *wild,
|
||||
prefix_end=strnmov(name_buffer, prefix, sizeof(name_buffer)-1);
|
||||
if (*prefix)
|
||||
*prefix_end++= '_';
|
||||
len=name_buffer + sizeof(name_buffer) - prefix_end;
|
||||
len=(int)(name_buffer + sizeof(name_buffer) - prefix_end);
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
bool is_wsrep_var= FALSE;
|
||||
@ -3803,6 +3803,15 @@ bool uses_only_table_name_fields(Item *item, TABLE_LIST *table)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (item->type() == Item::ROW_ITEM)
|
||||
{
|
||||
Item_row *item_row= static_cast<Item_row*>(item);
|
||||
for (uint i= 0; i < item_row->cols(); i++)
|
||||
{
|
||||
if (!uses_only_table_name_fields(item_row->element_index(i), table))
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (item->type() == Item::FIELD_ITEM)
|
||||
{
|
||||
Item_field *item_field= (Item_field*)item;
|
||||
@ -3822,6 +3831,11 @@ bool uses_only_table_name_fields(Item *item, TABLE_LIST *table)
|
||||
item_field->field_name.length)))
|
||||
return 0;
|
||||
}
|
||||
else if (item->type() == Item::EXPR_CACHE_ITEM)
|
||||
{
|
||||
Item_cache_wrapper *tmp= static_cast<Item_cache_wrapper*>(item);
|
||||
return uses_only_table_name_fields(tmp->get_orig_item(), table);
|
||||
}
|
||||
else if (item->type() == Item::REF_ITEM)
|
||||
return uses_only_table_name_fields(item->real_item(), table);
|
||||
|
||||
@ -5435,7 +5449,7 @@ static void store_column_type(TABLE *table, Field *field, CHARSET_INFO *cs,
|
||||
*/
|
||||
tmp_buff= strchr(column_type.c_ptr_safe(), ' ');
|
||||
table->field[offset]->store(column_type.ptr(),
|
||||
(tmp_buff ? tmp_buff - column_type.ptr() :
|
||||
(tmp_buff ? (uint)(tmp_buff - column_type.ptr()) :
|
||||
column_type.length()), cs);
|
||||
|
||||
is_blob= (field->type() == MYSQL_TYPE_BLOB);
|
||||
@ -6405,7 +6419,7 @@ static int get_schema_views_record(THD *thd, TABLE_LIST *tables,
|
||||
table->field[5]->store(STRING_WITH_LEN("NO"), cs);
|
||||
}
|
||||
|
||||
definer_len= (strxmov(definer, tables->definer.user.str, "@",
|
||||
definer_len= (uint)(strxmov(definer, tables->definer.user.str, "@",
|
||||
tables->definer.host.str, NullS) - definer);
|
||||
table->field[6]->store(definer, definer_len, cs);
|
||||
if (tables->view_suid)
|
||||
|
Reference in New Issue
Block a user