Skip to content
Permalink
Browse files
Fix InnoDB/XtraDB warnings by GCC 8.2.0
  • Loading branch information
dr-m committed Jul 30, 2018
1 parent 8bdd125 commit d17e9a0
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 60 deletions.
@@ -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,15 +2145,15 @@ 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,
xid->gtrid_length + xid->bqual_length) == 0) {

/* 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,15 +2421,15 @@ 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,
xid->gtrid_length + xid->bqual_length) == 0) {

/* 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);

0 comments on commit d17e9a0

Please sign in to comment.