Skip to content

Commit f30676b

Browse files
Merge
1 parent 75de38a commit f30676b

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

sql/ha_ndbcluster.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,8 +1347,8 @@ Thd_ndb::Thd_ndb(THD* thd) :
13471347
m_pushed_queries_dropped= 0;
13481348
m_pushed_queries_executed= 0;
13491349
m_pushed_reads= 0;
1350-
bzero(m_transaction_no_hint_count, sizeof(m_transaction_no_hint_count));
1351-
bzero(m_transaction_hint_count, sizeof(m_transaction_hint_count));
1350+
memset(m_transaction_no_hint_count, 0, sizeof(m_transaction_no_hint_count));
1351+
memset(m_transaction_hint_count, 0, sizeof(m_transaction_hint_count));
13521352
global_schema_lock_trans= NULL;
13531353
global_schema_lock_count= 0;
13541354
global_schema_lock_error= 0;
@@ -6195,7 +6195,7 @@ void ha_ndbcluster::unpack_record(uchar *dst_row, const uchar *src_row)
61956195
production code.
61966196
*/
61976197
if (actual_length < field->pack_length())
6198-
bzero(field->ptr + actual_length,
6198+
memset(field->ptr + actual_length, 0,
61996199
field->pack_length() - actual_length);
62006200
#endif
62016201
field->move_field_offset(-dst_offset);
@@ -6259,7 +6259,7 @@ static void get_default_value(void *def_val, Field *field)
62596259
memcpy(def_val, src_ptr, actual_length);
62606260
#ifdef HAVE_purify
62616261
if (actual_length < field->pack_length())
6262-
bzero(((char*)def_val) + actual_length,
6262+
memset(((char*)def_val) + actual_length, 0,
62636263
field->pack_length() - actual_length);
62646264
#endif
62656265
}
@@ -7068,7 +7068,7 @@ void ha_ndbcluster::get_dynamic_partition_info(PARTITION_STATS *stat_info,
70687068
{
70697069
DBUG_PRINT("info", ("ha_ndbcluster::get_dynamic_partition_info"));
70707070

7071-
memset((char*) stat_info, 0, sizeof(PARTITION_STATS));
7071+
memset(stat_info, 0, sizeof(PARTITION_STATS));
70727072
int error = 0;
70737073
THD *thd = table->in_use;
70747074

sql/ha_ndbcluster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ struct Ndb_local_table_statistics {
216216
#include "ndb_thd_ndb.h"
217217

218218
struct st_ndb_status {
219-
st_ndb_status() { bzero(this, sizeof(struct st_ndb_status)); }
219+
st_ndb_status() { memset(this, 0, sizeof(struct st_ndb_status)); }
220220
long cluster_node_id;
221221
const char * connected_host;
222222
long connected_port;

sql/ha_ndbcluster_binlog.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2887,7 +2887,7 @@ ndb_binlog_thread_handle_schema_event_post_epoch(THD *thd,
28872887
}
28882888
{
28892889
TABLE_LIST table_list;
2890-
bzero((char*) &table_list,sizeof(table_list));
2890+
memset(&table_list, 0, sizeof(table_list));
28912891
table_list.db= schema->db;
28922892
table_list.alias= table_list.table_name= schema->name;
28932893
close_cached_tables(thd, &table_list, FALSE, FALSE, FALSE);
@@ -2992,7 +2992,7 @@ ndb_binlog_thread_handle_schema_event_post_epoch(THD *thd,
29922992
remote on-line alter table
29932993
*/
29942994
TABLE_LIST table_list;
2995-
bzero((char*) &table_list,sizeof(table_list));
2995+
memset(&table_list, 0, sizeof(table_list));
29962996
table_list.db= (char *)schema->db;
29972997
table_list.alias= table_list.table_name= (char *)schema->name;
29982998
close_cached_tables(thd, &table_list, TRUE, FALSE, FALSE);
@@ -3504,7 +3504,7 @@ inline void slave_reset_conflict_fn(NDB_SHARE *share)
35043504
NDB_CONFLICT_FN_SHARE *cfn_share= share->m_cfn_share;
35053505
if (cfn_share)
35063506
{
3507-
bzero((char*)cfn_share, sizeof(*cfn_share));
3507+
memset(cfn_share, 0, sizeof(*cfn_share));
35083508
}
35093509
}
35103510

@@ -5828,7 +5828,7 @@ ndb_find_binlog_index_row(ndb_binlog_index_row **rows,
58285828
if (row == NULL)
58295829
{
58305830
row= (ndb_binlog_index_row*)sql_alloc(sizeof(ndb_binlog_index_row));
5831-
bzero((char*)row, sizeof(ndb_binlog_index_row));
5831+
memset(row, 0, sizeof(ndb_binlog_index_row));
58325832
row->next= first;
58335833
*rows= row;
58345834
if (found_id)
@@ -6895,7 +6895,7 @@ ndb_binlog_thread_func(void *arg)
68956895
DBUG_PRINT("info", ("Initializing transaction"));
68966896
inj->new_trans(thd, &trans);
68976897
rows= &_row;
6898-
bzero((char*)&_row, sizeof(_row));
6898+
memset(&_row, 0, sizeof(_row));
68996899
thd->variables.character_set_client= &my_charset_latin1;
69006900
goto commit_to_binlog;
69016901
}

0 commit comments

Comments
 (0)