1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

removed init_count from IO_CACHE.

Added missing mutex_unlock to slave replication code.


include/my_sys.h:
  removed init_count from IO_CACHE.
  General cleanup.
innobase/srv/srv0srv.c:
  Initailize slots to avoid purify warnings.
  Removed some compiler warnings.
mysql-test/mysql-test-run.sh:
  Automatic start of slave under gdb
mysys/mf_iocache.c:
  removed init_count
sql/field.cc:
  Cleanup
sql/log.cc:
  Cleanup
  added open_count variable.
sql/log_event.cc:
  cleanup
  use is_prefix instead of memcmp()
sql/repl_failsafe.cc:
  cleanup
sql/slave.cc:
  cleanup
  use MYSQL_LOG->open_count instead of IO_CACHE->init_count
  Added missing mutex_unlock()
sql/slave.h:
  cleanup
sql/sql_class.h:
  cleanup
  Added open_count to MYSQL_LOGL
sql/sql_parse.cc:
  removed compiler warning
sql/sql_repl.cc:
  added DBUG_xxx
sql/unireg.h:
  Added BIN_LOG_HEADER_SIZE
This commit is contained in:
unknown
2002-06-05 23:04:38 +03:00
parent ef06010563
commit 03728196ee
14 changed files with 777 additions and 677 deletions

View File

@ -154,6 +154,7 @@ File open_binlog(IO_CACHE *log, const char *log_file_name,
const char **errmsg)
{
File file;
DBUG_ENTER("open_binlog");
if ((file = my_open(log_file_name, O_RDONLY | O_BINARY, MYF(MY_WME))) < 0 ||
init_io_cache(log, file, IO_SIZE*2, READ_CACHE, 0, 0,
@ -164,7 +165,7 @@ File open_binlog(IO_CACHE *log, const char *log_file_name,
}
if (check_binlog_magic(log,errmsg))
goto err;
return file;
DBUG_RETURN(file);
err:
if (file >= 0)
@ -172,7 +173,7 @@ err:
my_close(file,MYF(0));
end_io_cache(log);
}
return -1;
DBUG_RETURN(-1);
}
@ -628,7 +629,8 @@ int reset_slave(MASTER_INFO* mi)
char fname[FN_REFLEN];
int restart_thread_mask = 0,error=0;
const char* errmsg=0;
DBUG_ENTER("reset_slave");
lock_slave_threads(mi);
init_thread_mask(&restart_thread_mask,mi,0 /* not inverse */);
if ((error=terminate_slave_threads(mi,restart_thread_mask,1 /*skip lock*/))
@ -649,14 +651,14 @@ int reset_slave(MASTER_INFO* mi)
goto err;
}
if (restart_thread_mask)
error=start_slave_threads(0 /* mutex not needed*/,
1 /* wait for start*/,
mi,master_info_file,relay_log_info_file,
restart_thread_mask);
error=start_slave_threads(0 /* mutex not needed */,
1 /* wait for start*/,
mi,master_info_file,relay_log_info_file,
restart_thread_mask);
// TODO: fix error messages so they get to the client
err:
unlock_slave_threads(mi);
return error;
DBUG_RETURN(error);
}
void kill_zombie_dump_threads(uint32 slave_server_id)