summaryrefslogtreecommitdiff
path: root/sql/mf_iocache.cc
diff options
context:
space:
mode:
authorunknown <monty@bitch.mysql.fi>2001-11-28 02:55:52 +0200
committerunknown <monty@bitch.mysql.fi>2001-11-28 02:55:52 +0200
commit06e1e27557cc6788fafd423eea6ca5073dce892a (patch)
tree40e5d73c964ca6aeb5e0e7d4294e70216edaa397 /sql/mf_iocache.cc
parentf33fb18677d673f1bcb2d617355ea3e2dbb04f48 (diff)
downloadmariadb-git-06e1e27557cc6788fafd423eea6ca5073dce892a.tar.gz
New improved IO_CACHE
include/my_global.h: Remove dbug_assert() (One should use DBUG_ASSERT() instead) mysql-test/mysql-test-run.sh: Fixed that xterm works on Solaris 2.8. Fixed printing of errors mysql-test/r/isam.result: Removed MyISAM test from ISAM test mysql-test/t/isam.test: Removed MyISAM test from ISAM test mysys/my_alloc.c: Removed warnings mysys/my_bitmap.c: Use DBUG_ASSERT mysys/my_pthread.c: Use DBUG_ASSERT mysys/my_seek.c: More DBUG sql/ha_berkeley.cc: Use DBUG_ASSERT sql/ha_innobase.cc: Use DBUG_ASSERT sql/log.cc: Use DBUG_ASSERT sql/opt_range.cc: Use DBUG_ASSERT sql/sql_base.cc: Use DBUG_ASSERT sql/sql_handler.cc: Use DBUG_ASSERT sql/sql_load.cc: Cleanup sql/sql_parse.cc: Use DBUG_ASSERT sql/sql_repl.cc: Cleanup sql/sql_select.cc: Use DBUG_ASSERT tools/mysqlmanager.c: Cleanup
Diffstat (limited to 'sql/mf_iocache.cc')
-rw-r--r--sql/mf_iocache.cc26
1 files changed, 16 insertions, 10 deletions
diff --git a/sql/mf_iocache.cc b/sql/mf_iocache.cc
index 55e953687a3..2a7b25eab2f 100644
--- a/sql/mf_iocache.cc
+++ b/sql/mf_iocache.cc
@@ -52,26 +52,32 @@ int _my_b_net_read(register IO_CACHE *info, byte *Buffer,
{
int read_length;
NET *net= &(current_thd)->net;
+ DBUG_ENTER("_my_b_net_read");
- if (info->end_of_file)
- return 1; /* because my_b_get (no _) takes 1 byte at a time */
+ if (!info->end_of_file)
+ DBUG_RETURN(1); /* because my_b_get (no _) takes 1 byte at a time */
read_length=my_net_read(net);
if (read_length == (int) packet_error)
{
info->error= -1;
- return 1;
+ DBUG_RETURN(1);
}
if (read_length == 0)
{
- /* End of file from client */
- info->end_of_file = 1; return 1;
+ info->end_of_file= 0; /* End of file from client */
+ DBUG_RETURN(1);
}
/* to set up stuff for my_b_get (no _) */
- info->rc_end = (info->rc_pos = (byte*) net->read_pos) + read_length;
- Buffer[0] = info->rc_pos[0]; /* length is always 1 */
- info->rc_pos++;
- info->buffer = info->rc_pos;
- return 0;
+ info->read_end = (info->read_pos = (byte*) net->read_pos) + read_length;
+ Buffer[0] = info->read_pos[0]; /* length is always 1 */
+ info->read_pos++;
+
+ /*
+ info->request_pos is used by log_loaded_block() to know the size
+ of the current block
+ */
+ info->request_pos=info->read_pos;
+ DBUG_RETURN(0);
}
} /* extern "C" */