Hi Monty,
the 'check table' is failing because of a RDLCK lock on the index file.
From the trace
T@4 : | | | | | <open_table
T@4 : | | | | | >mysql_lock_tables
T@4 : | | | | | | >my_malloc
T@4 : | | | | | | | my: Size: 24 MyFlags: 0
T@4 : | | | | | | | exit: ptr: 377f28
T@4 : | | | | | | <my_malloc
T@4 : | | | | | | >lock_external
T@4 : | | | | | | | >mi_lock_database
T@4 : | | | | | | | | >my_lock
T@4 : | | | | | | | | | my: Fd: 12 Op: 4 start: 0 Length: 0
MyFlags: 32
T@4 : | | | | | | | | <my_lock
T@4 : | | | | | | | | >my_pread
T@4 : | | | | | | | | | my: Fd: 12 Seek: 0 Buffer: d2eb24 Count:
176 MyFlags: 4
T@4 : | | | | | | | | <my_pread
here the F_RDLCK (=4) is issued, and read are still permitted
T@4 : | | | | | | | <mi_lock_database
T@4 : | | | | | | <lock_external
T@4 : | | | | | | >thr_multi_lock
T@4 : | | | | | | | lock: data: 377f38 count: 1
T@4 : | | | | | | | >thr_lock
T@4 : | | | | | | | | lock: data: 41b3f0 thread: 4 lock: 3fd1e0
type: 4
T@4 : | | | | | | | | >mi_get_status
T@4 : | | | | | | | | | info: key_file: 1024 data_file: 0
T@4 : | | | | | | | | <mi_get_status
T@4 : | | | | | | | <thr_lock
T@4 : | | | | | | <thr_multi_lock
T@4 : | | | | | <mysql_lock_tables
T@4 : | | | | <open_ltable
T@4 : | | | | >chk_size
T@4 : | | | | | >flush_key_blocks
T@4 : | | | | | | enter: file: 12 blocks_used: 0 blocks_changed: 0
T@4 : | | | | | <flush_key_blocks
T@4 : | | | | | >my_seek
T@4 : | | | | | | my: Fd: 12 Hpos: 0 Pos: 0 Whence: 0 MyFlags: 2
T@4 : | | | | | <my_seek
T@4 : | | | | | >my_seek
T@4 : | | | | | | my: Fd: 13 Hpos: 0 Pos: 0 Whence: 0 MyFlags: 2
T@4 : | | | | | <my_seek
T@4 : | | | | <chk_size
T@4 : | | | | >chk_del
T@4 : | | | | <chk_del
T@4 : | | | | >chk_key
T@4 : | | | | | >calc_checksum
T@4 : | | | | | | exit: sum: 0
T@4 : | | | | | <calc_checksum
T@4 : | | | | <chk_key
T@4 : | | | | >init_io_cache
T@4 : | | | | | enter: type: 0 pos: 0
T@4 : | | | | | >my_tell
T@4 : | | | | | | my: Fd: 13 MyFlags: 0
T@4 : | | | | | | exit: pos: 0
T@4 : | | | | | <my_tell
T@4 : | | | | | >my_seek
T@4 : | | | | | | my: Fd: 13 Hpos: 0 Pos: 0 Whence: 0 MyFlags: 2
T@4 : | | | | | <my_seek
T@4 : | | | | | >my_seek
T@4 : | | | | | | my: Fd: 13 Hpos: 0 Pos: 0 Whence: 0 MyFlags: 0
T@4 : | | | | | <my_seek
T@4 : | | | | | >my_malloc
T@4 : | | | | | | my: Size: 16384 MyFlags: 16
T@4 : | | | | | | exit: ptr: 41cf10
T@4 : | | | | | <my_malloc
T@4 : | | | | | info: init_io_cache: cachesize = 16384
T@4 : | | | | <init_io_cache
T@4 : | | | | >chk_data_link
T@4 : | | | | <chk_data_link
T@4 : | | | | >end_io_cache
T@4 : | | | | | >flush_io_cache
T@4 : | | | | | <flush_io_cache
T@4 : | | | | | >my_free
T@4 : | | | | | | my: ptr: 41cf10
T@4 : | | | | | <my_free
T@4 : | | | | <end_io_cache
I don't see unlocking calls in this block of tracing.
T@4 : | | | | >my_pwrite
T@4 : | | | | | my: Fd: 12 Seek: 0 Buffer: d2d654 Count: 176
MyFlags: 132
T@4 : | | | | | error: Write only -1 bytes
T@4 : | | | | <my_pwrite
T@4 : | | | | error: message: 43 when updateing keyfile
so write() is failing.
So I need to unlock file before calling my_pwrite(), or stay with
current locking code (which doesn't make difference between F_RDLCK and
F_WRLCK).
Bye,
Yuri Dario
/*
* member of TeamOS/2 - Italy
* http://www.quasarbbs.com/yuri
* http://www.teamos2.it
*/