1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

slave master.info FILE -> IO_CACHE

send_file() is more stack-friendly - changed large static buffer to alloc_root()
fixed my_b_seek() to work with WRITE_CACHE
test case to make sure the slave starts correctly after being stopped
truncated words file so the replication tests will take less time


mysql-test/r/3.23/rpl000001.b.result:
  truncated words file
mysql-test/r/3.23/rpl000004.b.result:
  truncated words file
mysql-test/std_data/words:
  truncated words file
BitKeeper/etc/ignore:
  Added mysql-test/rpl000011.test mysql-test/var/lib/mysql-bin.007 sql/share/norwegian/errmsg.sys sql/share/norwegian-ny/errmsg.sys to the ignore list
mysys/mf_iocache2.c:
  got my_b_seek() to work with WRITE_CACHE, at least the one used by the slave
sql/share/romanian/errmsg.sys:
  accidently touched the file
sql/slave.cc:
  converted FILE to IO_CACHE for master.info
sql/slave.h:
  FILE -> IO_CACHE for master.info
sql/sql_repl.cc:
  be nice to the stack - change a large stack buffer to be alloced with
  alloc_root in send_file()
This commit is contained in:
unknown
2000-11-24 19:49:13 -07:00
parent 85a61b2cce
commit 1ef81b2165
12 changed files with 190 additions and 45443 deletions

View File

@ -32,7 +32,7 @@ static int send_file(THD *thd)
NET* net = &thd->net;
int fd = -1,bytes, error = 1;
char fname[FN_REFLEN+1];
char buf[IO_SIZE*15];
char *buf;
const char *errmsg = 0;
int old_timeout;
DBUG_ENTER("send_file");
@ -42,6 +42,13 @@ static int send_file(THD *thd)
old_timeout = thd->net.timeout;
thd->net.timeout = thd->inactive_timeout;
// spare the stack
if(!(buf = alloc_root(&thd->mem_root,IO_SIZE)))
{
errmsg = "Out of memory";
goto err;
}
// we need net_flush here because the client will not know it needs to send
// us the file name until it has processed the load event entry
if (net_flush(net) || my_net_read(net) == packet_error)
@ -62,7 +69,7 @@ static int send_file(THD *thd)
goto err;
}
while ((bytes = (int) my_read(fd, (byte*) buf, sizeof(buf),
while ((bytes = (int) my_read(fd, (byte*) buf, IO_SIZE,
MYF(MY_WME))) > 0)
{
if (my_net_write(net, buf, bytes))