Commit 3e47b41a authored by Alexander Barkov's avatar Alexander Barkov

MDEV-17542 10.3: gcc-8.0 produces lots of -Wclass-memaccess warnings in...

MDEV-17542 10.3: gcc-8.0 produces lots of -Wclass-memaccess warnings in Table_scope_and_contents_source_st
parent 554ce5a0
...@@ -6954,7 +6954,7 @@ bool Vers_parse_info::fix_implicit(THD *thd, Alter_info *alter_info) ...@@ -6954,7 +6954,7 @@ bool Vers_parse_info::fix_implicit(THD *thd, Alter_info *alter_info)
return false; return false;
} }
bool Table_scope_and_contents_source_st::vers_native(THD *thd) const bool Table_scope_and_contents_source_pod_st::vers_native(THD *thd) const
{ {
if (ha_check_storage_engine_flag(db_type, HTON_NATIVE_SYS_VERSIONING)) if (ha_check_storage_engine_flag(db_type, HTON_NATIVE_SYS_VERSIONING))
return true; return true;
......
...@@ -1906,6 +1906,8 @@ enum vers_sys_type_t ...@@ -1906,6 +1906,8 @@ enum vers_sys_type_t
VERS_TRX_ID VERS_TRX_ID
}; };
extern const LEX_CSTRING null_clex_str;
struct Vers_parse_info struct Vers_parse_info
{ {
Vers_parse_info() : Vers_parse_info() :
...@@ -1914,6 +1916,15 @@ struct Vers_parse_info ...@@ -1914,6 +1916,15 @@ struct Vers_parse_info
unversioned_fields(false) unversioned_fields(false)
{} {}
void init() // Deep initialization
{
system_time= start_end_t(null_clex_str, null_clex_str);
as_row= start_end_t(null_clex_str, null_clex_str);
check_unit= VERS_UNDEFINED;
versioned_fields= false;
unversioned_fields= false;
}
struct start_end_t struct start_end_t
{ {
start_end_t() start_end_t()
...@@ -1993,7 +2004,7 @@ struct Vers_parse_info ...@@ -1993,7 +2004,7 @@ struct Vers_parse_info
- [AS] SELECT ... // Copy structure from a subquery - [AS] SELECT ... // Copy structure from a subquery
*/ */
struct Table_scope_and_contents_source_st struct Table_scope_and_contents_source_pod_st // For trivial members
{ {
CHARSET_INFO *table_charset; CHARSET_INFO *table_charset;
LEX_CUSTRING tabledef_version; LEX_CUSTRING tabledef_version;
...@@ -2019,7 +2030,6 @@ struct Table_scope_and_contents_source_st ...@@ -2019,7 +2030,6 @@ struct Table_scope_and_contents_source_st
uint options; /* OR of HA_CREATE_ options */ uint options; /* OR of HA_CREATE_ options */
uint merge_insert_method; uint merge_insert_method;
uint extra_size; /* length of extra data segment */ uint extra_size; /* length of extra data segment */
SQL_I_List<TABLE_LIST> merge_list;
handlerton *db_type; handlerton *db_type;
/** /**
Row type of the table definition. Row type of the table definition.
...@@ -2053,15 +2063,6 @@ struct Table_scope_and_contents_source_st ...@@ -2053,15 +2063,6 @@ struct Table_scope_and_contents_source_st
bool table_was_deleted; bool table_was_deleted;
sequence_definition *seq_create_info; sequence_definition *seq_create_info;
Vers_parse_info vers_info;
bool vers_fix_system_fields(THD *thd, Alter_info *alter_info,
const TABLE_LIST &create_table,
bool create_select= false);
bool vers_check_system_fields(THD *thd, Alter_info *alter_info,
const TABLE_LIST &create_table);
bool vers_native(THD *thd) const; bool vers_native(THD *thd) const;
void init() void init()
...@@ -2082,6 +2083,30 @@ struct Table_scope_and_contents_source_st ...@@ -2082,6 +2083,30 @@ struct Table_scope_and_contents_source_st
}; };
struct Table_scope_and_contents_source_st:
public Table_scope_and_contents_source_pod_st
{
SQL_I_List<TABLE_LIST> merge_list;
Vers_parse_info vers_info;
void init()
{
Table_scope_and_contents_source_pod_st::init();
merge_list.empty();
vers_info.init();
}
bool vers_fix_system_fields(THD *thd, Alter_info *alter_info,
const TABLE_LIST &create_table,
bool create_select= false);
bool vers_check_system_fields(THD *thd, Alter_info *alter_info,
const TABLE_LIST &create_table);
};
/** /**
This struct is passed to handler table routines, e.g. ha_create(). This struct is passed to handler table routines, e.g. ha_create().
It does not include the "OR REPLACE" and "IF NOT EXISTS" parts, as these It does not include the "OR REPLACE" and "IF NOT EXISTS" parts, as these
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment