2001-02-17 14:19:19 +02:00
|
|
|
/******************************************************
|
|
|
|
The interface to the operating system file i/o primitives
|
|
|
|
|
|
|
|
(c) 1995 Innobase Oy
|
|
|
|
|
|
|
|
Created 10/21/1995 Heikki Tuuri
|
|
|
|
*******************************************************/
|
|
|
|
|
|
|
|
#include "os0file.h"
|
|
|
|
#include "os0sync.h"
|
2003-01-21 13:37:41 +02:00
|
|
|
#include "os0thread.h"
|
2001-02-17 14:19:19 +02:00
|
|
|
#include "ut0mem.h"
|
2001-05-23 20:19:56 +03:00
|
|
|
#include "srv0srv.h"
|
2003-10-07 17:28:59 +03:00
|
|
|
#include "srv0start.h"
|
2001-10-10 22:47:08 +03:00
|
|
|
#include "fil0fil.h"
|
2002-08-25 10:26:40 +03:00
|
|
|
#include "buf0buf.h"
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2001-06-24 19:51:20 +03:00
|
|
|
#undef HAVE_FDATASYNC
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
#ifdef POSIX_ASYNC_IO
|
|
|
|
/* We assume in this case that the OS has standard Posix aio (at least SunOS
|
|
|
|
2.6, HP-UX 11i and AIX 4.3 have) */
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2002-08-02 23:16:19 +03:00
|
|
|
/* This specifies the file permissions InnoDB uses when it creates files in
|
2002-06-22 20:41:14 +03:00
|
|
|
Unix; the value of os_innodb_umask is initialized in ha_innodb.cc to
|
|
|
|
my_umask */
|
|
|
|
|
|
|
|
#ifndef __WIN__
|
|
|
|
ulint os_innodb_umask = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
|
|
|
|
#else
|
|
|
|
ulint os_innodb_umask = 0;
|
|
|
|
#endif
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
/* If the following is set to TRUE, we do not call os_file_flush in every
|
2003-10-07 17:28:59 +03:00
|
|
|
os_file_write. We can set this TRUE when the doublewrite buffer is used. */
|
2002-03-21 18:03:09 +02:00
|
|
|
ibool os_do_not_call_flush_at_each_write = FALSE;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/* We use these mutexes to protect lseek + file i/o operation, if the
|
|
|
|
OS does not provide an atomic pread or pwrite, or similar */
|
|
|
|
#define OS_FILE_N_SEEK_MUTEXES 16
|
|
|
|
os_mutex_t os_file_seek_mutexes[OS_FILE_N_SEEK_MUTEXES];
|
|
|
|
|
|
|
|
/* In simulated aio, merge at most this many consecutive i/os */
|
2002-06-22 20:41:14 +03:00
|
|
|
#define OS_AIO_MERGE_N_CONSECUTIVE 64
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
/* If this flag is TRUE, then we will use the native aio of the
|
|
|
|
OS (provided we compiled Innobase with it in), otherwise we will
|
|
|
|
use simulated aio we build below with threads */
|
|
|
|
|
|
|
|
ibool os_aio_use_native_aio = FALSE;
|
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
ibool os_aio_print_debug = FALSE;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/* The aio array slot structure */
|
|
|
|
typedef struct os_aio_slot_struct os_aio_slot_t;
|
|
|
|
|
|
|
|
struct os_aio_slot_struct{
|
|
|
|
ibool is_read; /* TRUE if a read operation */
|
|
|
|
ulint pos; /* index of the slot in the aio
|
|
|
|
array */
|
|
|
|
ibool reserved; /* TRUE if this slot is reserved */
|
2003-06-15 01:04:28 +03:00
|
|
|
time_t reservation_time;/* time when reserved */
|
2001-02-17 14:19:19 +02:00
|
|
|
ulint len; /* length of the block to read or
|
|
|
|
write */
|
|
|
|
byte* buf; /* buffer used in i/o */
|
|
|
|
ulint type; /* OS_FILE_READ or OS_FILE_WRITE */
|
|
|
|
ulint offset; /* 32 low bits of file offset in
|
|
|
|
bytes */
|
|
|
|
ulint offset_high; /* 32 high bits of file offset */
|
|
|
|
os_file_t file; /* file where to read or write */
|
|
|
|
char* name; /* file name or path */
|
|
|
|
ibool io_already_done;/* used only in simulated aio:
|
|
|
|
TRUE if the physical i/o already
|
|
|
|
made and only the slot message
|
|
|
|
needs to be passed to the caller
|
|
|
|
of os_aio_simulated_handle */
|
|
|
|
void* message1; /* message which is given by the */
|
|
|
|
void* message2; /* the requester of an aio operation
|
|
|
|
and which can be used to identify
|
|
|
|
which pending aio operation was
|
|
|
|
completed */
|
|
|
|
#ifdef WIN_ASYNC_IO
|
2003-06-02 13:11:20 +03:00
|
|
|
os_event_t event; /* event object we need in the
|
|
|
|
OVERLAPPED struct */
|
2001-02-17 14:19:19 +02:00
|
|
|
OVERLAPPED control; /* Windows control block for the
|
|
|
|
aio request */
|
|
|
|
#elif defined(POSIX_ASYNC_IO)
|
|
|
|
struct aiocb control; /* Posix control block for aio
|
|
|
|
request */
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
/* The aio array structure */
|
|
|
|
typedef struct os_aio_array_struct os_aio_array_t;
|
|
|
|
|
|
|
|
struct os_aio_array_struct{
|
|
|
|
os_mutex_t mutex; /* the mutex protecting the aio array */
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
os_event_t not_full; /* The event which is set to the signaled
|
2001-02-17 14:19:19 +02:00
|
|
|
state when there is space in the aio
|
|
|
|
outside the ibuf segment */
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
os_event_t is_empty; /* The event which is set to the signaled
|
|
|
|
state when there are no pending i/os
|
|
|
|
in this array */
|
2001-02-17 14:19:19 +02:00
|
|
|
ulint n_slots; /* Total number of slots in the aio array.
|
|
|
|
This must be divisible by n_threads. */
|
|
|
|
ulint n_segments;/* Number of segments in the aio array of
|
|
|
|
pending aio requests. A thread can wait
|
|
|
|
separately for any one of the segments. */
|
|
|
|
ulint n_reserved;/* Number of reserved slots in the
|
|
|
|
aio array outside the ibuf segment */
|
|
|
|
os_aio_slot_t* slots; /* Pointer to the slots in the array */
|
2003-06-02 13:11:20 +03:00
|
|
|
#ifdef __WIN__
|
|
|
|
os_native_event_t* native_events;
|
|
|
|
/* Pointer to an array of OS native event
|
|
|
|
handles where we copied the handles from
|
|
|
|
slots, in the same order. This can be used
|
|
|
|
in WaitForMultipleObjects; used only in
|
2001-02-17 14:19:19 +02:00
|
|
|
Windows */
|
2003-06-02 13:11:20 +03:00
|
|
|
#endif
|
2001-02-17 14:19:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Array of events used in simulated aio */
|
|
|
|
os_event_t* os_aio_segment_wait_events = NULL;
|
|
|
|
|
|
|
|
/* The aio arrays for non-ibuf i/o and ibuf i/o, as well as sync aio. These
|
|
|
|
are NULL when the module has not yet been initialized. */
|
|
|
|
os_aio_array_t* os_aio_read_array = NULL;
|
|
|
|
os_aio_array_t* os_aio_write_array = NULL;
|
|
|
|
os_aio_array_t* os_aio_ibuf_array = NULL;
|
|
|
|
os_aio_array_t* os_aio_log_array = NULL;
|
|
|
|
os_aio_array_t* os_aio_sync_array = NULL;
|
|
|
|
|
|
|
|
ulint os_aio_n_segments = ULINT_UNDEFINED;
|
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
/* If the following is TRUE, read i/o handler threads try to
|
|
|
|
wait until a batch of new read requests have been posted */
|
|
|
|
ibool os_aio_recommend_sleep_for_read_threads = FALSE;
|
|
|
|
|
2001-10-10 22:47:08 +03:00
|
|
|
ulint os_n_file_reads = 0;
|
2002-06-22 20:41:14 +03:00
|
|
|
ulint os_bytes_read_since_printout = 0;
|
2001-10-10 22:47:08 +03:00
|
|
|
ulint os_n_file_writes = 0;
|
|
|
|
ulint os_n_fsyncs = 0;
|
|
|
|
ulint os_n_file_reads_old = 0;
|
|
|
|
ulint os_n_file_writes_old = 0;
|
|
|
|
ulint os_n_fsyncs_old = 0;
|
|
|
|
time_t os_last_printout;
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
ibool os_has_said_disk_full = FALSE;
|
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
/* The mutex protecting the following counts of pending pread and pwrite
|
|
|
|
operations */
|
|
|
|
os_mutex_t os_file_count_mutex;
|
|
|
|
ulint os_file_n_pending_preads = 0;
|
|
|
|
ulint os_file_n_pending_pwrites = 0;
|
|
|
|
|
2001-05-20 20:22:23 +03:00
|
|
|
/***************************************************************************
|
|
|
|
Gets the operating system version. Currently works only on Windows. */
|
|
|
|
|
|
|
|
ulint
|
|
|
|
os_get_os_version(void)
|
|
|
|
/*===================*/
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
/* out: OS_WIN95, OS_WIN31, OS_WINNT, OS_WIN2000 */
|
2001-05-20 20:22:23 +03:00
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
2001-10-10 22:47:08 +03:00
|
|
|
OSVERSIONINFO os_info;
|
|
|
|
|
|
|
|
os_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
|
|
|
|
|
|
|
ut_a(GetVersionEx(&os_info));
|
|
|
|
|
|
|
|
if (os_info.dwPlatformId == VER_PLATFORM_WIN32s) {
|
|
|
|
return(OS_WIN31);
|
|
|
|
} else if (os_info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
|
|
|
|
return(OS_WIN95);
|
|
|
|
} else if (os_info.dwPlatformId == VER_PLATFORM_WIN32_NT) {
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
if (os_info.dwMajorVersion <= 4) {
|
|
|
|
return(OS_WINNT);
|
|
|
|
} else {
|
|
|
|
return(OS_WIN2000);
|
|
|
|
}
|
2001-10-10 22:47:08 +03:00
|
|
|
} else {
|
|
|
|
ut_error;
|
|
|
|
return(0);
|
|
|
|
}
|
2001-05-20 20:22:23 +03:00
|
|
|
#else
|
2001-10-10 22:47:08 +03:00
|
|
|
ut_error;
|
2001-05-20 20:22:23 +03:00
|
|
|
|
2001-10-10 22:47:08 +03:00
|
|
|
return(0);
|
2001-05-20 20:22:23 +03:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/***************************************************************************
|
|
|
|
Retrieves the last error number if an error occurs in a file io function.
|
|
|
|
The number should be retrieved before any other OS calls (because they may
|
|
|
|
overwrite the error number). If the number is not known to this program,
|
|
|
|
the OS error number + 100 is returned. */
|
|
|
|
|
|
|
|
ulint
|
2003-10-07 17:28:59 +03:00
|
|
|
os_file_get_last_error(
|
|
|
|
/*===================*/
|
|
|
|
/* out: error number, or OS error
|
|
|
|
number + 100 */
|
|
|
|
ibool report_all_errors) /* in: TRUE if we want an error message
|
|
|
|
printed of all errors */
|
2001-02-17 14:19:19 +02:00
|
|
|
{
|
|
|
|
ulint err;
|
|
|
|
|
|
|
|
#ifdef __WIN__
|
|
|
|
|
|
|
|
err = (ulint) GetLastError();
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
if (report_all_errors
|
|
|
|
|| (err != ERROR_DISK_FULL && err != ERROR_FILE_EXISTS)) {
|
2002-03-21 18:03:09 +02:00
|
|
|
ut_print_timestamp(stderr);
|
|
|
|
fprintf(stderr,
|
2003-07-13 00:17:02 +03:00
|
|
|
" InnoDB: Operating system error number %lu in a file operation.\n"
|
2002-01-04 01:35:49 +02:00
|
|
|
"InnoDB: See http://www.innodb.com/ibman.html for installation help.\n",
|
2003-07-13 00:17:02 +03:00
|
|
|
err);
|
2002-01-04 01:35:49 +02:00
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
if (err == ERROR_PATH_NOT_FOUND) {
|
2002-01-04 01:35:49 +02:00
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: The error means the system cannot find the path specified.\n"
|
|
|
|
"InnoDB: In installation you must create directories yourself, InnoDB\n"
|
|
|
|
"InnoDB: does not create them.\n");
|
2002-03-21 18:03:09 +02:00
|
|
|
} else if (err == ERROR_ACCESS_DENIED) {
|
2002-01-04 04:07:31 +02:00
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: The error means mysqld does not have the access rights to\n"
|
|
|
|
"InnoDB: the directory. It may also be you have created a subdirectory\n"
|
|
|
|
"InnoDB: of the same name as a data file.\n");
|
2002-03-21 18:03:09 +02:00
|
|
|
} else {
|
2003-04-16 16:45:01 +03:00
|
|
|
fprintf(stderr,
|
2003-08-24 03:44:16 +03:00
|
|
|
"InnoDB: See section 13.2 at http://www.innodb.com/ibman.html\n"
|
2003-04-16 16:45:01 +03:00
|
|
|
"InnoDB: about operating system error numbers.\n");
|
2002-03-21 18:03:09 +02:00
|
|
|
}
|
2001-05-16 19:12:47 +03:00
|
|
|
}
|
2001-05-15 19:53:35 +03:00
|
|
|
|
2003-03-07 10:07:06 +02:00
|
|
|
fflush(stderr);
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
if (err == ERROR_FILE_NOT_FOUND) {
|
|
|
|
return(OS_FILE_NOT_FOUND);
|
|
|
|
} else if (err == ERROR_DISK_FULL) {
|
|
|
|
return(OS_FILE_DISK_FULL);
|
|
|
|
} else if (err == ERROR_FILE_EXISTS) {
|
|
|
|
return(OS_FILE_ALREADY_EXISTS);
|
|
|
|
} else {
|
|
|
|
return(100 + err);
|
|
|
|
}
|
|
|
|
#else
|
2001-05-16 19:12:47 +03:00
|
|
|
err = (ulint) errno;
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
if (report_all_errors
|
|
|
|
|| (err != ENOSPC && err != EEXIST)) {
|
2002-03-21 18:03:09 +02:00
|
|
|
ut_print_timestamp(stderr);
|
|
|
|
|
|
|
|
fprintf(stderr,
|
2003-07-13 00:17:02 +03:00
|
|
|
" InnoDB: Operating system error number %lu in a file operation.\n"
|
2002-01-04 01:35:49 +02:00
|
|
|
"InnoDB: See http://www.innodb.com/ibman.html for installation help.\n",
|
2003-07-13 00:17:02 +03:00
|
|
|
err);
|
2002-01-04 01:35:49 +02:00
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
if (err == ENOENT) {
|
2002-01-04 01:35:49 +02:00
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: The error means the system cannot find the path specified.\n"
|
|
|
|
"InnoDB: In installation you must create directories yourself, InnoDB\n"
|
|
|
|
"InnoDB: does not create them.\n");
|
2002-03-21 18:03:09 +02:00
|
|
|
} else if (err == EACCES) {
|
2002-01-04 04:07:31 +02:00
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: The error means mysqld does not have the access rights to\n"
|
|
|
|
"InnoDB: the directory.\n");
|
2002-03-21 18:03:09 +02:00
|
|
|
} else {
|
2003-04-16 16:45:01 +03:00
|
|
|
if (strerror((int)err) != NULL) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: Error number %lu means '%s'.\n", err, strerror((int)err));
|
|
|
|
}
|
|
|
|
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: See also section 13.2 at http://www.innodb.com/ibman.html\n"
|
|
|
|
"InnoDB: about operating system error numbers.\n");
|
2002-03-21 18:03:09 +02:00
|
|
|
}
|
2001-05-16 19:12:47 +03:00
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2003-03-07 10:07:06 +02:00
|
|
|
fflush(stderr);
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
if (err == ENOSPC ) {
|
|
|
|
return(OS_FILE_DISK_FULL);
|
|
|
|
#ifdef POSIX_ASYNC_IO
|
|
|
|
} else if (err == EAGAIN) {
|
|
|
|
return(OS_FILE_AIO_RESOURCES_RESERVED);
|
|
|
|
#endif
|
|
|
|
} else if (err == ENOENT) {
|
|
|
|
return(OS_FILE_NOT_FOUND);
|
|
|
|
} else if (err == EEXIST) {
|
|
|
|
return(OS_FILE_ALREADY_EXISTS);
|
|
|
|
} else {
|
|
|
|
return(100 + err);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/********************************************************************
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
Does error handling when a file operation fails. */
|
2001-02-17 14:19:19 +02:00
|
|
|
static
|
|
|
|
ibool
|
|
|
|
os_file_handle_error(
|
|
|
|
/*=================*/
|
2003-03-07 10:07:06 +02:00
|
|
|
/* out: TRUE if we should retry the
|
|
|
|
operation */
|
2001-02-17 14:19:19 +02:00
|
|
|
os_file_t file, /* in: file pointer */
|
2003-06-01 23:40:01 +03:00
|
|
|
char* name, /* in: name of a file or NULL */
|
2003-06-02 13:45:45 +03:00
|
|
|
const char* operation)/* in: operation */
|
2001-02-17 14:19:19 +02:00
|
|
|
{
|
|
|
|
ulint err;
|
|
|
|
|
ut0ut.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
page0page.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
que0que.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0ins.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0sel.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0upd.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0vers.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0start.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0arr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0rec.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0trx.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ut0dbg.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
lock0lock.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0log.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0recv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ibuf0ibuf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
hash0hash.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mach0data.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0mem.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mtr0mtr.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
univ.i Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
com0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0data.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0type.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0crea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0dict.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fil0fil.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fsp0fsp.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fut0lst.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0sea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0flu.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0btr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0cur.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0btr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0cur.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0sea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0buf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0flu.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/com/com0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0data.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0type.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0crea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0dict.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fil/fil0fil.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fsp/fsp0fsp.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fut/fut0lst.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ibuf/ibuf0ibuf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/hash0hash.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mach0data.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0mem.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0pool.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mtr0mtr.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0file.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0thread.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/row0mysql.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/univ.i:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/srv0srv.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0rw.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/ut0dbg.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/lock/lock0lock.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0log.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0recv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/mem/mem0pool.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0file.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0thread.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/page/page0page.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/que/que0que.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0ins.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0mysql.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0sel.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0upd.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0vers.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0srv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0start.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0arr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0rw.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0rec.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0trx.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ut/ut0ut.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
2001-03-02 17:33:11 +02:00
|
|
|
UT_NOT_USED(file);
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
err = os_file_get_last_error(FALSE);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
if (err == OS_FILE_DISK_FULL) {
|
2002-03-21 18:03:09 +02:00
|
|
|
/* We only print a warning about disk full once */
|
|
|
|
|
|
|
|
if (os_has_said_disk_full) {
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
if (name) {
|
2002-03-21 18:03:09 +02:00
|
|
|
ut_print_timestamp(stderr);
|
|
|
|
fprintf(stderr,
|
|
|
|
" InnoDB: Encountered a problem with file %s\n", name);
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
2002-03-21 18:03:09 +02:00
|
|
|
|
|
|
|
ut_print_timestamp(stderr);
|
2002-01-04 01:35:49 +02:00
|
|
|
fprintf(stderr,
|
2002-03-21 18:03:09 +02:00
|
|
|
" InnoDB: Disk is full. Try to clean the disk to free space.\n");
|
2001-04-24 16:38:08 +03:00
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
os_has_said_disk_full = TRUE;
|
|
|
|
|
2003-03-07 10:07:06 +02:00
|
|
|
fflush(stderr);
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
return(FALSE);
|
2001-04-24 16:38:08 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
} else if (err == OS_FILE_AIO_RESOURCES_RESERVED) {
|
|
|
|
return(TRUE);
|
2001-10-10 22:47:08 +03:00
|
|
|
|
|
|
|
} else if (err == OS_FILE_ALREADY_EXISTS) {
|
2003-03-07 10:07:06 +02:00
|
|
|
|
2001-10-10 22:47:08 +03:00
|
|
|
return(FALSE);
|
2001-02-17 14:19:19 +02:00
|
|
|
} else {
|
2002-01-04 01:35:49 +02:00
|
|
|
if (name) {
|
|
|
|
fprintf(stderr, "InnoDB: File name %s\n", name);
|
|
|
|
}
|
2003-06-02 13:11:20 +03:00
|
|
|
|
2003-07-13 00:17:02 +03:00
|
|
|
fprintf(stderr, "InnoDB: File operation call: '%s'.\n",
|
|
|
|
operation);
|
2001-05-15 19:53:35 +03:00
|
|
|
fprintf(stderr, "InnoDB: Cannot continue operation.\n");
|
|
|
|
|
2003-03-07 10:07:06 +02:00
|
|
|
fflush(stderr);
|
|
|
|
|
2001-05-15 19:53:35 +03:00
|
|
|
exit(1);
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
/********************************************************************
|
|
|
|
Creates the seek mutexes used in positioned reads and writes. */
|
|
|
|
|
|
|
|
void
|
|
|
|
os_io_init_simple(void)
|
|
|
|
/*===================*/
|
|
|
|
{
|
|
|
|
ulint i;
|
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
os_file_count_mutex = os_mutex_create(NULL);
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
for (i = 0; i < OS_FILE_N_SEEK_MUTEXES; i++) {
|
|
|
|
os_file_seek_mutexes[i] = os_mutex_create(NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
/***************************************************************************
|
|
|
|
The os_file_opendir() function opens a directory stream corresponding to the
|
|
|
|
directory named by the dirname argument. The directory stream is positioned
|
|
|
|
at the first entry. In both Unix and Windows we automatically skip the '.'
|
|
|
|
and '..' items at the start of the directory listing. */
|
|
|
|
|
|
|
|
os_file_dir_t
|
|
|
|
os_file_opendir(
|
|
|
|
/*============*/
|
|
|
|
/* out: directory stream, NULL if error */
|
|
|
|
char* dirname, /* in: directory name; it must not contain
|
|
|
|
a trailing '\' or '/' */
|
|
|
|
ibool error_is_fatal) /* in: TRUE if we should treat an error as a
|
|
|
|
fatal error; if we try to open symlinks then
|
|
|
|
we do not wish a fatal error if it happens
|
|
|
|
not to be a directory */
|
|
|
|
{
|
|
|
|
os_file_dir_t dir;
|
|
|
|
#ifdef __WIN__
|
|
|
|
LPWIN32_FIND_DATA lpFindFileData;
|
|
|
|
char path[OS_FILE_MAX_PATH + 3];
|
|
|
|
|
|
|
|
ut_a(strlen(dirname) < OS_FILE_MAX_PATH);
|
|
|
|
|
|
|
|
strcpy(path, dirname);
|
|
|
|
strcpy(path + strlen(path), "\*");
|
|
|
|
|
|
|
|
/* Note that in Windows opening the 'directory stream' also retrieves
|
|
|
|
the first entry in the directory. Since it is '.', that is no problem,
|
|
|
|
as we will skip over the '.' and '..' entries anyway. */
|
|
|
|
|
|
|
|
lpFindFileData = ut_malloc(sizeof(WIN32_FIND_DATA));
|
|
|
|
|
|
|
|
dir = FindFirstFile(path, lpFindFileData);
|
|
|
|
|
|
|
|
ut_free(lpFindFileData);
|
|
|
|
|
|
|
|
if (dir == INVALID_HANDLE_VALUE) {
|
|
|
|
|
|
|
|
if (error_is_fatal) {
|
|
|
|
os_file_handle_error(NULL, dirname, "opendir");
|
|
|
|
}
|
|
|
|
|
|
|
|
return(NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(dir);
|
|
|
|
#else
|
|
|
|
dir = opendir(dirname);
|
|
|
|
|
|
|
|
if (dir == NULL && error_is_fatal) {
|
|
|
|
os_file_handle_error(0, dirname, "opendir");
|
|
|
|
}
|
|
|
|
|
|
|
|
return(dir);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
Closes a directory stream. */
|
|
|
|
|
|
|
|
int
|
|
|
|
os_file_closedir(
|
|
|
|
/*=============*/
|
|
|
|
/* out: 0 if success, -1 if failure */
|
|
|
|
os_file_dir_t dir) /* in: directory stream */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
BOOL ret;
|
|
|
|
|
|
|
|
ret = FindClose(dir);
|
|
|
|
|
|
|
|
if (!ret) {
|
|
|
|
os_file_handle_error(NULL, NULL, "closedir");
|
|
|
|
|
|
|
|
return(-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
#else
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = closedir(dir);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
os_file_handle_error(0, NULL, "closedir");
|
|
|
|
}
|
|
|
|
|
|
|
|
return(ret);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
This function returns information of the next file in the directory. We jump
|
|
|
|
over the '.' and '..' entries in the directory. */
|
|
|
|
|
|
|
|
int
|
|
|
|
os_file_readdir_next_file(
|
|
|
|
/*======================*/
|
|
|
|
/* out: 0 if ok, -1 if error, 1 if at the end
|
|
|
|
of the directory */
|
|
|
|
char* dirname,/* in: directory name or path */
|
|
|
|
os_file_dir_t dir, /* in: directory stream */
|
|
|
|
os_file_stat_t* info) /* in/out: buffer where the info is returned */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
LPWIN32_FIND_DATA lpFindFileData;
|
|
|
|
BOOL ret;
|
|
|
|
|
|
|
|
lpFindFileData = ut_malloc(sizeof(WIN32_FIND_DATA));
|
|
|
|
next_file:
|
|
|
|
ret = FindNextFile(dir, lpFindFileData);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
ut_a(strlen(lpFindFileData->cFilename) < OS_FILE_MAX_PATH);
|
|
|
|
|
|
|
|
if (strcmp(lpFindFileData->cFilename, ".") == 0
|
|
|
|
|| strcmp(lpFindFileData->cFilename, "..") == 0) {
|
|
|
|
|
|
|
|
goto next_file;
|
|
|
|
}
|
|
|
|
|
|
|
|
strcpy(info->name, lpFindFileData->cFilename);
|
|
|
|
|
|
|
|
info->size = (ib_longlong)(buf->nFileSizeLow)
|
|
|
|
+ (((ib_longlong)(buf->nFileSizeHigh)) << 32);
|
|
|
|
|
|
|
|
if (lpFindFileData->dwFileAttributes
|
|
|
|
& FILE_ATTRIBUTE_REPARSE_POINT) {
|
|
|
|
/* TODO: test Windows symlinks */
|
|
|
|
/* TODO: MySQL has apparently its own symlink implementation in Windows,
|
|
|
|
dbname.sym can redirect a database directory:
|
|
|
|
http://www.mysql.com/doc/en/Windows_symbolic_links.html */
|
|
|
|
info->type = OS_FILE_TYPE_LINK;
|
|
|
|
} else if (lpFindFileData->dwFileAttributes
|
|
|
|
& FILE_ATTRIBUTE_DIRECTORY) {
|
|
|
|
info->type = OS_FILE_TYPE_DIR;
|
|
|
|
} else if (lpFindFileData->dwFileAttributes
|
|
|
|
& FILE_ATTRIBUTE_NORMAL) {
|
|
|
|
/* TODO: are FILE_ATTRIBUTE_NORMAL files really all normal files? */
|
|
|
|
info->type = OS_FILE_TYPE_FILE;
|
|
|
|
} else {
|
|
|
|
info->type = OS_FILE_TYPE_UNKNOWN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ut_free(lpFindFileData);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
return(0);
|
|
|
|
} else if (GetLastError() == ERROR_NO_MORE_FILES) {
|
|
|
|
|
|
|
|
return(1);
|
|
|
|
} else {
|
|
|
|
os_file_handle_error(NULL, dirname, "readdir_next_file");
|
|
|
|
|
|
|
|
return(-1);
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
struct dirent* ent;
|
|
|
|
char* full_path;
|
|
|
|
int ret;
|
|
|
|
struct stat statinfo;
|
|
|
|
next_file:
|
|
|
|
ent = readdir(dir);
|
|
|
|
|
|
|
|
if (ent == NULL) {
|
|
|
|
return(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
ut_a(strlen(ent->d_name) < OS_FILE_MAX_PATH);
|
|
|
|
|
|
|
|
if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) {
|
|
|
|
|
|
|
|
goto next_file;
|
|
|
|
}
|
|
|
|
|
|
|
|
strcpy(info->name, ent->d_name);
|
|
|
|
|
|
|
|
full_path = ut_malloc(strlen(dirname) + strlen(ent->d_name) + 10);
|
|
|
|
|
|
|
|
sprintf(full_path, "%s/%s", dirname, ent->d_name);
|
|
|
|
|
|
|
|
ret = stat(full_path, &statinfo);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
os_file_handle_error(0, full_path, "stat");
|
|
|
|
|
|
|
|
ut_free(full_path);
|
|
|
|
|
|
|
|
return(-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
info->size = (ib_longlong)statinfo.st_size;
|
|
|
|
|
|
|
|
if (S_ISDIR(statinfo.st_mode)) {
|
|
|
|
info->type = OS_FILE_TYPE_DIR;
|
|
|
|
} else if (S_ISLNK(statinfo.st_mode)) {
|
|
|
|
info->type = OS_FILE_TYPE_LINK;
|
|
|
|
} else if (S_ISREG(statinfo.st_mode)) {
|
|
|
|
info->type = OS_FILE_TYPE_FILE;
|
|
|
|
} else {
|
|
|
|
info->type = OS_FILE_TYPE_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
ut_free(full_path);
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
/********************************************************************
|
|
|
|
A simple function to open or create a file. */
|
|
|
|
|
|
|
|
os_file_t
|
|
|
|
os_file_create_simple(
|
|
|
|
/*==================*/
|
|
|
|
/* out, own: handle to the file, not defined if error,
|
|
|
|
error number can be retrieved with os_get_last_error */
|
|
|
|
char* name, /* in: name of the file or path as a null-terminated
|
|
|
|
string */
|
|
|
|
ulint create_mode,/* in: OS_FILE_OPEN if an existing file is opened
|
|
|
|
(if does not exist, error), or OS_FILE_CREATE if a new
|
|
|
|
file is created (if exists, error) */
|
|
|
|
ulint access_type,/* in: OS_FILE_READ_ONLY or OS_FILE_READ_WRITE */
|
|
|
|
ibool* success)/* out: TRUE if succeed, FALSE if error */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
os_file_t file;
|
|
|
|
DWORD create_flag;
|
|
|
|
DWORD access;
|
|
|
|
DWORD attributes = 0;
|
|
|
|
ibool retry;
|
|
|
|
|
|
|
|
try_again:
|
|
|
|
ut_a(name);
|
|
|
|
|
|
|
|
if (create_mode == OS_FILE_OPEN) {
|
|
|
|
create_flag = OPEN_EXISTING;
|
|
|
|
} else if (create_mode == OS_FILE_CREATE) {
|
|
|
|
create_flag = CREATE_NEW;
|
|
|
|
} else {
|
|
|
|
create_flag = 0;
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (access_type == OS_FILE_READ_ONLY) {
|
|
|
|
access = GENERIC_READ;
|
|
|
|
} else if (access_type == OS_FILE_READ_WRITE) {
|
|
|
|
access = GENERIC_READ | GENERIC_WRITE;
|
|
|
|
} else {
|
|
|
|
access = 0;
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
file = CreateFile(name,
|
|
|
|
access,
|
2003-06-15 01:04:28 +03:00
|
|
|
FILE_SHARE_READ,/* file can be read also by other
|
|
|
|
processes */
|
2002-03-21 18:03:09 +02:00
|
|
|
NULL, /* default security attributes */
|
|
|
|
create_flag,
|
|
|
|
attributes,
|
|
|
|
NULL); /* no template file */
|
|
|
|
|
|
|
|
if (file == INVALID_HANDLE_VALUE) {
|
|
|
|
*success = FALSE;
|
|
|
|
|
2003-06-01 23:40:01 +03:00
|
|
|
retry = os_file_handle_error(file, name,
|
2003-06-02 13:45:45 +03:00
|
|
|
create_mode == OS_FILE_OPEN ?
|
|
|
|
"open" : "create");
|
2002-03-21 18:03:09 +02:00
|
|
|
if (retry) {
|
|
|
|
goto try_again;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
*success = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(file);
|
|
|
|
#else
|
|
|
|
os_file_t file;
|
|
|
|
int create_flag;
|
|
|
|
ibool retry;
|
|
|
|
|
|
|
|
try_again:
|
|
|
|
ut_a(name);
|
|
|
|
|
|
|
|
if (create_mode == OS_FILE_OPEN) {
|
|
|
|
if (access_type == OS_FILE_READ_ONLY) {
|
|
|
|
create_flag = O_RDONLY;
|
|
|
|
} else {
|
|
|
|
create_flag = O_RDWR;
|
|
|
|
}
|
|
|
|
} else if (create_mode == OS_FILE_CREATE) {
|
|
|
|
create_flag = O_RDWR | O_CREAT | O_EXCL;
|
|
|
|
} else {
|
|
|
|
create_flag = 0;
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (create_mode == OS_FILE_CREATE) {
|
2002-06-22 20:41:14 +03:00
|
|
|
file = open(name, create_flag, S_IRUSR | S_IWUSR
|
|
|
|
| S_IRGRP | S_IWGRP);
|
2002-03-21 18:03:09 +02:00
|
|
|
} else {
|
|
|
|
file = open(name, create_flag);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (file == -1) {
|
|
|
|
*success = FALSE;
|
|
|
|
|
2003-06-01 23:40:01 +03:00
|
|
|
retry = os_file_handle_error(file, name,
|
2003-06-02 13:45:45 +03:00
|
|
|
create_mode == OS_FILE_OPEN ?
|
|
|
|
"open" : "create");
|
2002-03-21 18:03:09 +02:00
|
|
|
if (retry) {
|
|
|
|
goto try_again;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
*success = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(file);
|
|
|
|
#endif
|
|
|
|
}
|
2003-06-15 01:04:28 +03:00
|
|
|
|
|
|
|
/********************************************************************
|
|
|
|
A simple function to open or create a file. */
|
|
|
|
|
|
|
|
os_file_t
|
|
|
|
os_file_create_simple_no_error_handling(
|
|
|
|
/*====================================*/
|
|
|
|
/* out, own: handle to the file, not defined if error,
|
|
|
|
error number can be retrieved with os_get_last_error */
|
|
|
|
char* name, /* in: name of the file or path as a null-terminated
|
|
|
|
string */
|
|
|
|
ulint create_mode,/* in: OS_FILE_OPEN if an existing file is opened
|
|
|
|
(if does not exist, error), or OS_FILE_CREATE if a new
|
|
|
|
file is created (if exists, error) */
|
|
|
|
ulint access_type,/* in: OS_FILE_READ_ONLY or OS_FILE_READ_WRITE */
|
|
|
|
ibool* success)/* out: TRUE if succeed, FALSE if error */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
os_file_t file;
|
|
|
|
DWORD create_flag;
|
|
|
|
DWORD access;
|
|
|
|
DWORD attributes = 0;
|
|
|
|
|
|
|
|
ut_a(name);
|
|
|
|
|
|
|
|
if (create_mode == OS_FILE_OPEN) {
|
|
|
|
create_flag = OPEN_EXISTING;
|
|
|
|
} else if (create_mode == OS_FILE_CREATE) {
|
|
|
|
create_flag = CREATE_NEW;
|
|
|
|
} else {
|
|
|
|
create_flag = 0;
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (access_type == OS_FILE_READ_ONLY) {
|
|
|
|
access = GENERIC_READ;
|
|
|
|
} else if (access_type == OS_FILE_READ_WRITE) {
|
|
|
|
access = GENERIC_READ | GENERIC_WRITE;
|
|
|
|
} else {
|
|
|
|
access = 0;
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
file = CreateFile(name,
|
|
|
|
access,
|
|
|
|
FILE_SHARE_READ,/* file can be read also by other
|
|
|
|
processes */
|
|
|
|
NULL, /* default security attributes */
|
|
|
|
create_flag,
|
|
|
|
attributes,
|
|
|
|
NULL); /* no template file */
|
|
|
|
|
|
|
|
if (file == INVALID_HANDLE_VALUE) {
|
|
|
|
*success = FALSE;
|
|
|
|
} else {
|
|
|
|
*success = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(file);
|
|
|
|
#else
|
|
|
|
os_file_t file;
|
|
|
|
int create_flag;
|
|
|
|
|
|
|
|
ut_a(name);
|
|
|
|
|
|
|
|
if (create_mode == OS_FILE_OPEN) {
|
|
|
|
if (access_type == OS_FILE_READ_ONLY) {
|
|
|
|
create_flag = O_RDONLY;
|
|
|
|
} else {
|
|
|
|
create_flag = O_RDWR;
|
|
|
|
}
|
|
|
|
} else if (create_mode == OS_FILE_CREATE) {
|
|
|
|
create_flag = O_RDWR | O_CREAT | O_EXCL;
|
|
|
|
} else {
|
|
|
|
create_flag = 0;
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (create_mode == OS_FILE_CREATE) {
|
|
|
|
file = open(name, create_flag, S_IRUSR | S_IWUSR
|
|
|
|
| S_IRGRP | S_IWGRP);
|
|
|
|
} else {
|
|
|
|
file = open(name, create_flag);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (file == -1) {
|
|
|
|
*success = FALSE;
|
|
|
|
} else {
|
|
|
|
*success = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(file);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/********************************************************************
|
|
|
|
Opens an existing file or creates a new. */
|
|
|
|
|
|
|
|
os_file_t
|
|
|
|
os_file_create(
|
|
|
|
/*===========*/
|
|
|
|
/* out, own: handle to the file, not defined if error,
|
|
|
|
error number can be retrieved with os_get_last_error */
|
|
|
|
char* name, /* in: name of the file or path as a null-terminated
|
|
|
|
string */
|
|
|
|
ulint create_mode, /* in: OS_FILE_OPEN if an existing file is opened
|
|
|
|
(if does not exist, error), or OS_FILE_CREATE if a new
|
|
|
|
file is created (if exists, error), OS_FILE_OVERWRITE
|
2003-10-07 17:28:59 +03:00
|
|
|
if a new is created or an old overwritten,
|
|
|
|
OS_FILE_OPEN_RAW, if a raw device or disk partition
|
|
|
|
should be opened */
|
2001-02-17 14:19:19 +02:00
|
|
|
ulint purpose,/* in: OS_FILE_AIO, if asynchronous, non-buffered i/o
|
2003-07-13 00:17:02 +03:00
|
|
|
is desired, OS_FILE_NORMAL, if any normal file;
|
|
|
|
NOTE that it also depends on type, os_aio_.. and srv_..
|
|
|
|
variables whether we really use async i/o or
|
|
|
|
unbuffered i/o: look in the function source code for
|
|
|
|
the exact rules */
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
ulint type, /* in: OS_DATA_FILE or OS_LOG_FILE */
|
2001-02-17 14:19:19 +02:00
|
|
|
ibool* success)/* out: TRUE if succeed, FALSE if error */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
os_file_t file;
|
2003-10-07 17:28:59 +03:00
|
|
|
DWORD share_mode = FILE_SHARE_READ;
|
2001-02-17 14:19:19 +02:00
|
|
|
DWORD create_flag;
|
|
|
|
DWORD attributes;
|
|
|
|
ibool retry;
|
|
|
|
|
|
|
|
try_again:
|
|
|
|
ut_a(name);
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
if (create_mode == OS_FILE_OPEN_RAW) {
|
|
|
|
create_flag = OPEN_EXISTING;
|
|
|
|
share_mode = FILE_SHARE_WRITE;
|
2001-02-17 14:19:19 +02:00
|
|
|
if (create_mode == OS_FILE_OPEN) {
|
|
|
|
create_flag = OPEN_EXISTING;
|
|
|
|
} else if (create_mode == OS_FILE_CREATE) {
|
|
|
|
create_flag = CREATE_NEW;
|
|
|
|
} else if (create_mode == OS_FILE_OVERWRITE) {
|
|
|
|
create_flag = CREATE_ALWAYS;
|
|
|
|
} else {
|
|
|
|
create_flag = 0;
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (purpose == OS_FILE_AIO) {
|
2003-07-13 00:17:02 +03:00
|
|
|
/* If specified, use asynchronous (overlapped) io and no
|
|
|
|
buffering of writes in the OS */
|
2001-02-17 14:19:19 +02:00
|
|
|
attributes = 0;
|
|
|
|
#ifdef WIN_ASYNC_IO
|
|
|
|
if (os_aio_use_native_aio) {
|
|
|
|
attributes = attributes | FILE_FLAG_OVERLAPPED;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifdef UNIV_NON_BUFFERED_IO
|
2003-07-13 00:17:02 +03:00
|
|
|
if (type == OS_LOG_FILE && srv_flush_log_at_trx_commit == 2) {
|
2002-09-11 16:07:52 +03:00
|
|
|
/* Do not use unbuffered i/o to log files because
|
2003-07-13 00:17:02 +03:00
|
|
|
value 2 denotes that we do not flush the log at every
|
|
|
|
commit, but only once per second */
|
|
|
|
} else if (srv_win_file_flush_method ==
|
|
|
|
SRV_WIN_IO_UNBUFFERED) {
|
|
|
|
attributes = attributes | FILE_FLAG_NO_BUFFERING;
|
2002-09-11 16:07:52 +03:00
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
#endif
|
|
|
|
} else if (purpose == OS_FILE_NORMAL) {
|
2002-09-11 16:07:52 +03:00
|
|
|
attributes = 0;
|
2001-02-17 14:19:19 +02:00
|
|
|
#ifdef UNIV_NON_BUFFERED_IO
|
2002-09-11 16:07:52 +03:00
|
|
|
if (type == OS_LOG_FILE && srv_flush_log_at_trx_commit == 2) {
|
|
|
|
/* Do not use unbuffered i/o to log files because
|
|
|
|
value 2 denotes that we do not flush the log at every
|
|
|
|
commit, but only once per second */
|
2003-07-13 00:17:02 +03:00
|
|
|
} else if (srv_win_file_flush_method ==
|
|
|
|
SRV_WIN_IO_UNBUFFERED) {
|
|
|
|
attributes = attributes | FILE_FLAG_NO_BUFFERING;
|
2002-09-11 16:07:52 +03:00
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
#endif
|
|
|
|
} else {
|
|
|
|
attributes = 0;
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
file = CreateFile(name,
|
|
|
|
GENERIC_READ | GENERIC_WRITE, /* read and write
|
|
|
|
access */
|
2003-10-07 17:28:59 +03:00
|
|
|
share_mode, /* File can be read also by other
|
2003-06-15 01:04:28 +03:00
|
|
|
processes; we must give the read
|
|
|
|
permission because of ibbackup. We do
|
|
|
|
not give the write permission to
|
|
|
|
others because if one would succeed to
|
|
|
|
start 2 instances of mysqld on the
|
|
|
|
SAME files, that could cause severe
|
2003-10-07 17:28:59 +03:00
|
|
|
database corruption! When opening
|
|
|
|
raw disk partitions Microsoft manuals
|
|
|
|
say that we must give also the write
|
|
|
|
permission. */
|
2001-02-17 14:19:19 +02:00
|
|
|
NULL, /* default security attributes */
|
|
|
|
create_flag,
|
|
|
|
attributes,
|
|
|
|
NULL); /* no template file */
|
|
|
|
|
|
|
|
if (file == INVALID_HANDLE_VALUE) {
|
|
|
|
*success = FALSE;
|
|
|
|
|
2003-06-01 23:40:01 +03:00
|
|
|
retry = os_file_handle_error(file, name,
|
2003-10-07 17:28:59 +03:00
|
|
|
create_mode == OS_FILE_CREATE ?
|
|
|
|
"create" : "open");
|
2001-10-10 22:47:08 +03:00
|
|
|
if (retry) {
|
|
|
|
goto try_again;
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
*success = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(file);
|
|
|
|
#else
|
|
|
|
os_file_t file;
|
|
|
|
int create_flag;
|
|
|
|
ibool retry;
|
2003-07-13 00:17:02 +03:00
|
|
|
const char* mode_str = NULL;
|
|
|
|
const char* type_str = NULL;
|
|
|
|
const char* purpose_str = NULL;
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
try_again:
|
|
|
|
ut_a(name);
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW) {
|
2003-07-13 00:17:02 +03:00
|
|
|
mode_str = "OPEN";
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
create_flag = O_RDWR;
|
|
|
|
} else if (create_mode == OS_FILE_CREATE) {
|
2003-07-13 00:17:02 +03:00
|
|
|
mode_str = "CREATE";
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
create_flag = O_RDWR | O_CREAT | O_EXCL;
|
|
|
|
} else if (create_mode == OS_FILE_OVERWRITE) {
|
2003-07-13 00:17:02 +03:00
|
|
|
mode_str = "OVERWRITE";
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
create_flag = O_RDWR | O_CREAT | O_TRUNC;
|
|
|
|
} else {
|
|
|
|
create_flag = 0;
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
2003-07-13 00:17:02 +03:00
|
|
|
if (type == OS_LOG_FILE) {
|
|
|
|
type_str = "LOG";
|
|
|
|
} else if (type == OS_DATA_FILE) {
|
|
|
|
type_str = "DATA";
|
|
|
|
} else {
|
|
|
|
ut_a(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (purpose == OS_FILE_AIO) {
|
|
|
|
purpose_str = "AIO";
|
|
|
|
} else if (purpose == OS_FILE_NORMAL) {
|
|
|
|
purpose_str = "NORMAL";
|
|
|
|
} else {
|
|
|
|
ut_a(0);
|
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2003-07-13 00:17:02 +03:00
|
|
|
/* printf("Opening file %s, mode %s, type %s, purpose %s\n",
|
|
|
|
name, mode_str, type_str, purpose_str); */
|
2001-07-20 19:01:23 +03:00
|
|
|
#ifdef O_SYNC
|
2003-07-13 00:17:02 +03:00
|
|
|
/* We let O_SYNC only affect log files; note that we map O_DSYNC to
|
|
|
|
O_SYNC because the datasync options seemed to corrupt files in 2001
|
|
|
|
in both Linux and Solaris */
|
|
|
|
if (type == OS_LOG_FILE
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
&& srv_unix_file_flush_method == SRV_UNIX_O_DSYNC) {
|
|
|
|
|
2003-07-13 00:17:02 +03:00
|
|
|
/* printf("Using O_SYNC for file %s\n", name); */
|
|
|
|
|
2001-07-20 19:01:23 +03:00
|
|
|
create_flag = create_flag | O_SYNC;
|
2001-05-23 20:19:56 +03:00
|
|
|
}
|
2003-07-13 00:17:02 +03:00
|
|
|
#endif
|
|
|
|
#ifdef O_DIRECT
|
|
|
|
/* We let O_DIRECT only affect data files */
|
|
|
|
if (type != OS_LOG_FILE
|
|
|
|
&& srv_unix_file_flush_method == SRV_UNIX_O_DIRECT) {
|
|
|
|
|
|
|
|
/* printf("Using O_DIRECT for file %s\n", name); */
|
|
|
|
|
|
|
|
create_flag = create_flag | O_DIRECT;
|
|
|
|
}
|
2001-05-23 20:19:56 +03:00
|
|
|
#endif
|
2001-02-17 14:19:19 +02:00
|
|
|
if (create_mode == OS_FILE_CREATE) {
|
2002-06-22 20:41:14 +03:00
|
|
|
file = open(name, create_flag, os_innodb_umask);
|
2001-02-17 14:19:19 +02:00
|
|
|
} else {
|
|
|
|
file = open(name, create_flag);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (file == -1) {
|
|
|
|
*success = FALSE;
|
|
|
|
|
2003-06-01 23:40:01 +03:00
|
|
|
retry = os_file_handle_error(file, name,
|
2003-10-07 17:28:59 +03:00
|
|
|
create_mode == OS_FILE_CREATE ?
|
|
|
|
"create" : "open");
|
2001-10-10 22:47:08 +03:00
|
|
|
if (retry) {
|
|
|
|
goto try_again;
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
*success = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(file);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
/***************************************************************************
|
|
|
|
Deletes a file. The file has to be closed before calling this. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_file_delete(
|
|
|
|
/*===========*/
|
|
|
|
/* out: TRUE if success */
|
|
|
|
char* name) /* in: file path as a null-terminated string */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
os_file_t dummy = NULL;
|
|
|
|
BOOL ret;
|
|
|
|
|
|
|
|
ret = DeleteFile((LPCTSTR)name);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
os_file_handle_error(dummy, name, "delete");
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
#else
|
|
|
|
os_file_t dummy = 0;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = unlink((const char*)name);
|
|
|
|
|
|
|
|
if (ret != 0) {
|
|
|
|
os_file_handle_error(dummy, name, "delete");
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
Renames a file (can also move it to another directory). It is safest that the
|
|
|
|
file is closed before calling this function. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_file_rename(
|
|
|
|
/*===========*/
|
|
|
|
/* out: TRUE if success */
|
|
|
|
char* oldpath, /* in: old file path as a null-terminated
|
|
|
|
string */
|
|
|
|
char* newpath) /* in: new file path */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
os_file_t dummy = NULL;
|
|
|
|
BOOL ret;
|
|
|
|
|
|
|
|
ret = MoveFile((LPCTSTR)oldpath, (LPCTSTR)newpath);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
os_file_handle_error(dummy, oldpath, "delete");
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
#else
|
|
|
|
os_file_t dummy = 0;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = rename((const char*)oldpath, (const char*)newpath);
|
|
|
|
|
|
|
|
if (ret != 0) {
|
|
|
|
os_file_handle_error(dummy, oldpath, "rename");
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/***************************************************************************
|
|
|
|
Closes a file handle. In case of error, error number can be retrieved with
|
|
|
|
os_file_get_last_error. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_file_close(
|
|
|
|
/*==========*/
|
|
|
|
/* out: TRUE if success */
|
|
|
|
os_file_t file) /* in, own: handle to a file */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
BOOL ret;
|
|
|
|
|
|
|
|
ut_a(file);
|
|
|
|
|
|
|
|
ret = CloseHandle(file);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
2003-06-01 23:40:01 +03:00
|
|
|
os_file_handle_error(file, NULL, "close");
|
2001-02-17 14:19:19 +02:00
|
|
|
return(FALSE);
|
|
|
|
#else
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = close(file);
|
|
|
|
|
|
|
|
if (ret == -1) {
|
2003-06-01 23:40:01 +03:00
|
|
|
os_file_handle_error(file, NULL, "close");
|
2001-02-17 14:19:19 +02:00
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
/***************************************************************************
|
|
|
|
Closes a file handle. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_file_close_no_error_handling(
|
|
|
|
/*============================*/
|
|
|
|
/* out: TRUE if success */
|
|
|
|
os_file_t file) /* in, own: handle to a file */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
BOOL ret;
|
|
|
|
|
|
|
|
ut_a(file);
|
|
|
|
|
|
|
|
ret = CloseHandle(file);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
#else
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = close(file);
|
|
|
|
|
|
|
|
if (ret == -1) {
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/***************************************************************************
|
|
|
|
Gets a file size. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_file_get_size(
|
|
|
|
/*=============*/
|
|
|
|
/* out: TRUE if success */
|
|
|
|
os_file_t file, /* in: handle to a file */
|
|
|
|
ulint* size, /* out: least significant 32 bits of file
|
|
|
|
size */
|
|
|
|
ulint* size_high)/* out: most significant 32 bits of size */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
DWORD high;
|
|
|
|
DWORD low;
|
|
|
|
|
|
|
|
low = GetFileSize(file, &high);
|
|
|
|
|
|
|
|
if ((low == 0xFFFFFFFF) && (GetLastError() != NO_ERROR)) {
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
*size = low;
|
|
|
|
*size_high = high;
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
#else
|
2001-10-30 17:38:44 +02:00
|
|
|
off_t offs;
|
|
|
|
|
|
|
|
offs = lseek(file, 0, SEEK_END);
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
if (offs == ((off_t)-1)) {
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
2001-10-30 17:38:44 +02:00
|
|
|
if (sizeof(off_t) > 4) {
|
2003-10-07 17:28:59 +03:00
|
|
|
*size = (ulint)(offs & 0xFFFFFFFFUL);
|
2001-10-30 22:19:38 +02:00
|
|
|
*size_high = (ulint)(offs >> 32);
|
2001-10-30 17:38:44 +02:00
|
|
|
} else {
|
|
|
|
*size = (ulint) offs;
|
|
|
|
*size_high = 0;
|
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
Sets a file size. This function can be used to extend or truncate a file. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_file_set_size(
|
|
|
|
/*=============*/
|
|
|
|
/* out: TRUE if success */
|
|
|
|
char* name, /* in: name of the file or path as a
|
|
|
|
null-terminated string */
|
|
|
|
os_file_t file, /* in: handle to a file */
|
|
|
|
ulint size, /* in: least significant 32 bits of file
|
|
|
|
size */
|
|
|
|
ulint size_high)/* in: most significant 32 bits of size */
|
|
|
|
{
|
2001-10-30 17:38:44 +02:00
|
|
|
ib_longlong offset;
|
|
|
|
ib_longlong low;
|
|
|
|
ulint n_bytes;
|
|
|
|
ibool ret;
|
|
|
|
byte* buf;
|
2002-07-19 08:33:52 +03:00
|
|
|
byte* buf2;
|
2001-10-30 17:38:44 +02:00
|
|
|
ulint i;
|
|
|
|
|
2001-10-30 22:19:38 +02:00
|
|
|
ut_a(size == (size & 0xFFFFFFFF));
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2001-05-20 20:22:23 +03:00
|
|
|
/* We use a very big 8 MB buffer in writing because Linux may be
|
2001-10-30 17:38:44 +02:00
|
|
|
extremely slow in fsync on 1 MB writes */
|
2001-05-16 19:12:47 +03:00
|
|
|
|
2002-07-19 08:33:52 +03:00
|
|
|
buf2 = ut_malloc(UNIV_PAGE_SIZE * 513);
|
|
|
|
|
|
|
|
/* Align the buffer for possible raw i/o */
|
|
|
|
buf = ut_align(buf2, UNIV_PAGE_SIZE);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
/* Write buffer full of zeros */
|
2001-05-20 20:22:23 +03:00
|
|
|
for (i = 0; i < UNIV_PAGE_SIZE * 512; i++) {
|
2001-02-17 14:19:19 +02:00
|
|
|
buf[i] = '\0';
|
|
|
|
}
|
|
|
|
|
|
|
|
offset = 0;
|
2001-10-30 22:19:38 +02:00
|
|
|
low = (ib_longlong)size + (((ib_longlong)size_high) << 32);
|
2003-05-04 15:42:47 +03:00
|
|
|
|
|
|
|
if (low >= (ib_longlong)(100 * 1024 * 1024)) {
|
2001-10-30 22:19:38 +02:00
|
|
|
|
2003-05-04 15:42:47 +03:00
|
|
|
fprintf(stderr, "InnoDB: Progress in MB:");
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
while (offset < low) {
|
2001-05-20 20:22:23 +03:00
|
|
|
if (low - offset < UNIV_PAGE_SIZE * 512) {
|
2001-10-30 17:38:44 +02:00
|
|
|
n_bytes = (ulint)(low - offset);
|
2001-02-17 14:19:19 +02:00
|
|
|
} else {
|
2001-10-30 17:38:44 +02:00
|
|
|
n_bytes = UNIV_PAGE_SIZE * 512;
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
2001-10-30 17:38:44 +02:00
|
|
|
ret = os_file_write(name, file, buf,
|
|
|
|
(ulint)(offset & 0xFFFFFFFF),
|
2001-10-30 22:19:38 +02:00
|
|
|
(ulint)(offset >> 32),
|
2001-10-30 17:38:44 +02:00
|
|
|
n_bytes);
|
2001-02-17 14:19:19 +02:00
|
|
|
if (!ret) {
|
2002-07-19 17:09:40 +03:00
|
|
|
ut_free(buf2);
|
2001-02-17 14:19:19 +02:00
|
|
|
goto error_handling;
|
|
|
|
}
|
2003-05-04 15:42:47 +03:00
|
|
|
|
|
|
|
/* Print about progress for each 100 MB written */
|
|
|
|
if ((offset + n_bytes) / (ib_longlong)(100 * 1024 * 1024)
|
|
|
|
!= offset / (ib_longlong)(100 * 1024 * 1024)) {
|
|
|
|
|
|
|
|
fprintf(stderr, " %lu00",
|
|
|
|
(ulint)((offset + n_bytes)
|
|
|
|
/ (ib_longlong)(100 * 1024 * 1024)));
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
offset += n_bytes;
|
|
|
|
}
|
|
|
|
|
2003-05-04 15:42:47 +03:00
|
|
|
if (low >= (ib_longlong)(100 * 1024 * 1024)) {
|
|
|
|
|
|
|
|
fprintf(stderr, "\n");
|
|
|
|
}
|
|
|
|
|
2002-07-19 08:33:52 +03:00
|
|
|
ut_free(buf2);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
ret = os_file_flush(file);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
error_handling:
|
ut0ut.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
page0page.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
que0que.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0ins.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0sel.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0upd.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0vers.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0start.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0arr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0rec.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0trx.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ut0dbg.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
lock0lock.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0log.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0recv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ibuf0ibuf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
hash0hash.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mach0data.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0mem.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mtr0mtr.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
univ.i Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
com0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0data.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0type.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0crea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0dict.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fil0fil.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fsp0fsp.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fut0lst.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0sea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0flu.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0btr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0cur.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0btr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0cur.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0sea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0buf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0flu.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/com/com0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0data.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0type.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0crea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0dict.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fil/fil0fil.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fsp/fsp0fsp.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fut/fut0lst.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ibuf/ibuf0ibuf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/hash0hash.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mach0data.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0mem.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0pool.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mtr0mtr.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0file.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0thread.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/row0mysql.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/univ.i:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/srv0srv.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0rw.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/ut0dbg.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/lock/lock0lock.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0log.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0recv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/mem/mem0pool.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0file.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0thread.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/page/page0page.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/que/que0que.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0ins.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0mysql.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0sel.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0upd.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0vers.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0srv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0start.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0arr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0rw.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0rec.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0trx.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ut/ut0ut.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
2001-03-02 17:33:11 +02:00
|
|
|
return(FALSE);
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
Flushes the write buffers of a given file to the disk. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_file_flush(
|
|
|
|
/*==========*/
|
|
|
|
/* out: TRUE if success */
|
|
|
|
os_file_t file) /* in, own: handle to a file */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
BOOL ret;
|
|
|
|
|
|
|
|
ut_a(file);
|
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
os_n_fsyncs++;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
ret = FlushFileBuffers(file);
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
/* Since Windows returns ERROR_INVALID_FUNCTION if the 'file' is
|
|
|
|
actually a raw device, we choose to ignore that error if we are using
|
|
|
|
raw disks */
|
|
|
|
|
|
|
|
if (srv_start_raw_disk_in_use && GetLastError()
|
|
|
|
== ERROR_INVALID_FUNCTION) {
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
2003-06-01 23:40:01 +03:00
|
|
|
os_file_handle_error(file, NULL, "flush");
|
2001-10-10 22:47:08 +03:00
|
|
|
|
2002-06-26 10:09:11 +03:00
|
|
|
/* It is a fatal error if a file flush does not succeed, because then
|
|
|
|
the database can get corrupt on disk */
|
|
|
|
ut_a(0);
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
return(FALSE);
|
|
|
|
#else
|
|
|
|
int ret;
|
2001-05-23 20:19:56 +03:00
|
|
|
|
2001-05-16 19:12:47 +03:00
|
|
|
#ifdef HAVE_FDATASYNC
|
2001-05-14 17:45:38 +03:00
|
|
|
ret = fdatasync(file);
|
|
|
|
#else
|
srv0srv.c, os0file.c, log0recv.h, log0log.h, fil0fil.h, fsp0fsp.c, fil0fil.c:
Merge
trx0trx.c:
Print more info about a trx in SHOW INNODB status; try to find the bug reported by Plaxo
buf0buf.c:
Check that page log sequence numbers are not in the future
log0recv.c, log0log.c:
Fixed a bug: if you used big BLOBs, and your log files were relatively small, InnoDB could in a big BLOB operation temporarily write over the log produced AFTER the latest checkpoint. If InnoDB would crash at that moment, then the crash recovery would fail, because InnoDB would not be able to scan the log even up to the latest checkpoint. Starting from this version, InnoDB tries to ensure the latest checkpoint is young enough. If that is not possible, InnoDB prints a warning to the .err log
innobase/log/log0log.c:
Fixed a bug: if you used big BLOBs, and your log files were relatively small, InnoDB could in a big BLOB operation temporarily write over the log produced AFTER the latest checkpoint. If InnoDB would crash at that moment, then the crash recovery would fail, because InnoDB would not be able to scan the log even up to the latest checkpoint. Starting from this version, InnoDB tries to ensure the latest checkpoint is young enough. If that is not possible, InnoDB prints a warning to the .err log
innobase/log/log0recv.c:
Fixed a bug: if you used big BLOBs, and your log files were relatively small, InnoDB could in a big BLOB operation temporarily write over the log produced AFTER the latest checkpoint. If InnoDB would crash at that moment, then the crash recovery would fail, because InnoDB would not be able to scan the log even up to the latest checkpoint. Starting from this version, InnoDB tries to ensure the latest checkpoint is young enough. If that is not possible, InnoDB prints a warning to the .err log
innobase/buf/buf0buf.c:
Check that page log sequence numbers are not in the future
innobase/trx/trx0trx.c:
Print more info about a trx in SHOW INNODB status; try to find the bug reported by Plaxo
innobase/fil/fil0fil.c:
Merge
innobase/fsp/fsp0fsp.c:
Merge
innobase/include/fil0fil.h:
Merge
innobase/include/log0log.h:
Merge
innobase/include/log0recv.h:
Merge
innobase/os/os0file.c:
Merge
innobase/srv/srv0srv.c:
Merge
2003-07-25 22:26:39 +03:00
|
|
|
/* printf("Flushing to file %lu\n", (ulint)file); */
|
2001-02-17 14:19:19 +02:00
|
|
|
ret = fsync(file);
|
2001-05-14 17:45:38 +03:00
|
|
|
#endif
|
2001-10-10 22:47:08 +03:00
|
|
|
os_n_fsyncs++;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
if (ret == 0) {
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
2001-12-27 00:56:40 +02:00
|
|
|
/* Since Linux returns EINVAL if the 'file' is actually a raw device,
|
2003-10-07 17:28:59 +03:00
|
|
|
we choose to ignore that error if we are using raw disks */
|
|
|
|
|
|
|
|
if (srv_start_raw_disk_in_use && errno == EINVAL) {
|
2001-12-27 00:56:40 +02:00
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
2002-06-26 10:09:11 +03:00
|
|
|
ut_print_timestamp(stderr);
|
|
|
|
|
2001-06-24 19:51:20 +03:00
|
|
|
fprintf(stderr,
|
2002-06-26 10:09:11 +03:00
|
|
|
" InnoDB: Error: the OS said file flush did not succeed\n");
|
2001-06-24 19:51:20 +03:00
|
|
|
|
2003-06-01 23:40:01 +03:00
|
|
|
os_file_handle_error(file, NULL, "flush");
|
2001-06-24 19:51:20 +03:00
|
|
|
|
2002-06-26 10:09:11 +03:00
|
|
|
/* It is a fatal error if a file flush does not succeed, because then
|
|
|
|
the database can get corrupt on disk */
|
|
|
|
ut_a(0);
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
return(FALSE);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef __WIN__
|
|
|
|
/***********************************************************************
|
|
|
|
Does a synchronous read operation in Posix. */
|
|
|
|
static
|
|
|
|
ssize_t
|
|
|
|
os_file_pread(
|
|
|
|
/*==========*/
|
|
|
|
/* out: number of bytes read, -1 if error */
|
|
|
|
os_file_t file, /* in: handle to a file */
|
|
|
|
void* buf, /* in: buffer where to read */
|
|
|
|
ulint n, /* in: number of bytes to read */
|
2001-10-30 17:38:44 +02:00
|
|
|
ulint offset, /* in: least significant 32 bits of file
|
|
|
|
offset from where to read */
|
|
|
|
ulint offset_high) /* in: most significant 32 bits of
|
|
|
|
offset */
|
2001-02-17 14:19:19 +02:00
|
|
|
{
|
2001-10-30 17:38:44 +02:00
|
|
|
off_t offs;
|
2003-06-15 01:04:28 +03:00
|
|
|
ssize_t n_bytes;
|
2001-10-30 17:38:44 +02:00
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
ut_a((offset & 0xFFFFFFFFUL) == offset);
|
2001-10-30 17:38:44 +02:00
|
|
|
|
|
|
|
/* If off_t is > 4 bytes in size, then we assume we can pass a
|
|
|
|
64-bit address */
|
|
|
|
|
|
|
|
if (sizeof(off_t) > 4) {
|
2001-10-30 22:19:38 +02:00
|
|
|
offs = (off_t)offset + (((off_t)offset_high) << 32);
|
|
|
|
|
2001-10-30 17:38:44 +02:00
|
|
|
} else {
|
|
|
|
offs = (off_t)offset;
|
|
|
|
|
|
|
|
if (offset_high > 0) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: Error: file read at offset > 4 GB\n");
|
|
|
|
}
|
|
|
|
}
|
2001-05-03 14:16:11 +03:00
|
|
|
|
2001-10-10 22:47:08 +03:00
|
|
|
os_n_file_reads++;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
#ifdef HAVE_PREAD
|
2003-06-15 01:04:28 +03:00
|
|
|
os_mutex_enter(os_file_count_mutex);
|
|
|
|
os_file_n_pending_preads++;
|
|
|
|
os_mutex_exit(os_file_count_mutex);
|
|
|
|
|
|
|
|
n_bytes = pread(file, buf, n, offs);
|
|
|
|
|
|
|
|
os_mutex_enter(os_file_count_mutex);
|
|
|
|
os_file_n_pending_preads--;
|
|
|
|
os_mutex_exit(os_file_count_mutex);
|
|
|
|
|
|
|
|
return(n_bytes);
|
2001-02-17 14:19:19 +02:00
|
|
|
#else
|
2001-10-11 12:49:44 +03:00
|
|
|
{
|
2001-02-17 14:19:19 +02:00
|
|
|
ssize_t ret;
|
|
|
|
ulint i;
|
|
|
|
|
|
|
|
/* Protect the seek / read operation with a mutex */
|
|
|
|
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES;
|
|
|
|
|
|
|
|
os_mutex_enter(os_file_seek_mutexes[i]);
|
|
|
|
|
2001-05-03 14:16:11 +03:00
|
|
|
ret = lseek(file, offs, 0);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
if (ret < 0) {
|
|
|
|
os_mutex_exit(os_file_seek_mutexes[i]);
|
|
|
|
|
|
|
|
return(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = read(file, buf, n);
|
|
|
|
|
|
|
|
os_mutex_exit(os_file_seek_mutexes[i]);
|
|
|
|
|
|
|
|
return(ret);
|
2001-10-11 12:49:44 +03:00
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
Does a synchronous write operation in Posix. */
|
|
|
|
static
|
|
|
|
ssize_t
|
|
|
|
os_file_pwrite(
|
|
|
|
/*===========*/
|
|
|
|
/* out: number of bytes written, -1 if error */
|
|
|
|
os_file_t file, /* in: handle to a file */
|
|
|
|
void* buf, /* in: buffer from where to write */
|
|
|
|
ulint n, /* in: number of bytes to write */
|
2001-10-30 17:38:44 +02:00
|
|
|
ulint offset, /* in: least significant 32 bits of file
|
|
|
|
offset where to write */
|
|
|
|
ulint offset_high) /* in: most significant 32 bits of
|
|
|
|
offset */
|
2001-02-17 14:19:19 +02:00
|
|
|
{
|
2001-04-26 16:36:59 +03:00
|
|
|
ssize_t ret;
|
2001-10-30 17:38:44 +02:00
|
|
|
off_t offs;
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
ut_a((offset & 0xFFFFFFFFUL) == offset);
|
2001-10-30 17:38:44 +02:00
|
|
|
|
|
|
|
/* If off_t is > 4 bytes in size, then we assume we can pass a
|
|
|
|
64-bit address */
|
|
|
|
|
|
|
|
if (sizeof(off_t) > 4) {
|
2002-03-21 18:03:09 +02:00
|
|
|
offs = (off_t)offset + (((off_t)offset_high) << 32);
|
2001-10-30 17:38:44 +02:00
|
|
|
} else {
|
|
|
|
offs = (off_t)offset;
|
|
|
|
|
|
|
|
if (offset_high > 0) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: Error: file write at offset > 4 GB\n");
|
|
|
|
}
|
|
|
|
}
|
2001-04-26 16:36:59 +03:00
|
|
|
|
2001-10-10 22:47:08 +03:00
|
|
|
os_n_file_writes++;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
#ifdef HAVE_PWRITE
|
2003-06-15 01:04:28 +03:00
|
|
|
os_mutex_enter(os_file_count_mutex);
|
|
|
|
os_file_n_pending_pwrites++;
|
|
|
|
os_mutex_exit(os_file_count_mutex);
|
|
|
|
|
2001-05-03 14:16:11 +03:00
|
|
|
ret = pwrite(file, buf, n, offs);
|
2001-04-26 16:36:59 +03:00
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
os_mutex_enter(os_file_count_mutex);
|
|
|
|
os_file_n_pending_pwrites--;
|
|
|
|
os_mutex_exit(os_file_count_mutex);
|
|
|
|
|
2001-05-23 20:19:56 +03:00
|
|
|
if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
&& srv_unix_file_flush_method != SRV_UNIX_NOSYNC
|
2002-03-21 18:03:09 +02:00
|
|
|
&& !os_do_not_call_flush_at_each_write) {
|
|
|
|
|
2001-05-23 20:19:56 +03:00
|
|
|
/* Always do fsync to reduce the probability that when
|
|
|
|
the OS crashes, a database page is only partially
|
|
|
|
physically written to disk. */
|
2001-04-26 16:36:59 +03:00
|
|
|
|
2001-05-23 20:19:56 +03:00
|
|
|
ut_a(TRUE == os_file_flush(file));
|
|
|
|
}
|
2001-04-26 16:36:59 +03:00
|
|
|
|
|
|
|
return(ret);
|
2001-02-17 14:19:19 +02:00
|
|
|
#else
|
2001-10-11 12:49:44 +03:00
|
|
|
{
|
2001-02-17 14:19:19 +02:00
|
|
|
ulint i;
|
|
|
|
|
|
|
|
/* Protect the seek / write operation with a mutex */
|
|
|
|
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES;
|
|
|
|
|
|
|
|
os_mutex_enter(os_file_seek_mutexes[i]);
|
|
|
|
|
2001-05-03 14:16:11 +03:00
|
|
|
ret = lseek(file, offs, 0);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
if (ret < 0) {
|
|
|
|
os_mutex_exit(os_file_seek_mutexes[i]);
|
|
|
|
|
|
|
|
return(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = write(file, buf, n);
|
|
|
|
|
2001-05-23 20:19:56 +03:00
|
|
|
if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
&& srv_unix_file_flush_method != SRV_UNIX_NOSYNC
|
2002-03-21 18:03:09 +02:00
|
|
|
&& !os_do_not_call_flush_at_each_write) {
|
2001-04-26 16:36:59 +03:00
|
|
|
|
2001-05-23 20:19:56 +03:00
|
|
|
/* Always do fsync to reduce the probability that when
|
|
|
|
the OS crashes, a database page is only partially
|
|
|
|
physically written to disk. */
|
|
|
|
|
|
|
|
ut_a(TRUE == os_file_flush(file));
|
|
|
|
}
|
2001-04-26 16:36:59 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
os_mutex_exit(os_file_seek_mutexes[i]);
|
|
|
|
|
|
|
|
return(ret);
|
2001-10-11 12:49:44 +03:00
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
Requests a synchronous positioned read operation. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_file_read(
|
|
|
|
/*=========*/
|
|
|
|
/* out: TRUE if request was
|
|
|
|
successful, FALSE if fail */
|
|
|
|
os_file_t file, /* in: handle to a file */
|
|
|
|
void* buf, /* in: buffer where to read */
|
|
|
|
ulint offset, /* in: least significant 32 bits of file
|
|
|
|
offset where to read */
|
|
|
|
ulint offset_high, /* in: most significant 32 bits of
|
|
|
|
offset */
|
|
|
|
ulint n) /* in: number of bytes to read */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
BOOL ret;
|
|
|
|
DWORD len;
|
|
|
|
DWORD ret2;
|
|
|
|
DWORD low;
|
|
|
|
DWORD high;
|
|
|
|
ibool retry;
|
|
|
|
ulint i;
|
|
|
|
|
2003-10-07 17:28:59 +03:00
|
|
|
ut_a((offset & 0xFFFFFFFFUL) == offset);
|
2001-10-30 17:38:44 +02:00
|
|
|
|
2001-10-10 22:47:08 +03:00
|
|
|
os_n_file_reads++;
|
2002-06-22 20:41:14 +03:00
|
|
|
os_bytes_read_since_printout += n;
|
2001-10-10 22:47:08 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
try_again:
|
|
|
|
ut_ad(file);
|
|
|
|
ut_ad(buf);
|
|
|
|
ut_ad(n > 0);
|
|
|
|
|
|
|
|
low = offset;
|
|
|
|
high = offset_high;
|
|
|
|
|
|
|
|
/* Protect the seek / read operation with a mutex */
|
|
|
|
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES;
|
|
|
|
|
|
|
|
os_mutex_enter(os_file_seek_mutexes[i]);
|
|
|
|
|
|
|
|
ret2 = SetFilePointer(file, low, &high, FILE_BEGIN);
|
|
|
|
|
|
|
|
if (ret2 == 0xFFFFFFFF && GetLastError() != NO_ERROR) {
|
|
|
|
|
|
|
|
os_mutex_exit(os_file_seek_mutexes[i]);
|
|
|
|
|
|
|
|
goto error_handling;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ReadFile(file, buf, n, &len, NULL);
|
|
|
|
|
|
|
|
os_mutex_exit(os_file_seek_mutexes[i]);
|
|
|
|
|
|
|
|
if (ret && len == n) {
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
ibool retry;
|
|
|
|
ssize_t ret;
|
2001-10-30 17:38:44 +02:00
|
|
|
|
2002-10-06 14:53:49 +03:00
|
|
|
os_bytes_read_since_printout += n;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
try_again:
|
2001-10-30 17:38:44 +02:00
|
|
|
ret = os_file_pread(file, buf, n, offset, offset_high);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
ut0ut.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
page0page.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
que0que.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0ins.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0sel.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0upd.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0vers.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0start.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0arr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0rec.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0trx.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ut0dbg.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
lock0lock.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0log.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0recv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ibuf0ibuf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
hash0hash.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mach0data.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0mem.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mtr0mtr.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
univ.i Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
com0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0data.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0type.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0crea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0dict.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fil0fil.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fsp0fsp.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fut0lst.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0sea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0flu.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0btr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0cur.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0btr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0cur.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0sea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0buf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0flu.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/com/com0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0data.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0type.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0crea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0dict.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fil/fil0fil.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fsp/fsp0fsp.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fut/fut0lst.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ibuf/ibuf0ibuf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/hash0hash.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mach0data.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0mem.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0pool.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mtr0mtr.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0file.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0thread.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/row0mysql.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/univ.i:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/srv0srv.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0rw.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/ut0dbg.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/lock/lock0lock.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0log.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0recv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/mem/mem0pool.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0file.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0thread.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/page/page0page.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/que/que0que.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0ins.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0mysql.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0sel.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0upd.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0vers.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0srv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0start.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0arr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0rw.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0rec.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0trx.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ut/ut0ut.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
2001-03-02 17:33:11 +02:00
|
|
|
if ((ulint)ret == n) {
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
#endif
|
2001-10-31 20:28:43 +02:00
|
|
|
#ifdef __WIN__
|
2001-02-17 14:19:19 +02:00
|
|
|
error_handling:
|
2001-10-31 20:28:43 +02:00
|
|
|
#endif
|
2003-06-01 23:40:01 +03:00
|
|
|
retry = os_file_handle_error(file, NULL, "read");
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
if (retry) {
|
|
|
|
goto try_again;
|
|
|
|
}
|
2003-03-07 10:07:06 +02:00
|
|
|
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: Fatal error: cannot read from file. OS error number %lu.\n",
|
|
|
|
#ifdef __WIN__
|
|
|
|
(ulint)GetLastError()
|
|
|
|
#else
|
|
|
|
(ulint)errno
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
fflush(stderr);
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
ut_error;
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
Requests a synchronous write operation. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_file_write(
|
|
|
|
/*==========*/
|
|
|
|
/* out: TRUE if request was
|
|
|
|
successful, FALSE if fail */
|
|
|
|
char* name, /* in: name of the file or path as a
|
|
|
|
null-terminated string */
|
|
|
|
os_file_t file, /* in: handle to a file */
|
|
|
|
void* buf, /* in: buffer from which to write */
|
|
|
|
ulint offset, /* in: least significant 32 bits of file
|
|
|
|
offset where to write */
|
|
|
|
ulint offset_high, /* in: most significant 32 bits of
|
|
|
|
offset */
|
|
|
|
ulint n) /* in: number of bytes to write */
|
|
|
|
{
|
|
|
|
#ifdef __WIN__
|
|
|
|
BOOL ret;
|
|
|
|
DWORD len;
|
|
|
|
DWORD ret2;
|
|
|
|
DWORD low;
|
|
|
|
DWORD high;
|
|
|
|
ulint i;
|
2003-01-21 00:18:48 +02:00
|
|
|
ulint n_retries = 0;
|
2003-07-13 00:17:02 +03:00
|
|
|
ulint err;
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2001-10-30 22:19:38 +02:00
|
|
|
ut_a((offset & 0xFFFFFFFF) == offset);
|
2001-10-30 17:38:44 +02:00
|
|
|
|
2001-10-10 22:47:08 +03:00
|
|
|
os_n_file_writes++;
|
2002-03-21 18:03:09 +02:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
ut_ad(file);
|
|
|
|
ut_ad(buf);
|
|
|
|
ut_ad(n > 0);
|
2003-01-21 00:18:48 +02:00
|
|
|
retry:
|
2001-02-17 14:19:19 +02:00
|
|
|
low = offset;
|
|
|
|
high = offset_high;
|
|
|
|
|
|
|
|
/* Protect the seek / write operation with a mutex */
|
|
|
|
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES;
|
|
|
|
|
|
|
|
os_mutex_enter(os_file_seek_mutexes[i]);
|
|
|
|
|
|
|
|
ret2 = SetFilePointer(file, low, &high, FILE_BEGIN);
|
|
|
|
|
|
|
|
if (ret2 == 0xFFFFFFFF && GetLastError() != NO_ERROR) {
|
|
|
|
|
|
|
|
os_mutex_exit(os_file_seek_mutexes[i]);
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
ut_print_timestamp(stderr);
|
|
|
|
|
|
|
|
fprintf(stderr,
|
|
|
|
" InnoDB: Error: File pointer positioning to file %s failed at\n"
|
2002-07-08 19:34:49 +03:00
|
|
|
"InnoDB: offset %lu %lu. Operating system error number %lu.\n"
|
|
|
|
"InnoDB: Look from section 13.2 at http://www.innodb.com/ibman.html\n"
|
|
|
|
"InnoDB: what the error number means.\n",
|
2002-03-21 18:03:09 +02:00
|
|
|
name, offset_high, offset,
|
|
|
|
(ulint)GetLastError());
|
|
|
|
|
|
|
|
return(FALSE);
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = WriteFile(file, buf, n, &len, NULL);
|
2001-04-26 16:36:59 +03:00
|
|
|
|
|
|
|
/* Always do fsync to reduce the probability that when the OS crashes,
|
|
|
|
a database page is only partially physically written to disk. */
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
if (!os_do_not_call_flush_at_each_write) {
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
ut_a(TRUE == os_file_flush(file));
|
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
os_mutex_exit(os_file_seek_mutexes[i]);
|
2001-04-26 16:36:59 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
if (ret && len == n) {
|
2002-03-21 18:03:09 +02:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
return(TRUE);
|
|
|
|
}
|
2002-03-21 18:03:09 +02:00
|
|
|
|
2003-01-21 13:37:41 +02:00
|
|
|
/* If some background file system backup tool is running, then, at
|
|
|
|
least in Windows 2000, we may get here a specific error. Let us
|
|
|
|
retry the operation 100 times, with 1 second waits. */
|
2003-01-21 00:18:48 +02:00
|
|
|
|
2003-01-21 13:37:41 +02:00
|
|
|
if (GetLastError() == ERROR_LOCK_VIOLATION && n_retries < 100) {
|
2003-01-21 00:18:48 +02:00
|
|
|
|
2003-01-21 13:37:41 +02:00
|
|
|
os_thread_sleep(1000000);
|
|
|
|
|
2003-01-21 00:18:48 +02:00
|
|
|
n_retries++;
|
|
|
|
|
|
|
|
goto retry;
|
|
|
|
}
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
if (!os_has_said_disk_full) {
|
|
|
|
|
2003-07-13 00:17:02 +03:00
|
|
|
err = (ulint)GetLastError();
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
ut_print_timestamp(stderr);
|
|
|
|
|
|
|
|
fprintf(stderr,
|
|
|
|
" InnoDB: Error: Write to file %s failed at offset %lu %lu.\n"
|
|
|
|
"InnoDB: %lu bytes should have been written, only %lu were written.\n"
|
|
|
|
"InnoDB: Operating system error number %lu.\n"
|
|
|
|
"InnoDB: Check that your OS and file system support files of this size.\n"
|
2002-07-08 19:34:49 +03:00
|
|
|
"InnoDB: Check also that the disk is not full or a disk quota exceeded.\n",
|
2003-01-21 00:18:48 +02:00
|
|
|
name, offset_high, offset, n, (ulint)len,
|
2003-07-13 00:17:02 +03:00
|
|
|
err);
|
|
|
|
|
|
|
|
if (strerror((int)err) != NULL) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: Error number %lu means '%s'.\n", err, strerror((int)err));
|
|
|
|
}
|
|
|
|
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: See also section 13.2 at http://www.innodb.com/ibman.html\n"
|
|
|
|
"InnoDB: about operating system error numbers.\n");
|
2002-03-21 18:03:09 +02:00
|
|
|
|
|
|
|
os_has_said_disk_full = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(FALSE);
|
2001-02-17 14:19:19 +02:00
|
|
|
#else
|
|
|
|
ssize_t ret;
|
|
|
|
|
2001-10-30 17:38:44 +02:00
|
|
|
ret = os_file_pwrite(file, buf, n, offset, offset_high);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
ut0ut.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
page0page.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
que0que.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0ins.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0sel.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0upd.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0vers.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0start.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0arr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0rec.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0trx.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ut0dbg.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
lock0lock.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0log.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0recv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ibuf0ibuf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
hash0hash.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mach0data.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0mem.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mtr0mtr.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
univ.i Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
com0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0data.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0type.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0crea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0dict.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fil0fil.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fsp0fsp.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fut0lst.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0sea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0flu.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0btr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0cur.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0btr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0cur.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0sea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0buf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0flu.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/com/com0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0data.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0type.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0crea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0dict.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fil/fil0fil.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fsp/fsp0fsp.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fut/fut0lst.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ibuf/ibuf0ibuf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/hash0hash.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mach0data.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0mem.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0pool.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mtr0mtr.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0file.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0thread.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/row0mysql.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/univ.i:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/srv0srv.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0rw.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/ut0dbg.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/lock/lock0lock.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0log.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0recv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/mem/mem0pool.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0file.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0thread.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/page/page0page.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/que/que0que.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0ins.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0mysql.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0sel.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0upd.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0vers.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0srv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0start.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0arr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0rw.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0rec.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0trx.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ut/ut0ut.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
2001-03-02 17:33:11 +02:00
|
|
|
if ((ulint)ret == n) {
|
2002-03-21 18:03:09 +02:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
if (!os_has_said_disk_full) {
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
ut_print_timestamp(stderr);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
fprintf(stderr,
|
|
|
|
" InnoDB: Error: Write to file %s failed at offset %lu %lu.\n"
|
2003-01-21 00:18:48 +02:00
|
|
|
"InnoDB: %lu bytes should have been written, only %ld were written.\n"
|
2002-03-21 18:03:09 +02:00
|
|
|
"InnoDB: Operating system error number %lu.\n"
|
|
|
|
"InnoDB: Check that your OS and file system support files of this size.\n"
|
2002-07-08 19:34:49 +03:00
|
|
|
"InnoDB: Check also that the disk is not full or a disk quota exceeded.\n",
|
2003-01-21 00:18:48 +02:00
|
|
|
name, offset_high, offset, n, (long int)ret,
|
2002-06-26 10:09:11 +03:00
|
|
|
(ulint)errno);
|
2003-07-13 00:17:02 +03:00
|
|
|
if (strerror(errno) != NULL) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: Error number %lu means '%s'.\n", (ulint)errno, strerror(errno));
|
|
|
|
}
|
|
|
|
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: See also section 13.2 at http://www.innodb.com/ibman.html\n"
|
|
|
|
"InnoDB: about operating system error numbers.\n");
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
os_has_said_disk_full = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
#endif
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/********************************************************************
|
|
|
|
Returns a pointer to the nth slot in the aio array. */
|
|
|
|
static
|
|
|
|
os_aio_slot_t*
|
|
|
|
os_aio_array_get_nth_slot(
|
|
|
|
/*======================*/
|
|
|
|
/* out: pointer to slot */
|
|
|
|
os_aio_array_t* array, /* in: aio array */
|
|
|
|
ulint index) /* in: index of the slot */
|
|
|
|
{
|
|
|
|
ut_a(index < array->n_slots);
|
|
|
|
|
|
|
|
return((array->slots) + index);
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
Creates an aio wait array. */
|
|
|
|
static
|
|
|
|
os_aio_array_t*
|
|
|
|
os_aio_array_create(
|
|
|
|
/*================*/
|
|
|
|
/* out, own: aio array */
|
|
|
|
ulint n, /* in: maximum number of pending aio operations
|
|
|
|
allowed; n must be divisible by n_segments */
|
|
|
|
ulint n_segments) /* in: number of segments in the aio array */
|
|
|
|
{
|
|
|
|
os_aio_array_t* array;
|
|
|
|
ulint i;
|
|
|
|
os_aio_slot_t* slot;
|
|
|
|
#ifdef WIN_ASYNC_IO
|
|
|
|
OVERLAPPED* over;
|
|
|
|
#endif
|
|
|
|
ut_a(n > 0);
|
|
|
|
ut_a(n_segments > 0);
|
|
|
|
|
|
|
|
array = ut_malloc(sizeof(os_aio_array_t));
|
|
|
|
|
|
|
|
array->mutex = os_mutex_create(NULL);
|
|
|
|
array->not_full = os_event_create(NULL);
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
array->is_empty = os_event_create(NULL);
|
|
|
|
|
|
|
|
os_event_set(array->is_empty);
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
array->n_slots = n;
|
|
|
|
array->n_segments = n_segments;
|
|
|
|
array->n_reserved = 0;
|
|
|
|
array->slots = ut_malloc(n * sizeof(os_aio_slot_t));
|
2003-06-02 13:11:20 +03:00
|
|
|
#ifdef __WIN__
|
|
|
|
array->native_events = ut_malloc(n * sizeof(os_native_event_t));
|
|
|
|
#endif
|
2001-02-17 14:19:19 +02:00
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
slot = os_aio_array_get_nth_slot(array, i);
|
|
|
|
|
|
|
|
slot->pos = i;
|
|
|
|
slot->reserved = FALSE;
|
|
|
|
#ifdef WIN_ASYNC_IO
|
2003-06-02 13:11:20 +03:00
|
|
|
slot->event = os_event_create(NULL);
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
over = &(slot->control);
|
|
|
|
|
2003-06-02 13:11:20 +03:00
|
|
|
over->hEvent = slot->event->handle;
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2003-06-02 13:11:20 +03:00
|
|
|
*((array->native_events) + i) = over->hEvent;
|
2001-02-17 14:19:19 +02:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
return(array);
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
2002-03-21 18:03:09 +02:00
|
|
|
Initializes the asynchronous io system. Calls also os_io_init_simple.
|
|
|
|
Creates a separate aio array for
|
2001-02-17 14:19:19 +02:00
|
|
|
non-ibuf read and write, a third aio array for the ibuf i/o, with just one
|
|
|
|
segment, two aio arrays for log reads and writes with one segment, and a
|
|
|
|
synchronous aio array of the specified size. The combined number of segments
|
|
|
|
in the three first aio arrays is the parameter n_segments given to the
|
|
|
|
function. The caller must create an i/o handler thread for each segment in
|
|
|
|
the four first arrays, but not for the sync aio array. */
|
|
|
|
|
|
|
|
void
|
|
|
|
os_aio_init(
|
|
|
|
/*========*/
|
|
|
|
ulint n, /* in: maximum number of pending aio operations
|
|
|
|
allowed; n must be divisible by n_segments */
|
|
|
|
ulint n_segments, /* in: combined number of segments in the four
|
|
|
|
first aio arrays; must be >= 4 */
|
|
|
|
ulint n_slots_sync) /* in: number of slots in the sync aio array */
|
|
|
|
{
|
|
|
|
ulint n_read_segs;
|
|
|
|
ulint n_write_segs;
|
|
|
|
ulint n_per_seg;
|
|
|
|
ulint i;
|
|
|
|
#ifdef POSIX_ASYNC_IO
|
|
|
|
sigset_t sigset;
|
|
|
|
#endif
|
|
|
|
ut_ad(n % n_segments == 0);
|
|
|
|
ut_ad(n_segments >= 4);
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
os_io_init_simple();
|
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
for (i = 0; i < n_segments; i++) {
|
|
|
|
srv_io_thread_op_info[i] = (char*)"not started yet";
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
n_per_seg = n / n_segments;
|
|
|
|
n_write_segs = (n_segments - 2) / 2;
|
|
|
|
n_read_segs = n_segments - 2 - n_write_segs;
|
|
|
|
|
|
|
|
/* printf("Array n per seg %lu\n", n_per_seg); */
|
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
os_aio_ibuf_array = os_aio_array_create(n_per_seg, 1);
|
|
|
|
|
|
|
|
srv_io_thread_function[0] = (char*)"insert buffer thread";
|
|
|
|
|
|
|
|
os_aio_log_array = os_aio_array_create(n_per_seg, 1);
|
|
|
|
|
|
|
|
srv_io_thread_function[1] = (char*)"log thread";
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
os_aio_read_array = os_aio_array_create(n_read_segs * n_per_seg,
|
|
|
|
n_read_segs);
|
2003-06-15 01:04:28 +03:00
|
|
|
for (i = 2; i < 2 + n_read_segs; i++) {
|
|
|
|
srv_io_thread_function[i] = (char*)"read thread";
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
os_aio_write_array = os_aio_array_create(n_write_segs * n_per_seg,
|
|
|
|
n_write_segs);
|
2003-06-15 01:04:28 +03:00
|
|
|
for (i = 2 + n_read_segs; i < n_segments; i++) {
|
|
|
|
srv_io_thread_function[i] = (char*)"write thread";
|
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
os_aio_sync_array = os_aio_array_create(n_slots_sync, 1);
|
|
|
|
|
|
|
|
os_aio_n_segments = n_segments;
|
|
|
|
|
|
|
|
os_aio_validate();
|
|
|
|
|
|
|
|
os_aio_segment_wait_events = ut_malloc(n_segments * sizeof(void*));
|
|
|
|
|
|
|
|
for (i = 0; i < n_segments; i++) {
|
|
|
|
os_aio_segment_wait_events[i] = os_event_create(NULL);
|
|
|
|
}
|
|
|
|
|
2001-10-10 22:47:08 +03:00
|
|
|
os_last_printout = time(NULL);
|
|
|
|
|
2001-03-26 13:27:36 +03:00
|
|
|
#ifdef POSIX_ASYNC_IO
|
2001-02-17 14:19:19 +02:00
|
|
|
/* Block aio signals from the current thread and its children:
|
|
|
|
for this to work, the current thread must be the first created
|
|
|
|
in the database, so that all its children will inherit its
|
|
|
|
signal mask */
|
|
|
|
|
2001-03-26 13:27:36 +03:00
|
|
|
/* TODO: to work MySQL needs the SIGALARM signal; the following
|
|
|
|
will not work yet! */
|
2001-02-17 14:19:19 +02:00
|
|
|
sigemptyset(&sigset);
|
|
|
|
sigaddset(&sigset, SIGRTMIN + 1 + 0);
|
|
|
|
sigaddset(&sigset, SIGRTMIN + 1 + 1);
|
|
|
|
sigaddset(&sigset, SIGRTMIN + 1 + 2);
|
|
|
|
sigaddset(&sigset, SIGRTMIN + 1 + 3);
|
|
|
|
|
2001-03-26 13:27:36 +03:00
|
|
|
pthread_sigmask(SIG_BLOCK, &sigset, NULL); */
|
2001-02-17 14:19:19 +02:00
|
|
|
#endif
|
|
|
|
}
|
2003-05-30 22:44:37 +03:00
|
|
|
|
|
|
|
#ifdef WIN_ASYNC_IO
|
|
|
|
/****************************************************************************
|
|
|
|
Wakes up all async i/o threads in the array in Windows async i/o at
|
|
|
|
shutdown. */
|
|
|
|
static
|
|
|
|
void
|
|
|
|
os_aio_array_wake_win_aio_at_shutdown(
|
|
|
|
/*==================================*/
|
|
|
|
os_aio_array_t* array) /* in: aio array */
|
|
|
|
{
|
|
|
|
ulint i;
|
|
|
|
|
|
|
|
for (i = 0; i < array->n_slots; i++) {
|
|
|
|
|
2003-06-02 13:11:20 +03:00
|
|
|
os_event_set((array->slots + i)->event);
|
2003-05-30 22:44:37 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
Wakes up all async i/o threads so that they know to exit themselves in
|
|
|
|
shutdown. */
|
|
|
|
|
|
|
|
void
|
|
|
|
os_aio_wake_all_threads_at_shutdown(void)
|
|
|
|
/*=====================================*/
|
|
|
|
{
|
|
|
|
ulint i;
|
|
|
|
|
|
|
|
#ifdef WIN_ASYNC_IO
|
|
|
|
/* This code wakes up all ai/o threads in Windows native aio */
|
|
|
|
os_aio_array_wake_win_aio_at_shutdown(os_aio_read_array);
|
|
|
|
os_aio_array_wake_win_aio_at_shutdown(os_aio_write_array);
|
|
|
|
os_aio_array_wake_win_aio_at_shutdown(os_aio_ibuf_array);
|
|
|
|
os_aio_array_wake_win_aio_at_shutdown(os_aio_log_array);
|
|
|
|
#endif
|
|
|
|
/* This loop wakes up all simulated ai/o threads */
|
|
|
|
|
|
|
|
for (i = 0; i < os_aio_n_segments; i++) {
|
|
|
|
|
|
|
|
os_event_set(os_aio_segment_wait_events[i]);
|
|
|
|
}
|
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
/****************************************************************************
|
|
|
|
Waits until there are no pending writes in os_aio_write_array. There can
|
|
|
|
be other, synchronous, pending writes. */
|
|
|
|
|
|
|
|
void
|
|
|
|
os_aio_wait_until_no_pending_writes(void)
|
|
|
|
/*=====================================*/
|
|
|
|
{
|
|
|
|
os_event_wait(os_aio_write_array->is_empty);
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
|
|
|
Calculates segment number for a slot. */
|
|
|
|
static
|
|
|
|
ulint
|
|
|
|
os_aio_get_segment_no_from_slot(
|
|
|
|
/*============================*/
|
|
|
|
/* out: segment number (which is the number
|
|
|
|
used by, for example, i/o-handler threads) */
|
|
|
|
os_aio_array_t* array, /* in: aio wait array */
|
|
|
|
os_aio_slot_t* slot) /* in: slot in this array */
|
|
|
|
{
|
|
|
|
ulint segment;
|
|
|
|
ulint seg_len;
|
|
|
|
|
|
|
|
if (array == os_aio_ibuf_array) {
|
|
|
|
segment = 0;
|
|
|
|
|
|
|
|
} else if (array == os_aio_log_array) {
|
|
|
|
segment = 1;
|
|
|
|
|
|
|
|
} else if (array == os_aio_read_array) {
|
|
|
|
seg_len = os_aio_read_array->n_slots /
|
|
|
|
os_aio_read_array->n_segments;
|
|
|
|
|
|
|
|
segment = 2 + slot->pos / seg_len;
|
|
|
|
} else {
|
|
|
|
ut_a(array == os_aio_write_array);
|
|
|
|
seg_len = os_aio_write_array->n_slots /
|
|
|
|
os_aio_write_array->n_segments;
|
|
|
|
|
|
|
|
segment = os_aio_read_array->n_segments + 2
|
|
|
|
+ slot->pos / seg_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(segment);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Calculates local segment number and aio array from global segment number. */
|
|
|
|
static
|
|
|
|
ulint
|
|
|
|
os_aio_get_array_and_local_segment(
|
|
|
|
/*===============================*/
|
|
|
|
/* out: local segment number within
|
|
|
|
the aio array */
|
|
|
|
os_aio_array_t** array, /* out: aio wait array */
|
|
|
|
ulint global_segment)/* in: global segment number */
|
|
|
|
{
|
|
|
|
ulint segment;
|
|
|
|
|
|
|
|
ut_a(global_segment < os_aio_n_segments);
|
|
|
|
|
|
|
|
if (global_segment == 0) {
|
|
|
|
*array = os_aio_ibuf_array;
|
|
|
|
segment = 0;
|
|
|
|
|
|
|
|
} else if (global_segment == 1) {
|
|
|
|
*array = os_aio_log_array;
|
|
|
|
segment = 0;
|
|
|
|
|
|
|
|
} else if (global_segment < os_aio_read_array->n_segments + 2) {
|
|
|
|
*array = os_aio_read_array;
|
|
|
|
|
|
|
|
segment = global_segment - 2;
|
|
|
|
} else {
|
|
|
|
*array = os_aio_write_array;
|
|
|
|
|
|
|
|
segment = global_segment - (os_aio_read_array->n_segments + 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(segment);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
Gets an integer value designating a specified aio array. This is used
|
|
|
|
to give numbers to signals in Posix aio. */
|
2001-10-31 20:28:43 +02:00
|
|
|
|
|
|
|
#if !defined(WIN_ASYNC_IO) && defined(POSIX_ASYNC_IO)
|
2001-02-17 14:19:19 +02:00
|
|
|
static
|
|
|
|
ulint
|
|
|
|
os_aio_get_array_no(
|
|
|
|
/*================*/
|
|
|
|
os_aio_array_t* array) /* in: aio array */
|
|
|
|
{
|
|
|
|
if (array == os_aio_ibuf_array) {
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
|
|
|
|
} else if (array == os_aio_log_array) {
|
|
|
|
|
|
|
|
return(1);
|
|
|
|
|
|
|
|
} else if (array == os_aio_read_array) {
|
|
|
|
|
|
|
|
return(2);
|
|
|
|
} else if (array == os_aio_write_array) {
|
|
|
|
|
|
|
|
return(3);
|
|
|
|
} else {
|
|
|
|
ut_a(0);
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
Gets the aio array for its number. */
|
|
|
|
static
|
|
|
|
os_aio_array_t*
|
|
|
|
os_aio_get_array_from_no(
|
|
|
|
/*=====================*/
|
|
|
|
/* out: aio array */
|
|
|
|
ulint n) /* in: array number */
|
|
|
|
{
|
|
|
|
if (n == 0) {
|
|
|
|
return(os_aio_ibuf_array);
|
|
|
|
} else if (n == 1) {
|
|
|
|
|
|
|
|
return(os_aio_log_array);
|
|
|
|
} else if (n == 2) {
|
|
|
|
|
|
|
|
return(os_aio_read_array);
|
|
|
|
} else if (n == 3) {
|
|
|
|
|
|
|
|
return(os_aio_write_array);
|
|
|
|
} else {
|
|
|
|
ut_a(0);
|
|
|
|
|
|
|
|
return(NULL);
|
|
|
|
}
|
|
|
|
}
|
2001-10-31 20:28:43 +02:00
|
|
|
#endif /* if !defined(WIN_ASYNC_IO) && defined(POSIX_ASYNC_IO) */
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
Requests for a slot in the aio array. If no slot is available, waits until
|
|
|
|
not_full-event becomes signaled. */
|
|
|
|
static
|
|
|
|
os_aio_slot_t*
|
|
|
|
os_aio_array_reserve_slot(
|
|
|
|
/*======================*/
|
|
|
|
/* out: pointer to slot */
|
|
|
|
ulint type, /* in: OS_FILE_READ or OS_FILE_WRITE */
|
|
|
|
os_aio_array_t* array, /* in: aio array */
|
|
|
|
void* message1,/* in: message to be passed along with
|
|
|
|
the aio operation */
|
|
|
|
void* message2,/* in: message to be passed along with
|
|
|
|
the aio operation */
|
|
|
|
os_file_t file, /* in: file handle */
|
|
|
|
char* name, /* in: name of the file or path as a
|
|
|
|
null-terminated string */
|
|
|
|
void* buf, /* in: buffer where to read or from which
|
|
|
|
to write */
|
|
|
|
ulint offset, /* in: least significant 32 bits of file
|
|
|
|
offset */
|
|
|
|
ulint offset_high, /* in: most significant 32 bits of
|
|
|
|
offset */
|
|
|
|
ulint len) /* in: length of the block to read or write */
|
|
|
|
{
|
|
|
|
os_aio_slot_t* slot;
|
|
|
|
#ifdef WIN_ASYNC_IO
|
|
|
|
OVERLAPPED* control;
|
|
|
|
|
|
|
|
#elif defined(POSIX_ASYNC_IO)
|
|
|
|
|
|
|
|
struct aiocb* control;
|
|
|
|
#endif
|
|
|
|
ulint i;
|
|
|
|
loop:
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
if (array->n_reserved == array->n_slots) {
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
if (!os_aio_use_native_aio) {
|
|
|
|
/* If the handler threads are suspended, wake them
|
|
|
|
so that we get more slots */
|
|
|
|
|
|
|
|
os_aio_simulated_wake_handler_threads();
|
|
|
|
}
|
|
|
|
|
|
|
|
os_event_wait(array->not_full);
|
|
|
|
|
|
|
|
goto loop;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0;; i++) {
|
|
|
|
slot = os_aio_array_get_nth_slot(array, i);
|
|
|
|
|
|
|
|
if (slot->reserved == FALSE) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
array->n_reserved++;
|
|
|
|
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
if (array->n_reserved == 1) {
|
|
|
|
os_event_reset(array->is_empty);
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
if (array->n_reserved == array->n_slots) {
|
|
|
|
os_event_reset(array->not_full);
|
|
|
|
}
|
|
|
|
|
|
|
|
slot->reserved = TRUE;
|
2003-06-15 01:04:28 +03:00
|
|
|
slot->reservation_time = time(NULL);
|
2001-02-17 14:19:19 +02:00
|
|
|
slot->message1 = message1;
|
|
|
|
slot->message2 = message2;
|
|
|
|
slot->file = file;
|
|
|
|
slot->name = name;
|
|
|
|
slot->len = len;
|
|
|
|
slot->type = type;
|
|
|
|
slot->buf = buf;
|
|
|
|
slot->offset = offset;
|
|
|
|
slot->offset_high = offset_high;
|
|
|
|
slot->io_already_done = FALSE;
|
|
|
|
|
|
|
|
#ifdef WIN_ASYNC_IO
|
|
|
|
control = &(slot->control);
|
|
|
|
control->Offset = (DWORD)offset;
|
|
|
|
control->OffsetHigh = (DWORD)offset_high;
|
2003-06-02 13:11:20 +03:00
|
|
|
os_event_reset(slot->event);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
#elif defined(POSIX_ASYNC_IO)
|
|
|
|
|
|
|
|
#if (UNIV_WORD_SIZE == 8)
|
|
|
|
offset = offset + (offset_high << 32);
|
|
|
|
#else
|
|
|
|
ut_a(offset_high == 0);
|
|
|
|
#endif
|
|
|
|
control = &(slot->control);
|
|
|
|
control->aio_fildes = file;
|
|
|
|
control->aio_buf = buf;
|
|
|
|
control->aio_nbytes = len;
|
|
|
|
control->aio_offset = offset;
|
|
|
|
control->aio_reqprio = 0;
|
|
|
|
control->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
|
|
|
|
control->aio_sigevent.sigev_signo =
|
|
|
|
SIGRTMIN + 1 + os_aio_get_array_no(array);
|
|
|
|
/* TODO: How to choose the signal numbers? */
|
|
|
|
/*
|
|
|
|
printf("AIO signal number %lu\n", (ulint) control->aio_sigevent.sigev_signo);
|
|
|
|
*/
|
|
|
|
control->aio_sigevent.sigev_value.sival_ptr = slot;
|
|
|
|
#endif
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
return(slot);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
Frees a slot in the aio array. */
|
|
|
|
static
|
|
|
|
void
|
|
|
|
os_aio_array_free_slot(
|
|
|
|
/*===================*/
|
|
|
|
os_aio_array_t* array, /* in: aio array */
|
|
|
|
os_aio_slot_t* slot) /* in: pointer to slot */
|
|
|
|
{
|
|
|
|
ut_ad(array);
|
|
|
|
ut_ad(slot);
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
ut_ad(slot->reserved);
|
|
|
|
|
|
|
|
slot->reserved = FALSE;
|
|
|
|
|
|
|
|
array->n_reserved--;
|
|
|
|
|
|
|
|
if (array->n_reserved == array->n_slots - 1) {
|
|
|
|
os_event_set(array->not_full);
|
|
|
|
}
|
|
|
|
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
if (array->n_reserved == 0) {
|
|
|
|
os_event_set(array->is_empty);
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
#ifdef WIN_ASYNC_IO
|
2003-06-02 13:11:20 +03:00
|
|
|
os_event_reset(slot->event);
|
2001-02-17 14:19:19 +02:00
|
|
|
#endif
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Wakes up a simulated aio i/o-handler thread if it has something to do. */
|
|
|
|
static
|
|
|
|
void
|
|
|
|
os_aio_simulated_wake_handler_thread(
|
|
|
|
/*=================================*/
|
|
|
|
ulint global_segment) /* in: the number of the segment in the aio
|
|
|
|
arrays */
|
|
|
|
{
|
|
|
|
os_aio_array_t* array;
|
|
|
|
os_aio_slot_t* slot;
|
2001-10-30 17:38:44 +02:00
|
|
|
ulint segment;
|
2001-02-17 14:19:19 +02:00
|
|
|
ulint n;
|
|
|
|
ulint i;
|
|
|
|
|
|
|
|
ut_ad(!os_aio_use_native_aio);
|
|
|
|
|
|
|
|
segment = os_aio_get_array_and_local_segment(&array, global_segment);
|
|
|
|
|
|
|
|
n = array->n_slots / array->n_segments;
|
|
|
|
|
|
|
|
/* Look through n slots after the segment * n'th slot */
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
slot = os_aio_array_get_nth_slot(array, i + segment * n);
|
|
|
|
|
|
|
|
if (slot->reserved) {
|
|
|
|
/* Found an i/o request */
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
if (i < n) {
|
|
|
|
os_event_set(os_aio_segment_wait_events[global_segment]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Wakes up simulated aio i/o-handler threads if they have something to do. */
|
|
|
|
|
|
|
|
void
|
|
|
|
os_aio_simulated_wake_handler_threads(void)
|
|
|
|
/*=======================================*/
|
|
|
|
{
|
|
|
|
ulint i;
|
|
|
|
|
|
|
|
if (os_aio_use_native_aio) {
|
|
|
|
/* We do not use simulated aio: do nothing */
|
|
|
|
|
|
|
|
return;
|
2002-06-22 20:41:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
os_aio_recommend_sleep_for_read_threads = FALSE;
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
for (i = 0; i < os_aio_n_segments; i++) {
|
|
|
|
os_aio_simulated_wake_handler_thread(i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
/**************************************************************************
|
|
|
|
This function can be called if one wants to post a batch of reads and
|
|
|
|
prefers an i/o-handler thread to handle them all at once later. You must
|
|
|
|
call os_aio_simulated_wake_handler_threads later to ensure the threads
|
|
|
|
are not left sleeping! */
|
|
|
|
|
|
|
|
void
|
|
|
|
os_aio_simulated_put_read_threads_to_sleep(void)
|
|
|
|
/*============================================*/
|
|
|
|
{
|
|
|
|
os_aio_array_t* array;
|
|
|
|
ulint g;
|
|
|
|
|
|
|
|
os_aio_recommend_sleep_for_read_threads = TRUE;
|
|
|
|
|
|
|
|
for (g = 0; g < os_aio_n_segments; g++) {
|
|
|
|
os_aio_get_array_and_local_segment(&array, g);
|
|
|
|
|
|
|
|
if (array == os_aio_read_array) {
|
|
|
|
|
|
|
|
os_event_reset(os_aio_segment_wait_events[g]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/***********************************************************************
|
|
|
|
Requests an asynchronous i/o operation. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_aio(
|
|
|
|
/*===*/
|
|
|
|
/* out: TRUE if request was queued
|
|
|
|
successfully, FALSE if fail */
|
|
|
|
ulint type, /* in: OS_FILE_READ or OS_FILE_WRITE */
|
|
|
|
ulint mode, /* in: OS_AIO_NORMAL, ..., possibly ORed
|
|
|
|
to OS_AIO_SIMULATED_WAKE_LATER: the
|
|
|
|
last flag advises this function not to wake
|
|
|
|
i/o-handler threads, but the caller will
|
|
|
|
do the waking explicitly later, in this
|
|
|
|
way the caller can post several requests in
|
|
|
|
a batch; NOTE that the batch must not be
|
|
|
|
so big that it exhausts the slots in aio
|
|
|
|
arrays! NOTE that a simulated batch
|
|
|
|
may introduce hidden chances of deadlocks,
|
|
|
|
because i/os are not actually handled until
|
|
|
|
all have been posted: use with great
|
|
|
|
caution! */
|
|
|
|
char* name, /* in: name of the file or path as a
|
|
|
|
null-terminated string */
|
|
|
|
os_file_t file, /* in: handle to a file */
|
|
|
|
void* buf, /* in: buffer where to read or from which
|
|
|
|
to write */
|
|
|
|
ulint offset, /* in: least significant 32 bits of file
|
|
|
|
offset where to read or write */
|
|
|
|
ulint offset_high, /* in: most significant 32 bits of
|
|
|
|
offset */
|
2003-06-02 13:45:45 +03:00
|
|
|
ulint n, /* in: number of bytes to read or write */
|
2001-02-17 14:19:19 +02:00
|
|
|
void* message1,/* in: messages for the aio handler (these
|
|
|
|
can be used to identify a completed aio
|
|
|
|
operation); if mode is OS_AIO_SYNC, these
|
|
|
|
are ignored */
|
|
|
|
void* message2)
|
|
|
|
{
|
|
|
|
os_aio_array_t* array;
|
|
|
|
os_aio_slot_t* slot;
|
|
|
|
#ifdef WIN_ASYNC_IO
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
ibool retval;
|
2001-02-17 14:19:19 +02:00
|
|
|
BOOL ret = TRUE;
|
|
|
|
DWORD len = n;
|
|
|
|
void* dummy_mess1;
|
|
|
|
void* dummy_mess2;
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
ulint dummy_type;
|
2001-02-17 14:19:19 +02:00
|
|
|
#endif
|
|
|
|
ulint err = 0;
|
|
|
|
ibool retry;
|
|
|
|
ulint wake_later;
|
|
|
|
|
|
|
|
ut_ad(file);
|
|
|
|
ut_ad(buf);
|
|
|
|
ut_ad(n > 0);
|
|
|
|
ut_ad(n % OS_FILE_LOG_BLOCK_SIZE == 0);
|
|
|
|
ut_ad(offset % OS_FILE_LOG_BLOCK_SIZE == 0);
|
|
|
|
ut_ad(os_aio_validate());
|
|
|
|
|
|
|
|
wake_later = mode & OS_AIO_SIMULATED_WAKE_LATER;
|
|
|
|
mode = mode & (~OS_AIO_SIMULATED_WAKE_LATER);
|
|
|
|
|
|
|
|
if (mode == OS_AIO_SYNC
|
|
|
|
#ifdef WIN_ASYNC_IO
|
|
|
|
&& !os_aio_use_native_aio
|
|
|
|
#endif
|
|
|
|
) {
|
|
|
|
/* This is actually an ordinary synchronous read or write:
|
|
|
|
no need to use an i/o-handler thread. NOTE that if we use
|
|
|
|
Windows async i/o, Windows does not allow us to use
|
|
|
|
ordinary synchronous os_file_read etc. on the same file,
|
|
|
|
therefore we have built a special mechanism for synchronous
|
|
|
|
wait in the Windows case. */
|
|
|
|
|
|
|
|
if (type == OS_FILE_READ) {
|
2003-06-02 13:11:20 +03:00
|
|
|
return(os_file_read(file, buf, offset,
|
|
|
|
offset_high, n));
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ut_a(type == OS_FILE_WRITE);
|
|
|
|
|
|
|
|
return(os_file_write(name, file, buf, offset, offset_high, n));
|
|
|
|
}
|
|
|
|
|
|
|
|
try_again:
|
|
|
|
if (mode == OS_AIO_NORMAL) {
|
|
|
|
if (type == OS_FILE_READ) {
|
|
|
|
array = os_aio_read_array;
|
|
|
|
} else {
|
|
|
|
array = os_aio_write_array;
|
|
|
|
}
|
|
|
|
} else if (mode == OS_AIO_IBUF) {
|
|
|
|
ut_ad(type == OS_FILE_READ);
|
2001-04-27 21:12:15 +03:00
|
|
|
/* Reduce probability of deadlock bugs in connection with ibuf:
|
|
|
|
do not let the ibuf i/o handler sleep */
|
|
|
|
|
|
|
|
wake_later = FALSE;
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
array = os_aio_ibuf_array;
|
|
|
|
} else if (mode == OS_AIO_LOG) {
|
|
|
|
|
|
|
|
array = os_aio_log_array;
|
|
|
|
} else if (mode == OS_AIO_SYNC) {
|
|
|
|
array = os_aio_sync_array;
|
|
|
|
} else {
|
2001-10-10 22:47:08 +03:00
|
|
|
array = NULL; /* Eliminate compiler warning */
|
2001-02-17 14:19:19 +02:00
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
slot = os_aio_array_reserve_slot(type, array, message1, message2, file,
|
|
|
|
name, buf, offset, offset_high, n);
|
|
|
|
if (type == OS_FILE_READ) {
|
|
|
|
if (os_aio_use_native_aio) {
|
|
|
|
#ifdef WIN_ASYNC_IO
|
2001-10-10 22:47:08 +03:00
|
|
|
os_n_file_reads++;
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
os_bytes_read_since_printout += len;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
ret = ReadFile(file, buf, (DWORD)n, &len,
|
|
|
|
&(slot->control));
|
|
|
|
#elif defined(POSIX_ASYNC_IO)
|
|
|
|
slot->control.aio_lio_opcode = LIO_READ;
|
|
|
|
err = (ulint) aio_read(&(slot->control));
|
|
|
|
printf("Starting Posix aio read %lu\n", err);
|
|
|
|
#endif
|
|
|
|
} else {
|
|
|
|
if (!wake_later) {
|
|
|
|
os_aio_simulated_wake_handler_thread(
|
|
|
|
os_aio_get_segment_no_from_slot(array, slot));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (type == OS_FILE_WRITE) {
|
|
|
|
if (os_aio_use_native_aio) {
|
|
|
|
#ifdef WIN_ASYNC_IO
|
2001-10-10 22:47:08 +03:00
|
|
|
os_n_file_writes++;
|
2001-02-17 14:19:19 +02:00
|
|
|
ret = WriteFile(file, buf, (DWORD)n, &len,
|
|
|
|
&(slot->control));
|
|
|
|
#elif defined(POSIX_ASYNC_IO)
|
|
|
|
slot->control.aio_lio_opcode = LIO_WRITE;
|
|
|
|
err = (ulint) aio_write(&(slot->control));
|
|
|
|
printf("Starting Posix aio write %lu\n", err);
|
|
|
|
#endif
|
|
|
|
} else {
|
|
|
|
if (!wake_later) {
|
|
|
|
os_aio_simulated_wake_handler_thread(
|
|
|
|
os_aio_get_segment_no_from_slot(array, slot));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ut_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef WIN_ASYNC_IO
|
|
|
|
if (os_aio_use_native_aio) {
|
|
|
|
if ((ret && len == n)
|
2003-06-02 13:11:20 +03:00
|
|
|
|| (!ret && GetLastError() == ERROR_IO_PENDING)) {
|
2001-02-17 14:19:19 +02:00
|
|
|
/* aio was queued successfully! */
|
|
|
|
|
|
|
|
if (mode == OS_AIO_SYNC) {
|
|
|
|
/* We want a synchronous i/o operation on a file
|
|
|
|
where we also use async i/o: in Windows we must
|
|
|
|
use the same wait mechanism as for async i/o */
|
|
|
|
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
retval = os_aio_windows_handle(ULINT_UNDEFINED,
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
slot->pos,
|
|
|
|
&dummy_mess1, &dummy_mess2,
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
&dummy_type);
|
|
|
|
|
|
|
|
return(retval);
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
2001-04-24 15:30:41 +03:00
|
|
|
err = 1; /* Fall through the next if */
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
if (err == 0) {
|
|
|
|
/* aio was queued successfully! */
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
os_aio_array_free_slot(array, slot);
|
|
|
|
|
2003-06-02 13:45:45 +03:00
|
|
|
retry = os_file_handle_error(file, name,
|
|
|
|
type == OS_FILE_READ ? "aio read" : "aio write");
|
2001-02-17 14:19:19 +02:00
|
|
|
if (retry) {
|
|
|
|
|
|
|
|
goto try_again;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef WIN_ASYNC_IO
|
|
|
|
/**************************************************************************
|
|
|
|
This function is only used in Windows asynchronous i/o.
|
|
|
|
Waits for an aio operation to complete. This function is used to wait the
|
|
|
|
for completed requests. The aio array of pending requests is divided
|
|
|
|
into segments. The thread specifies which segment or slot it wants to wait
|
|
|
|
for. NOTE: this function will also take care of freeing the aio slot,
|
|
|
|
therefore no other thread is allowed to do the freeing! */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_aio_windows_handle(
|
|
|
|
/*==================*/
|
|
|
|
/* out: TRUE if the aio operation succeeded */
|
|
|
|
ulint segment, /* in: the number of the segment in the aio
|
|
|
|
arrays to wait for; segment 0 is the ibuf
|
|
|
|
i/o thread, segment 1 the log i/o thread,
|
|
|
|
then follow the non-ibuf read threads, and as
|
|
|
|
the last are the non-ibuf write threads; if
|
|
|
|
this is ULINT_UNDEFINED, then it means that
|
|
|
|
sync aio is used, and this parameter is
|
|
|
|
ignored */
|
|
|
|
ulint pos, /* this parameter is used only in sync aio:
|
|
|
|
wait for the aio slot at this position */
|
|
|
|
void** message1, /* out: the messages passed with the aio
|
|
|
|
request; note that also in the case where
|
|
|
|
the aio operation failed, these output
|
|
|
|
parameters are valid and can be used to
|
|
|
|
restart the operation, for example */
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
void** message2,
|
|
|
|
ulint* type) /* out: OS_FILE_WRITE or ..._READ */
|
2001-02-17 14:19:19 +02:00
|
|
|
{
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
ulint orig_seg = segment;
|
2001-02-17 14:19:19 +02:00
|
|
|
os_aio_array_t* array;
|
|
|
|
os_aio_slot_t* slot;
|
|
|
|
ulint n;
|
|
|
|
ulint i;
|
|
|
|
ibool ret_val;
|
|
|
|
BOOL ret;
|
|
|
|
DWORD len;
|
|
|
|
|
|
|
|
if (segment == ULINT_UNDEFINED) {
|
|
|
|
array = os_aio_sync_array;
|
|
|
|
segment = 0;
|
|
|
|
} else {
|
|
|
|
segment = os_aio_get_array_and_local_segment(&array, segment);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* NOTE! We only access constant fields in os_aio_array. Therefore
|
|
|
|
we do not have to acquire the protecting mutex yet */
|
|
|
|
|
|
|
|
ut_ad(os_aio_validate());
|
|
|
|
ut_ad(segment < array->n_segments);
|
|
|
|
|
|
|
|
n = array->n_slots / array->n_segments;
|
|
|
|
|
|
|
|
if (array == os_aio_sync_array) {
|
2003-06-02 13:11:20 +03:00
|
|
|
srv_io_thread_op_info[orig_seg] =
|
|
|
|
"wait Windows aio for 1 page";
|
|
|
|
os_event_wait(os_aio_array_get_nth_slot(array, pos)->event);
|
2001-02-17 14:19:19 +02:00
|
|
|
i = pos;
|
|
|
|
} else {
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
srv_io_thread_op_info[orig_seg] =
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
"wait Windows aio";
|
2003-06-02 13:11:20 +03:00
|
|
|
i = os_event_wait_multiple(n,
|
|
|
|
(array->native_events) + segment * n);
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
slot = os_aio_array_get_nth_slot(array, i + segment * n);
|
|
|
|
|
|
|
|
ut_a(slot->reserved);
|
|
|
|
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
srv_io_thread_op_info[orig_seg] = "get windows aio return value";
|
2001-02-17 14:19:19 +02:00
|
|
|
ret = GetOverlappedResult(slot->file, &(slot->control), &len, TRUE);
|
|
|
|
|
|
|
|
*message1 = slot->message1;
|
|
|
|
*message2 = slot->message2;
|
|
|
|
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
*type = slot->type;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
if (ret && len == slot->len) {
|
|
|
|
ret_val = TRUE;
|
2001-04-26 16:36:59 +03:00
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
if (slot->type == OS_FILE_WRITE
|
|
|
|
&& !os_do_not_call_flush_at_each_write) {
|
2001-04-26 16:36:59 +03:00
|
|
|
ut_a(TRUE == os_file_flush(slot->file));
|
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
} else {
|
2003-06-02 13:45:45 +03:00
|
|
|
os_file_handle_error(slot->file, slot->name, "Windows aio");
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
ret_val = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
os_aio_array_free_slot(array, slot);
|
|
|
|
|
|
|
|
return(ret_val);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef POSIX_ASYNC_IO
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
This function is only used in Posix asynchronous i/o. Waits for an aio
|
|
|
|
operation to complete. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_aio_posix_handle(
|
|
|
|
/*================*/
|
|
|
|
/* out: TRUE if the aio operation succeeded */
|
|
|
|
ulint array_no, /* in: array number 0 - 3 */
|
|
|
|
void** message1, /* out: the messages passed with the aio
|
|
|
|
request; note that also in the case where
|
|
|
|
the aio operation failed, these output
|
|
|
|
parameters are valid and can be used to
|
|
|
|
restart the operation, for example */
|
|
|
|
void** message2)
|
|
|
|
{
|
|
|
|
os_aio_array_t* array;
|
|
|
|
os_aio_slot_t* slot;
|
|
|
|
siginfo_t info;
|
|
|
|
sigset_t sigset;
|
|
|
|
sigset_t proc_sigset;
|
|
|
|
sigset_t thr_sigset;
|
|
|
|
int ret;
|
|
|
|
int i;
|
|
|
|
int sig;
|
|
|
|
|
|
|
|
sigemptyset(&sigset);
|
|
|
|
sigaddset(&sigset, SIGRTMIN + 1 + array_no);
|
|
|
|
|
|
|
|
pthread_sigmask(SIG_UNBLOCK, &sigset, NULL);
|
|
|
|
|
|
|
|
/*
|
|
|
|
sigprocmask(0, NULL, &proc_sigset);
|
|
|
|
pthread_sigmask(0, NULL, &thr_sigset);
|
|
|
|
|
|
|
|
for (i = 32 ; i < 40; i++) {
|
|
|
|
printf("%lu : %lu %lu\n", (ulint)i,
|
|
|
|
(ulint)sigismember(&proc_sigset, i),
|
|
|
|
(ulint)sigismember(&thr_sigset, i));
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
ret = sigwaitinfo(&sigset, &info);
|
|
|
|
|
|
|
|
if (sig != SIGRTMIN + 1 + array_no) {
|
|
|
|
|
|
|
|
ut_a(0);
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("Handling Posix aio\n");
|
|
|
|
|
|
|
|
array = os_aio_get_array_from_no(array_no);
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
slot = info.si_value.sival_ptr;
|
|
|
|
|
|
|
|
ut_a(slot->reserved);
|
|
|
|
|
|
|
|
*message1 = slot->message1;
|
|
|
|
*message2 = slot->message2;
|
|
|
|
|
2002-03-21 18:03:09 +02:00
|
|
|
if (slot->type == OS_FILE_WRITE
|
|
|
|
&& !os_do_not_call_flush_at_each_write) {
|
2001-04-26 16:36:59 +03:00
|
|
|
ut_a(TRUE == os_file_flush(slot->file));
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
os_aio_array_free_slot(array, slot);
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Does simulated aio. This function should be called by an i/o-handler
|
|
|
|
thread. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_aio_simulated_handle(
|
|
|
|
/*====================*/
|
|
|
|
/* out: TRUE if the aio operation succeeded */
|
|
|
|
ulint global_segment, /* in: the number of the segment in the aio
|
|
|
|
arrays to wait for; segment 0 is the ibuf
|
|
|
|
i/o thread, segment 1 the log i/o thread,
|
|
|
|
then follow the non-ibuf read threads, and as
|
|
|
|
the last are the non-ibuf write threads */
|
|
|
|
void** message1, /* out: the messages passed with the aio
|
|
|
|
request; note that also in the case where
|
|
|
|
the aio operation failed, these output
|
|
|
|
parameters are valid and can be used to
|
|
|
|
restart the operation, for example */
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
void** message2,
|
|
|
|
ulint* type) /* out: OS_FILE_WRITE or ..._READ */
|
2001-02-17 14:19:19 +02:00
|
|
|
{
|
|
|
|
os_aio_array_t* array;
|
|
|
|
ulint segment;
|
|
|
|
os_aio_slot_t* slot;
|
|
|
|
os_aio_slot_t* slot2;
|
|
|
|
os_aio_slot_t* consecutive_ios[OS_AIO_MERGE_N_CONSECUTIVE];
|
|
|
|
ulint n_consecutive;
|
|
|
|
ulint total_len;
|
|
|
|
ulint offs;
|
|
|
|
ulint lowest_offset;
|
2003-06-15 01:04:28 +03:00
|
|
|
ulint biggest_age;
|
|
|
|
ulint age;
|
2001-02-17 14:19:19 +02:00
|
|
|
byte* combined_buf;
|
2002-07-19 17:09:40 +03:00
|
|
|
byte* combined_buf2;
|
2001-02-17 14:19:19 +02:00
|
|
|
ibool ret;
|
|
|
|
ulint n;
|
|
|
|
ulint i;
|
2002-08-25 10:26:40 +03:00
|
|
|
ulint len2;
|
2002-06-22 20:41:14 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
segment = os_aio_get_array_and_local_segment(&array, global_segment);
|
|
|
|
|
|
|
|
restart:
|
|
|
|
/* NOTE! We only access constant fields in os_aio_array. Therefore
|
|
|
|
we do not have to acquire the protecting mutex yet */
|
|
|
|
|
|
|
|
ut_ad(os_aio_validate());
|
|
|
|
ut_ad(segment < array->n_segments);
|
|
|
|
|
|
|
|
n = array->n_slots / array->n_segments;
|
|
|
|
|
|
|
|
/* Look through n slots after the segment * n'th slot */
|
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
if (array == os_aio_read_array
|
|
|
|
&& os_aio_recommend_sleep_for_read_threads) {
|
|
|
|
|
|
|
|
/* Give other threads chance to add several i/os to the array
|
|
|
|
at once. */
|
|
|
|
|
|
|
|
goto recommended_sleep;
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
/* Check if there is a slot for which the i/o has already been
|
|
|
|
done */
|
|
|
|
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
slot = os_aio_array_get_nth_slot(array, i + segment * n);
|
|
|
|
|
|
|
|
if (slot->reserved && slot->io_already_done) {
|
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
if (os_aio_print_debug) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: i/o for slot %lu already done, returning\n", i);
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
ret = TRUE;
|
|
|
|
|
|
|
|
goto slot_io_done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
n_consecutive = 0;
|
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
/* If there are at least 2 seconds old requests, then pick the oldest
|
|
|
|
one to prevent starvation. If several requests have the same age,
|
|
|
|
then pick the one at the lowest offset. */
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
biggest_age = 0;
|
2001-02-17 14:19:19 +02:00
|
|
|
lowest_offset = ULINT_MAX;
|
2003-06-15 01:04:28 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
slot = os_aio_array_get_nth_slot(array, i + segment * n);
|
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
if (slot->reserved) {
|
|
|
|
age = (ulint)difftime(time(NULL),
|
|
|
|
slot->reservation_time);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
if ((age >= 2 && age > biggest_age)
|
|
|
|
|| (age >= 2 && age == biggest_age
|
|
|
|
&& slot->offset < lowest_offset)) {
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
/* Found an i/o request */
|
|
|
|
consecutive_ios[0] = slot;
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
n_consecutive = 1;
|
|
|
|
|
|
|
|
biggest_age = age;
|
|
|
|
lowest_offset = slot->offset;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (n_consecutive == 0) {
|
|
|
|
/* There were no old requests. Look for an i/o request at the
|
|
|
|
lowest offset in the array (we ignore the high 32 bits of the
|
|
|
|
offset in these heuristics) */
|
|
|
|
|
|
|
|
lowest_offset = ULINT_MAX;
|
|
|
|
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
slot = os_aio_array_get_nth_slot(array,
|
|
|
|
i + segment * n);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
if (slot->reserved && slot->offset < lowest_offset) {
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
/* Found an i/o request */
|
|
|
|
consecutive_ios[0] = slot;
|
|
|
|
|
|
|
|
n_consecutive = 1;
|
|
|
|
|
|
|
|
lowest_offset = slot->offset;
|
|
|
|
}
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (n_consecutive == 0) {
|
|
|
|
|
|
|
|
/* No i/o requested at the moment */
|
|
|
|
|
|
|
|
goto wait_for_io;
|
|
|
|
}
|
|
|
|
|
|
|
|
slot = consecutive_ios[0];
|
|
|
|
|
|
|
|
/* Check if there are several consecutive blocks to read or write */
|
|
|
|
|
|
|
|
consecutive_loop:
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
slot2 = os_aio_array_get_nth_slot(array, i + segment * n);
|
|
|
|
|
|
|
|
if (slot2->reserved && slot2 != slot
|
|
|
|
&& slot2->offset == slot->offset + slot->len
|
|
|
|
&& slot->offset + slot->len > slot->offset /* check that
|
|
|
|
sum does not wrap over */
|
|
|
|
&& slot2->offset_high == slot->offset_high
|
|
|
|
&& slot2->type == slot->type
|
|
|
|
&& slot2->file == slot->file) {
|
|
|
|
|
|
|
|
/* Found a consecutive i/o request */
|
|
|
|
|
|
|
|
consecutive_ios[n_consecutive] = slot2;
|
|
|
|
n_consecutive++;
|
|
|
|
|
|
|
|
slot = slot2;
|
|
|
|
|
|
|
|
if (n_consecutive < OS_AIO_MERGE_N_CONSECUTIVE) {
|
|
|
|
|
|
|
|
goto consecutive_loop;
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* We have now collected n_consecutive i/o requests in the array;
|
|
|
|
allocate a single buffer which can hold all data, and perform the
|
|
|
|
i/o */
|
|
|
|
|
|
|
|
total_len = 0;
|
|
|
|
slot = consecutive_ios[0];
|
|
|
|
|
|
|
|
for (i = 0; i < n_consecutive; i++) {
|
|
|
|
total_len += consecutive_ios[i]->len;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (n_consecutive == 1) {
|
|
|
|
/* We can use the buffer of the i/o request */
|
|
|
|
combined_buf = slot->buf;
|
|
|
|
} else {
|
2002-07-19 17:09:40 +03:00
|
|
|
combined_buf2 = ut_malloc(total_len + UNIV_PAGE_SIZE);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2002-07-19 17:09:40 +03:00
|
|
|
ut_a(combined_buf2);
|
|
|
|
|
|
|
|
combined_buf = ut_align(combined_buf2, UNIV_PAGE_SIZE);
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* We release the array mutex for the time of the i/o: NOTE that
|
|
|
|
this assumes that there is just one i/o-handler thread serving
|
|
|
|
a single segment of slots! */
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
if (slot->type == OS_FILE_WRITE && n_consecutive > 1) {
|
|
|
|
/* Copy the buffers to the combined buffer */
|
|
|
|
offs = 0;
|
|
|
|
|
|
|
|
for (i = 0; i < n_consecutive; i++) {
|
|
|
|
|
|
|
|
ut_memcpy(combined_buf + offs, consecutive_ios[i]->buf,
|
|
|
|
consecutive_ios[i]->len);
|
|
|
|
offs += consecutive_ios[i]->len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-10-31 20:28:43 +02:00
|
|
|
srv_io_thread_op_info[global_segment] = (char*) "doing file i/o";
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
if (os_aio_print_debug) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: doing i/o of type %lu at offset %lu %lu, length %lu\n",
|
|
|
|
slot->type, slot->offset_high, slot->offset,
|
|
|
|
total_len);
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/* Do the i/o with ordinary, synchronous i/o functions: */
|
|
|
|
if (slot->type == OS_FILE_WRITE) {
|
2002-08-25 10:26:40 +03:00
|
|
|
if (array == os_aio_write_array) {
|
|
|
|
|
|
|
|
/* Do a 'last millisecond' check that the page end
|
|
|
|
is sensible; reported page checksum errors from
|
|
|
|
Linux seem to wipe over the page end */
|
|
|
|
|
|
|
|
for (len2 = 0; len2 + UNIV_PAGE_SIZE <= total_len;
|
|
|
|
len2 += UNIV_PAGE_SIZE) {
|
|
|
|
if (mach_read_from_4(combined_buf + len2
|
|
|
|
+ FIL_PAGE_LSN + 4)
|
|
|
|
!= mach_read_from_4(combined_buf + len2
|
|
|
|
+ UNIV_PAGE_SIZE
|
2003-06-15 01:04:28 +03:00
|
|
|
- FIL_PAGE_END_LSN_OLD_CHKSUM + 4)) {
|
2002-08-25 10:26:40 +03:00
|
|
|
ut_print_timestamp(stderr);
|
|
|
|
fprintf(stderr,
|
|
|
|
" InnoDB: ERROR: The page to be written seems corrupt!\n");
|
2002-09-10 13:06:14 +03:00
|
|
|
buf_page_print(combined_buf + len2);
|
2002-08-25 10:26:40 +03:00
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: ERROR: The page to be written seems corrupt!\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
ret = os_file_write(slot->name, slot->file, combined_buf,
|
|
|
|
slot->offset, slot->offset_high, total_len);
|
|
|
|
} else {
|
|
|
|
ret = os_file_read(slot->file, combined_buf,
|
|
|
|
slot->offset, slot->offset_high, total_len);
|
|
|
|
}
|
|
|
|
|
|
|
|
ut_a(ret);
|
2001-10-31 20:28:43 +02:00
|
|
|
srv_io_thread_op_info[global_segment] = (char*) "file i/o done";
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/* printf("aio: %lu consecutive %lu:th segment, first offs %lu blocks\n",
|
|
|
|
n_consecutive, global_segment, slot->offset
|
|
|
|
/ UNIV_PAGE_SIZE); */
|
|
|
|
|
|
|
|
if (slot->type == OS_FILE_READ && n_consecutive > 1) {
|
|
|
|
/* Copy the combined buffer to individual buffers */
|
|
|
|
offs = 0;
|
|
|
|
|
|
|
|
for (i = 0; i < n_consecutive; i++) {
|
|
|
|
|
|
|
|
ut_memcpy(consecutive_ios[i]->buf, combined_buf + offs,
|
|
|
|
consecutive_ios[i]->len);
|
|
|
|
offs += consecutive_ios[i]->len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (n_consecutive > 1) {
|
2002-07-19 17:09:40 +03:00
|
|
|
ut_free(combined_buf2);
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
/* Mark the i/os done in slots */
|
|
|
|
|
|
|
|
for (i = 0; i < n_consecutive; i++) {
|
|
|
|
consecutive_ios[i]->io_already_done = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* We return the messages for the first slot now, and if there were
|
|
|
|
several slots, the messages will be returned with subsequent calls
|
|
|
|
of this function */
|
|
|
|
|
|
|
|
slot_io_done:
|
|
|
|
|
|
|
|
ut_a(slot->reserved);
|
|
|
|
|
|
|
|
*message1 = slot->message1;
|
|
|
|
*message2 = slot->message2;
|
|
|
|
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
*type = slot->type;
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
os_aio_array_free_slot(array, slot);
|
|
|
|
|
|
|
|
return(ret);
|
|
|
|
|
|
|
|
wait_for_io:
|
|
|
|
/* We wait here until there again can be i/os in the segment
|
|
|
|
of this thread */
|
|
|
|
|
|
|
|
os_event_reset(os_aio_segment_wait_events[global_segment]);
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
recommended_sleep:
|
|
|
|
srv_io_thread_op_info[global_segment] =
|
|
|
|
(char*)"waiting for i/o request";
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
os_event_wait(os_aio_segment_wait_events[global_segment]);
|
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
if (os_aio_print_debug) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"InnoDB: i/o handler thread for i/o segment %lu wakes up\n",
|
|
|
|
global_segment);
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
goto restart;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Validates the consistency of an aio array. */
|
|
|
|
static
|
|
|
|
ibool
|
|
|
|
os_aio_array_validate(
|
|
|
|
/*==================*/
|
|
|
|
/* out: TRUE if ok */
|
|
|
|
os_aio_array_t* array) /* in: aio wait array */
|
|
|
|
{
|
|
|
|
os_aio_slot_t* slot;
|
|
|
|
ulint n_reserved = 0;
|
|
|
|
ulint i;
|
|
|
|
|
|
|
|
ut_a(array);
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
ut_a(array->n_slots > 0);
|
|
|
|
ut_a(array->n_segments > 0);
|
|
|
|
|
|
|
|
for (i = 0; i < array->n_slots; i++) {
|
|
|
|
slot = os_aio_array_get_nth_slot(array, i);
|
|
|
|
|
|
|
|
if (slot->reserved) {
|
|
|
|
n_reserved++;
|
|
|
|
ut_a(slot->len > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ut_a(array->n_reserved == n_reserved);
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Validates the consistency the aio system. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_aio_validate(void)
|
|
|
|
/*=================*/
|
|
|
|
/* out: TRUE if ok */
|
|
|
|
{
|
|
|
|
os_aio_array_validate(os_aio_read_array);
|
|
|
|
os_aio_array_validate(os_aio_write_array);
|
|
|
|
os_aio_array_validate(os_aio_ibuf_array);
|
|
|
|
os_aio_array_validate(os_aio_log_array);
|
|
|
|
os_aio_array_validate(os_aio_sync_array);
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Prints info of the aio arrays. */
|
|
|
|
|
|
|
|
void
|
2002-07-08 19:34:49 +03:00
|
|
|
os_aio_print(
|
|
|
|
/*=========*/
|
|
|
|
char* buf, /* in/out: buffer where to print */
|
|
|
|
char* buf_end)/* in: buffer end */
|
2001-02-17 14:19:19 +02:00
|
|
|
{
|
|
|
|
os_aio_array_t* array;
|
|
|
|
os_aio_slot_t* slot;
|
|
|
|
ulint n_reserved;
|
2001-10-10 22:47:08 +03:00
|
|
|
time_t current_time;
|
|
|
|
double time_elapsed;
|
2002-06-22 20:41:14 +03:00
|
|
|
double avg_bytes_read;
|
2001-02-17 14:19:19 +02:00
|
|
|
ulint i;
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
if (buf_end - buf < 1200) {
|
2002-07-08 19:34:49 +03:00
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
for (i = 0; i < srv_n_file_io_threads; i++) {
|
2003-06-15 01:04:28 +03:00
|
|
|
buf += sprintf(buf, "I/O thread %lu state: %s (%s)\n", i,
|
|
|
|
srv_io_thread_op_info[i],
|
|
|
|
srv_io_thread_function[i]);
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
}
|
|
|
|
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf, "Pending normal aio reads:");
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
array = os_aio_read_array;
|
|
|
|
loop:
|
|
|
|
ut_a(array);
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
ut_a(array->n_slots > 0);
|
|
|
|
ut_a(array->n_segments > 0);
|
|
|
|
|
|
|
|
n_reserved = 0;
|
|
|
|
|
|
|
|
for (i = 0; i < array->n_slots; i++) {
|
|
|
|
slot = os_aio_array_get_nth_slot(array, i);
|
|
|
|
|
|
|
|
if (slot->reserved) {
|
|
|
|
n_reserved++;
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
/* printf("Reserved slot, messages %lx %lx\n",
|
ut0ut.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
page0page.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
que0que.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0ins.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0sel.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0upd.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0vers.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0start.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0arr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0rec.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
trx0trx.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
srv0srv.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0rw.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
sync0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ut0dbg.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
lock0lock.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0log.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
log0recv.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
ibuf0ibuf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
hash0hash.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mach0data.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0mem.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mem0pool.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
mtr0mtr.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0file.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0sync.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
os0thread.h Fixes for 64-bit Linux, bug fixes, compiler warning fixes
univ.i Fixes for 64-bit Linux, bug fixes, compiler warning fixes
row0mysql.ic Fixes for 64-bit Linux, bug fixes, compiler warning fixes
com0shm.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0data.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
data0type.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0crea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
dict0dict.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fil0fil.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fsp0fsp.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
fut0lst.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0sea.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0buf.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
buf0flu.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0btr.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
btr0cur.c Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0btr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0cur.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/btr/btr0sea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0buf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/buf/buf0flu.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/com/com0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0data.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/data/data0type.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0crea.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/dict/dict0dict.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fil/fil0fil.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fsp/fsp0fsp.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/fut/fut0lst.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ibuf/ibuf0ibuf.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/buf0buf.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/hash0hash.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mach0data.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0mem.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mem0pool.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/mtr0mtr.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0file.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0sync.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/os0thread.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/row0mysql.ic:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/univ.i:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/srv0srv.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0rw.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/sync0sync.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/include/ut0dbg.h:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/lock/lock0lock.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0log.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/log/log0recv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/mem/mem0pool.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0file.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0shm.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/os/os0thread.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/page/page0page.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/que/que0que.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0ins.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0mysql.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0sel.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0upd.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/row/row0vers.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0srv.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/srv/srv0start.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0arr.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0rw.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/sync/sync0sync.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0rec.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/trx/trx0trx.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
innobase/ut/ut0ut.c:
Fixes for 64-bit Linux, bug fixes, compiler warning fixes
2001-03-02 17:33:11 +02:00
|
|
|
(ulint)slot->message1,
|
|
|
|
(ulint)slot->message2);
|
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
sql/ha_innobase.cc:
Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
innobase/include/btr0cur.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/buf0buf.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/data0data.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/srv0srv.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0sys.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/include/trx0trx.h:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0btr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0cur.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/btr/btr0sea.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/buf/buf0buf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/data/data0data.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/fil/fil0fil.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/ibuf/ibuf0ibuf.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/lock/lock0lock.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/os/os0file.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0mysql.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0purge.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0sel.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0uins.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0umod.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/row/row0upd.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0srv.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/srv/srv0start.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/sync/sync0arr.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0roll.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0sys.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
innobase/trx/trx0trx.c:
Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
2001-08-29 19:42:23 +03:00
|
|
|
*/ ut_a(slot->len > 0);
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ut_a(array->n_reserved == n_reserved);
|
|
|
|
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf, " %lu", n_reserved);
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
if (array == os_aio_read_array) {
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf, ", aio writes:");
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0btr.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
< 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
< 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
< 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
< 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
< 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
< 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
< 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
< 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
< 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
< 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
< 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
< 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
< 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
< 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
< 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
< 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
Support raw disk partitions as data files
innobase/srv/srv0start.c:
Support raw disk partitions as data files
innobase/include/srv0srv.h:
Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
array = os_aio_write_array;
|
|
|
|
|
|
|
|
goto loop;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (array == os_aio_write_array) {
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf, ",\n ibuf aio reads:");
|
2001-02-17 14:19:19 +02:00
|
|
|
array = os_aio_ibuf_array;
|
|
|
|
|
|
|
|
goto loop;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (array == os_aio_ibuf_array) {
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf, ", log i/o's:");
|
2001-02-17 14:19:19 +02:00
|
|
|
array = os_aio_log_array;
|
|
|
|
|
|
|
|
goto loop;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (array == os_aio_log_array) {
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf, ", sync i/o's:");
|
2001-02-17 14:19:19 +02:00
|
|
|
array = os_aio_sync_array;
|
|
|
|
|
|
|
|
goto loop;
|
|
|
|
}
|
2001-10-10 22:47:08 +03:00
|
|
|
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf, "\n");
|
2001-10-10 22:47:08 +03:00
|
|
|
|
|
|
|
current_time = time(NULL);
|
2002-08-06 22:59:13 +03:00
|
|
|
time_elapsed = 0.001 + difftime(current_time, os_last_printout);
|
2001-10-10 22:47:08 +03:00
|
|
|
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf,
|
|
|
|
"Pending flushes (fsync) log: %lu; buffer pool: %lu\n",
|
2001-10-10 22:47:08 +03:00
|
|
|
fil_n_pending_log_flushes, fil_n_pending_tablespace_flushes);
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf,
|
|
|
|
"%lu OS file reads, %lu OS file writes, %lu OS fsyncs\n",
|
2001-10-10 22:47:08 +03:00
|
|
|
os_n_file_reads, os_n_file_writes, os_n_fsyncs);
|
2002-06-22 20:41:14 +03:00
|
|
|
|
2003-06-15 01:04:28 +03:00
|
|
|
if (os_file_n_pending_preads != 0 || os_file_n_pending_pwrites != 0) {
|
|
|
|
buf += sprintf(buf,
|
|
|
|
"%lu pending preads, %lu pending pwrites\n",
|
|
|
|
os_file_n_pending_preads, os_file_n_pending_pwrites);
|
|
|
|
}
|
|
|
|
|
2002-06-22 20:41:14 +03:00
|
|
|
if (os_n_file_reads == os_n_file_reads_old) {
|
|
|
|
avg_bytes_read = 0.0;
|
|
|
|
} else {
|
|
|
|
avg_bytes_read = os_bytes_read_since_printout /
|
|
|
|
(os_n_file_reads - os_n_file_reads_old);
|
|
|
|
}
|
|
|
|
|
2002-07-08 19:34:49 +03:00
|
|
|
buf += sprintf(buf,
|
2002-06-22 20:41:14 +03:00
|
|
|
"%.2f reads/s, %lu avg bytes/read, %.2f writes/s, %.2f fsyncs/s\n",
|
2001-10-10 22:47:08 +03:00
|
|
|
(os_n_file_reads - os_n_file_reads_old)
|
|
|
|
/ time_elapsed,
|
2002-06-22 20:41:14 +03:00
|
|
|
(ulint)avg_bytes_read,
|
2001-10-10 22:47:08 +03:00
|
|
|
(os_n_file_writes - os_n_file_writes_old)
|
|
|
|
/ time_elapsed,
|
|
|
|
(os_n_fsyncs - os_n_fsyncs_old)
|
|
|
|
/ time_elapsed);
|
|
|
|
|
|
|
|
os_n_file_reads_old = os_n_file_reads;
|
|
|
|
os_n_file_writes_old = os_n_file_writes;
|
|
|
|
os_n_fsyncs_old = os_n_fsyncs;
|
2002-06-22 20:41:14 +03:00
|
|
|
os_bytes_read_since_printout = 0;
|
2001-10-10 22:47:08 +03:00
|
|
|
|
|
|
|
os_last_printout = current_time;
|
2001-02-17 14:19:19 +02:00
|
|
|
}
|
|
|
|
|
2002-08-06 22:59:13 +03:00
|
|
|
/**************************************************************************
|
|
|
|
Refreshes the statistics used to print per-second averages. */
|
|
|
|
|
|
|
|
void
|
|
|
|
os_aio_refresh_stats(void)
|
|
|
|
/*======================*/
|
|
|
|
{
|
|
|
|
os_n_file_reads_old = os_n_file_reads;
|
|
|
|
os_n_file_writes_old = os_n_file_writes;
|
|
|
|
os_n_fsyncs_old = os_n_fsyncs;
|
|
|
|
os_bytes_read_since_printout = 0;
|
|
|
|
|
|
|
|
os_last_printout = time(NULL);
|
|
|
|
}
|
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
|
|
|
Checks that all slots in the system have been freed, that is, there are
|
|
|
|
no pending io operations. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
os_aio_all_slots_free(void)
|
|
|
|
/*=======================*/
|
|
|
|
/* out: TRUE if all free */
|
|
|
|
{
|
|
|
|
os_aio_array_t* array;
|
|
|
|
ulint n_res = 0;
|
|
|
|
|
|
|
|
array = os_aio_read_array;
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
n_res += array->n_reserved;
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
array = os_aio_write_array;
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
n_res += array->n_reserved;
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
array = os_aio_ibuf_array;
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
n_res += array->n_reserved;
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
array = os_aio_log_array;
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
n_res += array->n_reserved;
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
array = os_aio_sync_array;
|
|
|
|
|
|
|
|
os_mutex_enter(array->mutex);
|
|
|
|
|
|
|
|
n_res += array->n_reserved;
|
|
|
|
|
|
|
|
os_mutex_exit(array->mutex);
|
|
|
|
|
|
|
|
if (n_res == 0) {
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|