~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log_event.cc

  • Committer: Monty Taylor
  • Date: 2008-10-06 01:30:47 UTC
  • Revision ID: monty@inaugust.com-20081006013047-6m2ejc0c4peye2k9
Removed my_free(). It turns out that it had been def'd to ignore the flags passed to it in the second arg anyway. Gotta love that.

Show diffs side-by-side

added added

removed removed

Lines of Context:
992
992
    sql_print_error(_("Error in Log_event::read_log_event(): "
993
993
                    "'%s', data_len: %d, event_type: %d"),
994
994
                    error,data_len,head[EVENT_TYPE_OFFSET]);
995
 
    my_free(buf, MYF(MY_ALLOW_ZERO_PTR));
 
995
    free(buf);
996
996
    /*
997
997
      The SQL slave thread will check if file->error<0 to know
998
998
      if there was an I/O error. Even if there is no "low-level" I/O errors
1297
1297
  if (!more)
1298
1298
    my_b_printf(file, "'%s\n", print_event_info->delimiter);
1299
1299
 
1300
 
  my_free(tmp_str, MYF(0));
 
1300
  free(tmp_str);
1301
1301
  return;
1302
1302
}
1303
1303
 
1376
1376
    pos+= q_len;
1377
1377
  }
1378
1378
  protocol->store(buf, pos-buf, &my_charset_bin);
1379
 
  my_free(buf, MYF(MY_ALLOW_ZERO_PTR));
 
1379
  free(buf);
1380
1380
}
1381
1381
#endif
1382
1382
 
2835
2835
    if (number_of_event_types != 22)
2836
2836
    {
2837
2837
      /* this makes is_valid() return false. */
2838
 
      my_free(post_header_len, MYF(MY_ALLOW_ZERO_PTR));
 
2838
      free(post_header_len);
2839
2839
      post_header_len= NULL;
2840
2840
      return;
2841
2841
    }
3134
3134
    return;
3135
3135
  print_query(true, buf, &end, 0, 0);
3136
3136
  protocol->store(buf, end-buf, &my_charset_bin);
3137
 
  my_free(buf, MYF(0));
 
3137
  free(buf);
3138
3138
}
3139
3139
#endif /* defined(HAVE_REPLICATION) && !defined(DRIZZLE_CLIENT) */
3140
3140
 
4357
4357
  buf[2+name_len]= '`';
4358
4358
  buf[3+name_len]= '=';
4359
4359
  protocol->store(buf, event_len, &my_charset_bin);
4360
 
  my_free(buf, MYF(0));
 
4360
  free(buf);
4361
4361
}
4362
4362
#endif /* !DRIZZLE_CLIENT */
4363
4363
 
4733
4733
 
4734
4734
Slave_log_event::~Slave_log_event()
4735
4735
{
4736
 
  my_free(mem_pool, MYF(MY_ALLOW_ZERO_PTR));
 
4736
  free(mem_pool);
4737
4737
}
4738
4738
 
4739
4739
 
5522
5522
      rli->report(ERROR_LEVEL, rli->last_error().number,
5523
5523
                  _("%s. Failed executing load from '%s'"),
5524
5524
                  tmp, fname);
5525
 
      my_free(tmp,MYF(0));
 
5525
      free(tmp);
5526
5526
    }
5527
5527
    goto err;
5528
5528
  }
5727
5727
  pos= my_stpcpy(pos, " ;file_id=");
5728
5728
  pos= int10_to_str((long) file_id, pos, 10);
5729
5729
  protocol->store(buf, pos-buf, &my_charset_bin);
5730
 
  my_free(buf, MYF(MY_ALLOW_ZERO_PTR));
 
5730
  free(buf);
5731
5731
}
5732
5732
 
5733
5733
 
5785
5785
  if (!error)
5786
5786
    (void) my_delete(fname, MYF(MY_WME));
5787
5787
 
5788
 
  my_free(buf, MYF(MY_ALLOW_ZERO_PTR));
 
5788
  free(buf);
5789
5789
  return error;
5790
5790
}
5791
5791
#endif
6030
6030
Rows_log_event::~Rows_log_event()
6031
6031
{
6032
6032
  if (m_cols.bitmap == m_bitbuf) // no my_malloc happened
6033
 
    m_cols.bitmap= 0; // so no my_free in bitmap_free
 
6033
    m_cols.bitmap= 0; // so no free in bitmap_free
6034
6034
  bitmap_free(&m_cols); // To pair with bitmap_init().
6035
 
  my_free((uchar*)m_rows_buf, MYF(MY_ALLOW_ZERO_PTR));
 
6035
  free((uchar*)m_rows_buf);
6036
6036
}
6037
6037
 
6038
6038
int Rows_log_event::get_data_size()
6942
6942
 
6943
6943
Table_map_log_event::~Table_map_log_event()
6944
6944
{
6945
 
  my_free(m_meta_memory, MYF(MY_ALLOW_ZERO_PTR));
6946
 
  my_free(m_memory, MYF(MY_ALLOW_ZERO_PTR));
 
6945
  free(m_meta_memory);
 
6946
  free(m_memory);
6947
6947
}
6948
6948
 
6949
6949
/*
6993
6993
  if (!rpl_filter->db_ok(table_list->db) ||
6994
6994
      (rpl_filter->is_on() && !rpl_filter->tables_ok("", table_list)))
6995
6995
  {
6996
 
    my_free(memory, MYF(MY_WME));
 
6996
    free(memory);
6997
6997
  }
6998
6998
  else
6999
6999
  {
7090
7090
  return(error);
7091
7091
 
7092
7092
err:
7093
 
  my_free(memory, MYF(MY_WME));
 
7093
  free(memory);
7094
7094
  return(error);
7095
7095
}
7096
7096
 
7934
7934
{
7935
7935
  /*error= ToDo:find out what this should really be, this triggers close_scan in nbd, returning error?*/
7936
7936
  m_table->file->ha_index_or_rnd_end();
7937
 
  my_free(m_key, MYF(MY_ALLOW_ZERO_PTR));
 
7937
  free(m_key);
7938
7938
  m_key= NULL;
7939
7939
 
7940
7940
  return error;
8004
8004
Update_rows_log_event::~Update_rows_log_event()
8005
8005
{
8006
8006
  if (m_cols_ai.bitmap == m_bitbuf_ai) // no my_malloc happened
8007
 
    m_cols_ai.bitmap= 0; // so no my_free in bitmap_free
 
8007
    m_cols_ai.bitmap= 0; // so no free in bitmap_free
8008
8008
  bitmap_free(&m_cols_ai); // To pair with bitmap_init().
8009
8009
}
8010
8010
 
8046
8046
{
8047
8047
  /*error= ToDo:find out what this should really be, this triggers close_scan in nbd, returning error?*/
8048
8048
  m_table->file->ha_index_or_rnd_end();
8049
 
  my_free(m_key, MYF(MY_ALLOW_ZERO_PTR)); // Free for multi_malloc
 
8049
  free(m_key); // Free for multi_malloc
8050
8050
  m_key= NULL;
8051
8051
 
8052
8052
  return error;