Commit d17e9a02 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix InnoDB/XtraDB warnings by GCC 8.2.0

parent 8bdd1250
......@@ -203,7 +203,7 @@ buf_dump(
#define SHOULD_QUIT() (SHUTTING_DOWN() && obey_shutdown)
char full_filename[OS_FILE_MAX_PATH];
char tmp_filename[OS_FILE_MAX_PATH];
char tmp_filename[OS_FILE_MAX_PATH + sizeof "incomplete"];
char now[32];
FILE* f;
ulint i;
......
......@@ -1452,19 +1452,16 @@ i_s_cmp_fill_low(
clear it. We could introduce mutex protection, but it
could cause a measureable performance hit in
page0zip.cc. */
table->field[1]->store(
static_cast<double>(zip_stat->compressed));
table->field[2]->store(
static_cast<double>(zip_stat->compressed_ok));
table->field[3]->store(
static_cast<double>(zip_stat->compressed_usec / 1000000));
table->field[4]->store(
static_cast<double>(zip_stat->decompressed));
table->field[5]->store(
static_cast<double>(zip_stat->decompressed_usec / 1000000));
table->field[1]->store(zip_stat->compressed, true);
table->field[2]->store(zip_stat->compressed_ok, true);
table->field[3]->store(zip_stat->compressed_usec / 1000000,
true);
table->field[4]->store(zip_stat->decompressed, true);
table->field[5]->store(zip_stat->decompressed_usec / 1000000,
true);
if (reset) {
memset(zip_stat, 0, sizeof *zip_stat);
new (zip_stat) page_zip_stat_t();
}
if (schema_table_store_record(thd, table)) {
......
......@@ -105,18 +105,18 @@ struct row_index_t {
struct row_import {
row_import() UNIV_NOTHROW
:
m_table(),
m_version(),
m_hostname(),
m_table_name(),
m_autoinc(),
m_page_size(),
m_flags(),
m_n_cols(),
m_cols(),
m_col_names(),
m_n_indexes(),
m_indexes(),
m_table(NULL),
m_version(0),
m_hostname(NULL),
m_table_name(NULL),
m_autoinc(0),
m_page_size(0),
m_flags(0),
m_n_cols(0),
m_cols(NULL),
m_col_names(NULL),
m_n_indexes(0),
m_indexes(NULL),
m_missing(true) { }
~row_import() UNIV_NOTHROW;
......@@ -3558,8 +3558,6 @@ row_import_for_mysql(
row_import cfg;
memset(&cfg, 0x0, sizeof(cfg));
err = row_import_read_cfg(table, trx->mysql_thd, cfg);
/* Check if the table column definitions match the contents
......
......@@ -2145,6 +2145,7 @@ trx_get_trx_by_xid_low(
if (trx->is_recovered
&& trx_state_eq(trx, TRX_STATE_PREPARED)
&& !trx->xid.is_null()
&& xid->gtrid_length == trx->xid.gtrid_length
&& xid->bqual_length == trx->xid.bqual_length
&& memcmp(xid->data, trx->xid.data,
......@@ -2152,8 +2153,7 @@ trx_get_trx_by_xid_low(
/* Invalidate the XID, so that subsequent calls
will not find it. */
memset(&trx->xid, 0, sizeof(trx->xid));
trx->xid.formatID = -1;
trx->xid.null();
break;
}
}
......
......@@ -1314,8 +1314,7 @@ trx_undo_mem_create_at_db_start(
/* Read X/Open XA transaction identification if it exists, or
set it to NULL. */
memset(&xid, 0, sizeof(xid));
xid.formatID = -1;
xid.null();
if (xid_exists == TRUE) {
trx_undo_read_xid(undo_header, &xid);
......
......@@ -203,7 +203,7 @@ buf_dump(
#define SHOULD_QUIT() (SHUTTING_DOWN() && obey_shutdown)
char full_filename[OS_FILE_MAX_PATH];
char tmp_filename[OS_FILE_MAX_PATH];
char tmp_filename[OS_FILE_MAX_PATH + sizeof "incomplete"];
char now[32];
FILE* f;
ulint i;
......
......@@ -1458,19 +1458,16 @@ i_s_cmp_fill_low(
clear it. We could introduce mutex protection, but it
could cause a measureable performance hit in
page0zip.cc. */
table->field[1]->store(
static_cast<double>(zip_stat->compressed));
table->field[2]->store(
static_cast<double>(zip_stat->compressed_ok));
table->field[3]->store(
static_cast<double>(zip_stat->compressed_usec / 1000000));
table->field[4]->store(
static_cast<double>(zip_stat->decompressed));
table->field[5]->store(
static_cast<double>(zip_stat->decompressed_usec / 1000000));
table->field[1]->store(zip_stat->compressed, true);
table->field[2]->store(zip_stat->compressed_ok, true);
table->field[3]->store(zip_stat->compressed_usec / 1000000,
true);
table->field[4]->store(zip_stat->decompressed, true);
table->field[5]->store(zip_stat->decompressed_usec / 1000000,
true);
if (reset) {
memset(zip_stat, 0, sizeof *zip_stat);
new (zip_stat) page_zip_stat_t();
}
if (schema_table_store_record(thd, table)) {
......
......@@ -105,18 +105,18 @@ struct row_index_t {
struct row_import {
row_import() UNIV_NOTHROW
:
m_table(),
m_version(),
m_hostname(),
m_table_name(),
m_autoinc(),
m_page_size(),
m_flags(),
m_n_cols(),
m_cols(),
m_col_names(),
m_n_indexes(),
m_indexes(),
m_table(NULL),
m_version(0),
m_hostname(NULL),
m_table_name(NULL),
m_autoinc(0),
m_page_size(0),
m_flags(0),
m_n_cols(0),
m_cols(NULL),
m_col_names(NULL),
m_n_indexes(0),
m_indexes(NULL),
m_missing(true) { }
~row_import() UNIV_NOTHROW;
......@@ -3558,8 +3558,6 @@ row_import_for_mysql(
row_import cfg;
memset(&cfg, 0x0, sizeof(cfg));
err = row_import_read_cfg(table, trx->mysql_thd, cfg);
/* Check if the table column definitions match the contents
......
......@@ -2421,6 +2421,7 @@ trx_get_trx_by_xid_low(
if (trx->is_recovered
&& trx_state_eq(trx, TRX_STATE_PREPARED)
&& !trx->xid.is_null()
&& xid->gtrid_length == trx->xid.gtrid_length
&& xid->bqual_length == trx->xid.bqual_length
&& memcmp(xid->data, trx->xid.data,
......@@ -2428,8 +2429,7 @@ trx_get_trx_by_xid_low(
/* Invalidate the XID, so that subsequent calls
will not find it. */
memset(&trx->xid, 0, sizeof(trx->xid));
trx->xid.formatID = -1;
trx->xid.null();
break;
}
}
......
......@@ -1314,8 +1314,7 @@ trx_undo_mem_create_at_db_start(
/* Read X/Open XA transaction identification if it exists, or
set it to NULL. */
memset(&xid, 0, sizeof(xid));
xid.formatID = -1;
xid.null();
if (xid_exists == TRUE) {
trx_undo_read_xid(undo_header, &xid);
......
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