Commit 9a01a01d authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #6220 compile handlerton with gcc 4.4

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@54309 c7de825b-a66e-492c-adef-691d508d4ae1
parent 643ca3b7
...@@ -1281,14 +1281,7 @@ static int tokudb_report_fractal_tree_block_map_iterator(uint64_t checkpoint_cou ...@@ -1281,14 +1281,7 @@ static int tokudb_report_fractal_tree_block_map_iterator(uint64_t checkpoint_cou
static int tokudb_report_fractal_tree_block_map_for_db(const DBT *dname, const DBT *iname, TABLE *table, THD *thd) { static int tokudb_report_fractal_tree_block_map_for_db(const DBT *dname, const DBT *iname, TABLE *table, THD *thd) {
int error; int error;
DB *db; DB *db;
struct tokudb_report_fractal_tree_block_map_iterator_extra e = { struct tokudb_report_fractal_tree_block_map_iterator_extra e = {}; // avoid struct initializers so that we can compile with older gcc versions
.num_rows = 0,
.i = 0,
.checkpoint_counts = NULL,
.blocknums = NULL,
.diskoffs = NULL,
.sizes = NULL,
};
error = db_create(&db, db_env, 0); error = db_create(&db, db_env, 0);
if (error) { if (error) {
......
int TOKUDB_SHARE::get_status(DB_TXN *txn, HA_METADATA_KEY k, DBT *val) { int TOKUDB_SHARE::get_status(DB_TXN *txn, HA_METADATA_KEY k, DBT *val) {
DBT key = { .data = &k, .size = sizeof k }; DBT key = {}; key.data = &k; key.size = sizeof k;
int error = status_block->get(status_block, txn, &key, val, 0); int error = status_block->get(status_block, txn, &key, val, 0);
return error; return error;
} }
int TOKUDB_SHARE::get_status(DB_TXN *txn, HA_METADATA_KEY k, void *p, size_t s) { int TOKUDB_SHARE::get_status(DB_TXN *txn, HA_METADATA_KEY k, void *p, size_t s) {
DBT key = { .data = &k, .size = sizeof k }; DBT key = {}; key.data = &k; key.size = sizeof k;
DBT val = { .data = p, .size = (uint32_t) s, }; val.flags = DB_DBT_USERMEM; DBT val = {}; val.data = p; val.size = (uint32_t) s; val.flags = DB_DBT_USERMEM;
int error = status_block->get(status_block, txn, &key, &val, 0); int error = status_block->get(status_block, txn, &key, &val, 0);
return error; return error;
} }
int TOKUDB_SHARE::put_status(DB_TXN *txn, HA_METADATA_KEY k, void *p, size_t s) { int TOKUDB_SHARE::put_status(DB_TXN *txn, HA_METADATA_KEY k, void *p, size_t s) {
DBT key = { .data = &k, .size = sizeof k }; DBT key = {}; key.data = &k; key.size = sizeof k;
DBT val = { .data = p, .size = (uint32_t) s }; DBT val = {}; val.data = p; val.size = (uint32_t) s;
int error = status_block->put(status_block, txn, &key, &val, 0); int error = status_block->put(status_block, txn, &key, &val, 0);
return error; return error;
} }
int TOKUDB_SHARE::delete_status(DB_TXN *txn, HA_METADATA_KEY k) { int TOKUDB_SHARE::delete_status(DB_TXN *txn, HA_METADATA_KEY k) {
DBT key = { .data = &k, .size = sizeof k }; DBT key = {}; key.data = &k; key.size = sizeof k;
int error = status_block->del(status_block, txn, &key, DB_DELETE_ANY); int error = status_block->del(status_block, txn, &key, DB_DELETE_ANY);
return error; return error;
} }
......
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