mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge remote-tracking branch 'shagalla/10.3-mdev12172' into 10.3
As a result of this merge the code for the following tasks appears in 10.3: - MDEV-12172 Implement tables specified by table value constructors - MDEV-12176 Transform [NOT] IN predicate with long list of values INTO [NOT] IN subquery.
This commit is contained in:
@ -702,6 +702,7 @@ typedef struct system_variables
|
||||
uint idle_write_transaction_timeout;
|
||||
uint column_compression_threshold;
|
||||
uint column_compression_zlib_level;
|
||||
ulong in_subquery_conversion_threshold;
|
||||
} SV;
|
||||
|
||||
/**
|
||||
@ -6232,6 +6233,64 @@ inline bool lex_string_eq(const LEX_CSTRING *a,
|
||||
return strcasecmp(a->str, b->str) != 0;
|
||||
}
|
||||
|
||||
class Type_holder: public Sql_alloc,
|
||||
public Item_args,
|
||||
public Type_handler_hybrid_field_type,
|
||||
public Type_all_attributes,
|
||||
public Type_geometry_attributes
|
||||
{
|
||||
TYPELIB *m_typelib;
|
||||
bool m_maybe_null;
|
||||
public:
|
||||
Type_holder()
|
||||
:m_typelib(NULL),
|
||||
m_maybe_null(false)
|
||||
{ }
|
||||
|
||||
void set_maybe_null(bool maybe_null_arg) { m_maybe_null= maybe_null_arg; }
|
||||
bool get_maybe_null() const { return m_maybe_null; }
|
||||
|
||||
uint decimal_precision() const
|
||||
{
|
||||
/*
|
||||
Type_holder is not used directly to create fields, so
|
||||
its virtual decimal_precision() is never called.
|
||||
We should eventually extend create_result_table() to accept
|
||||
an array of Type_holders directly, without having to allocate
|
||||
Item_type_holder's and put them into List<Item>.
|
||||
*/
|
||||
DBUG_ASSERT(0);
|
||||
return 0;
|
||||
}
|
||||
void set_geometry_type(uint type)
|
||||
{
|
||||
Type_geometry_attributes::set_geometry_type(type);
|
||||
}
|
||||
uint uint_geometry_type() const
|
||||
{
|
||||
return Type_geometry_attributes::get_geometry_type();
|
||||
}
|
||||
void set_typelib(TYPELIB *typelib)
|
||||
{
|
||||
m_typelib= typelib;
|
||||
}
|
||||
TYPELIB *get_typelib() const
|
||||
{
|
||||
return m_typelib;
|
||||
}
|
||||
|
||||
bool aggregate_attributes(THD *thd)
|
||||
{
|
||||
for (uint i= 0; i < arg_count; i++)
|
||||
m_maybe_null|= args[i]->maybe_null;
|
||||
return
|
||||
type_handler()->Item_hybrid_func_fix_attributes(thd,
|
||||
"UNION", this, this,
|
||||
args, arg_count);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* MYSQL_SERVER */
|
||||
|
||||
#endif /* SQL_CLASS_INCLUDED */
|
||||
|
Reference in New Issue
Block a user