summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@localhost.localdomain>2018-10-25 12:07:23 +0400
committerAlexander Barkov <bar@localhost.localdomain>2018-10-25 14:07:31 +0400
commit3e47b41a16b5e2212290e719dc101ea46de8e400 (patch)
treec1466a1769f2f3b386e4df433b4084dddfdb24f8 /sql/handler.h
parent554ce5a0ccc64881e04da69d7a2da3ace60589a6 (diff)
downloadmariadb-git-3e47b41a16b5e2212290e719dc101ea46de8e400.tar.gz
MDEV-17542 10.3: gcc-8.0 produces lots of -Wclass-memaccess warnings in Table_scope_and_contents_source_st
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h47
1 files changed, 36 insertions, 11 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 8f31f741eab..d2d49b4601c 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1906,6 +1906,8 @@ enum vers_sys_type_t
VERS_TRX_ID
};
+extern const LEX_CSTRING null_clex_str;
+
struct Vers_parse_info
{
Vers_parse_info() :
@@ -1914,6 +1916,15 @@ struct Vers_parse_info
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
{
start_end_t()
@@ -1993,7 +2004,7 @@ public:
- [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;
LEX_CUSTRING tabledef_version;
@@ -2019,7 +2030,6 @@ struct Table_scope_and_contents_source_st
uint options; /* OR of HA_CREATE_ options */
uint merge_insert_method;
uint extra_size; /* length of extra data segment */
- SQL_I_List<TABLE_LIST> merge_list;
handlerton *db_type;
/**
Row type of the table definition.
@@ -2053,15 +2063,6 @@ struct Table_scope_and_contents_source_st
bool table_was_deleted;
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;
void init()
@@ -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().
It does not include the "OR REPLACE" and "IF NOT EXISTS" parts, as these