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