~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_repl.cc

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include "sql_repl.h"
21
21
#include "log_event.h"
22
22
#include "rpl_filter.h"
23
 
#include <my_dir.h>
24
23
 
25
24
int max_binlog_dump_events = 0; // unlimited
26
25
 
210
209
    if ((linfo = tmp->current_linfo))
211
210
    {
212
211
      pthread_mutex_lock(&linfo->lock);
213
 
      result = !bcmp((uchar*) log_name, (uchar*) linfo->log_file_name,
 
212
      result = !memcmp((uchar*) log_name, (uchar*) linfo->log_file_name,
214
213
                     log_name_len);
215
214
      pthread_mutex_unlock(&linfo->lock);
216
215
      if (result)
392
391
  pthread_mutex_t *log_lock;
393
392
  bool binlog_can_be_corrupted= false;
394
393
 
395
 
  bzero((char*) &log,sizeof(log));
 
394
  memset((char*) &log, 0, sizeof(log));
396
395
  /* 
397
396
     heartbeat_period from @master_heartbeat_period user variable
398
397
  */
1094
1093
*/
1095
1094
 
1096
1095
 
1097
 
void kill_zombie_dump_threads(uint32 slave_server_id)
 
1096
void kill_zombie_dump_threads(uint32_t slave_server_id)
1098
1097
{
1099
1098
  pthread_mutex_lock(&LOCK_thread_count);
1100
1099
  I_List_iterator<THD> it(threads);
1520
1519
  List<Item> field_list;
1521
1520
  field_list.push_back(new Item_empty_string("File", FN_REFLEN));
1522
1521
  field_list.push_back(new Item_return_int("Position",20,
1523
 
                                           MYSQL_TYPE_LONGLONG));
 
1522
                                           DRIZZLE_TYPE_LONGLONG));
1524
1523
  field_list.push_back(new Item_empty_string("Binlog_Do_DB",255));
1525
1524
  field_list.push_back(new Item_empty_string("Binlog_Ignore_DB",255));
1526
1525
 
1577
1576
 
1578
1577
  field_list.push_back(new Item_empty_string("Log_name", 255));
1579
1578
  field_list.push_back(new Item_return_int("File_size", 20,
1580
 
                                           MYSQL_TYPE_LONGLONG));
 
1579
                                           DRIZZLE_TYPE_LONGLONG));
1581
1580
  if (protocol->send_fields(&field_list,
1582
1581
                            Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
1583
1582
    return(true);
1707
1706
};
1708
1707
 
1709
1708
static void fix_slave_net_timeout(THD *thd,
1710
 
                                  enum_var_type type __attribute__((__unused__)))
 
1709
                                  enum_var_type type __attribute__((unused)))
1711
1710
{
1712
1711
#ifdef HAVE_REPLICATION
1713
1712
  pthread_mutex_lock(&LOCK_active_mi);
1738
1737
static int show_slave_skip_errors(THD *thd, SHOW_VAR *var, char *buff);
1739
1738
 
1740
1739
 
1741
 
static int show_slave_skip_errors(THD *thd __attribute__((__unused__)),
 
1740
static int show_slave_skip_errors(THD *thd __attribute__((unused)),
1742
1741
                                  SHOW_VAR *var, char *buff)
1743
1742
{
1744
1743
  var->type=SHOW_CHAR;
1790
1789
  {"slave_skip_errors",       (char*) &show_slave_skip_errors_cont,      SHOW_FUNC},
1791
1790
};
1792
1791
 
1793
 
bool sys_var_slave_skip_counter::check(THD *thd __attribute__((__unused__)),
 
1792
bool sys_var_slave_skip_counter::check(THD *thd __attribute__((unused)),
1794
1793
                                       set_var *var)
1795
1794
{
1796
1795
  int result= 0;
1808
1807
}
1809
1808
 
1810
1809
 
1811
 
bool sys_var_slave_skip_counter::update(THD *thd __attribute__((__unused__)),
 
1810
bool sys_var_slave_skip_counter::update(THD *thd __attribute__((unused)),
1812
1811
                                        set_var *var)
1813
1812
{
1814
1813
  pthread_mutex_lock(&LOCK_active_mi);
1830
1829
}
1831
1830
 
1832
1831
 
1833
 
bool sys_var_sync_binlog_period::update(THD *thd __attribute__((__unused__)),
 
1832
bool sys_var_sync_binlog_period::update(THD *thd __attribute__((unused)),
1834
1833
                                        set_var *var)
1835
1834
{
1836
1835
  sync_binlog_period= (ulong) var->save_result.uint64_t_value;