after merge fixes

This commit is contained in:
Sergei Golubchik 2018-06-03 21:28:50 +02:00
parent cab1d63826
commit c3a4dcd0f0
6 changed files with 26 additions and 40 deletions

View File

@ -7746,8 +7746,8 @@ Item *Item::build_pushable_cond(THD *thd,
if (new_cond->argument_list()->push_back(fix, thd->mem_root))
return 0;
}
if (is_fix_needed)
new_cond->fix_fields(thd, 0);
if (is_fix_needed && new_cond->fix_fields(thd, 0))
return 0;
switch (new_cond->argument_list()->elements)
{

View File

@ -966,10 +966,6 @@ public:
{
return NULL;
}
virtual uint field_flags() const
{
return 0;
}
const Type_handler *type_handler_for_comparison() const
{
return type_handler()->type_handler_for_comparison();
@ -1684,7 +1680,6 @@ public:
set field of temporary table for Item which can be switched on temporary
table during query processing (grouping and so on)
*/
virtual void set_result_field(Field *field) {}
virtual bool is_result_field() { return 0; }
virtual bool is_json_type() { return false; }
virtual bool is_bool_literal() const { return false; }
@ -2966,7 +2961,6 @@ public:
return table map of the temporary table.
*/
table_map used_tables() const { return 1; }
void set_result_field(Field *field) { result_field= field; }
bool is_result_field() { return true; }
void save_in_result_field(bool no_conversions)
{
@ -3433,17 +3427,10 @@ public:
Field *result_field;
Item_null_result(THD *thd): Item_null(thd), result_field(0) {}
bool is_result_field() { return result_field != 0; }
#if MARIADB_VERSION_ID < 100300
enum_field_types field_type() const
{
return result_field->type();
}
#else
const Type_handler *type_handler() const
{
return result_field->type_handler();
}
#endif
Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
const Tmp_field_param *param)
{

View File

@ -8018,21 +8018,6 @@ void st_select_lex::pushdown_cond_into_where_clause(THD *thd, Item *cond,
*remaining_cond= cond;
}
Item *LEX::create_item_qualified_asterisk(THD *thd,
const Lex_ident_sys_st *name)
{
Item *item;
if (!(item= new (thd->mem_root) Item_field(thd, current_context(),
NullS, name->str,
&star_clex_str)))
return NULL;
current_select->with_wild++;
return item;
}
Item *LEX::make_item_func_call_generic(THD *thd, Lex_ident_cli_st *cdb,
Lex_ident_cli_st *cname, List<Item> *args)
{
@ -8067,6 +8052,19 @@ Item *LEX::make_item_func_call_generic(THD *thd, Lex_ident_cli_st *cdb,
}
Item *LEX::create_item_qualified_asterisk(THD *thd,
const Lex_ident_sys_st *name)
{
Item *item;
if (!(item= new (thd->mem_root) Item_field(thd, current_context(),
NullS, name->str,
&star_clex_str)))
return NULL;
current_select->with_wild++;
return item;
}
Item *LEX::create_item_qualified_asterisk(THD *thd,
const Lex_ident_sys_st *a,
const Lex_ident_sys_st *b)

View File

@ -1750,7 +1750,7 @@ JOIN::optimize_inner()
if (select_lex->handle_derived(thd->lex, DT_OPTIMIZE))
DBUG_RETURN(1);
}
if (unlikely(thd->is_error()))
{
error= 1;
@ -17280,8 +17280,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
*/
item->marker == 4 || param->bit_fields_as_long,
force_copy_fields);
if (unlikely(!new_field))
if (!new_field)
{
if (unlikely(thd->is_fatal_error))
goto err; // Got OOM

View File

@ -6296,6 +6296,8 @@ bool Type_handler_geometry::
}
#endif
/***************************************************************************/
bool Type_handler::Vers_history_point_resolve_unit(THD *thd,
Vers_history_point *point)
const

View File

@ -2245,11 +2245,11 @@ int multi_update::prepare2(JOIN *join)
{
if (item_rowid_table(*it2) != tbl)
continue;
Item *fld= new (thd->mem_root)
Item_field(thd, (*it)->get_tmp_table_field());
Item_field *fld= new (thd->mem_root)
Item_field(thd, (*it)->get_tmp_table_field());
if (!fld)
return 1;
fld->set_result_field((*it2)->get_tmp_table_field());
fld->result_field= (*it2)->get_tmp_table_field();
*it2= fld;
}
}
@ -2636,10 +2636,10 @@ int multi_update::do_updates()
uint field_num= 0;
do
{
uchar *ref=
((Field_varstring *) tmp_table->field[field_num])->get_data();
if (unlikely((local_error=
tbl->file->ha_rnd_pos(tbl->record[0], ref))))
String rowid;
tmp_table->field[field_num]->val_str(&rowid);
if (unlikely((local_error= tbl->file->ha_rnd_pos(tbl->record[0],
(uchar*)rowid.ptr()))))
{
err_table= tbl;
goto err;