summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorsasha@mysql.sashanet.com <>2001-10-23 13:28:47 -0600
committersasha@mysql.sashanet.com <>2001-10-23 13:28:47 -0600
commit17e6f08527af09abf89d1ebc57fa43065ae2bc5b (patch)
treefd8b6c5c621b215efc560c47cf0d70d3c5b9f5c5 /include
parentbd9f0670e21c3a8016da198bd1dccec1243c8ccc (diff)
parentbe4dfd21ddd5a234297f1b207c38ef47a8c4fcb9 (diff)
downloadmariadb-git-17e6f08527af09abf89d1ebc57fa43065ae2bc5b.tar.gz
Merge work:/home/bk/mysql-4.0
into mysql.sashanet.com:/home/sasha/src/bk/mysql-4.0
Diffstat (limited to 'include')
-rw-r--r--include/my_sys.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index e6197d896cc..f6d303a6ccb 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -243,7 +243,10 @@ typedef struct st_typelib { /* Different types saved here */
const char **type_names;
} TYPELIB;
-enum cache_type {READ_CACHE,WRITE_CACHE,READ_FIFO,READ_NET,WRITE_NET};
+enum cache_type {READ_CACHE,WRITE_CACHE,
+ SEQ_READ_APPEND /* sequential read or append */,
+ READ_FIFO,
+ READ_NET,WRITE_NET};
enum flush_type { FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED,
FLUSH_FORCE_WRITE};
@@ -294,6 +297,16 @@ typedef struct st_io_cache /* Used when cacheing files */
{
my_off_t pos_in_file,end_of_file;
byte *rc_pos,*rc_end,*buffer,*rc_request_pos;
+ my_bool alloced_buffer; /* currented READ_NET is the only one
+ that will use a buffer allocated somewhere
+ else
+ */
+ byte *append_buffer, *append_pos, *append_end;
+/* for append buffer used in READ_APPEND cache */
+#ifdef THREAD
+ pthread_mutex_t append_buffer_lock;
+ /* need mutex copying from append buffer to read buffer */
+#endif
int (*read_function)(struct st_io_cache *,byte *,uint);
/* callbacks when the actual read I/O happens */
IO_CACHE_CALLBACK pre_read;
@@ -546,6 +559,7 @@ extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
my_off_t seek_offset,pbool use_async_io,
pbool clear_cache);
extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
+extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count);
extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count);
extern int _my_b_get(IO_CACHE *info);
extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count);