Commit 754c9883 authored by unknown's avatar unknown

Fixed portability issue with comparing thread id

Fixed bug where return value 'error' was not set in case of error in pagecache
Documented the open LOAD INDEX bug


KNOWN_BUGS.txt:
  Added the problem with LOAD INDEX as a known bugs. Will fix this bug later this week
storage/maria/ma_pagecache.c:
  Fixed portability issue with comparing thread id
  Fixed bug where return value 'error' was not set in case of error
parent 19b70b64
...@@ -31,7 +31,9 @@ Known bugs that are planned to be fixed before next minor release ...@@ -31,7 +31,9 @@ Known bugs that are planned to be fixed before next minor release
Temporary fix is to remove or maria_log.???????? files from the data Temporary fix is to remove or maria_log.???????? files from the data
directory, restart mysqld and run CHECK TABLE / REPAIR TABLE or directory, restart mysqld and run CHECK TABLE / REPAIR TABLE or
mysqlcheck on your Maria tables mysqlcheck on your Maria tables
- LOAD INDEX commands are for the moment ignored for Maria tables
(The code needs to be rewritten to do all reads through page cache to
avoid half-block reads)
Known bugs that are planned to be fixed before Beta Known bugs that are planned to be fixed before Beta
=================================================== ===================================================
......
...@@ -2224,7 +2224,7 @@ static my_bool get_wrlock(PAGECACHE *pagecache, ...@@ -2224,7 +2224,7 @@ static my_bool get_wrlock(PAGECACHE *pagecache,
file.file, block->hash_link->file.file, file.file, block->hash_link->file.file,
(ulong) pageno, (ulong) block->hash_link->pageno)); (ulong) pageno, (ulong) block->hash_link->pageno));
PCBLOCK_INFO(block); PCBLOCK_INFO(block);
while (block->wlocks && block->write_locker != locker) while (block->wlocks && !pthread_equal(block->write_locker, locker))
{ {
/* Lock failed we will wait */ /* Lock failed we will wait */
#ifdef THREAD #ifdef THREAD
...@@ -3658,19 +3658,16 @@ my_bool pagecache_write_part(PAGECACHE *pagecache, ...@@ -3658,19 +3658,16 @@ my_bool pagecache_write_part(PAGECACHE *pagecache,
if (offset != 0 || size != pagecache->block_size) if (offset != 0 || size != pagecache->block_size)
{ {
char *page_buffer= alloca(pagecache->block_size); char *page_buffer= alloca(pagecache->block_size);
int error= pagecache_fread(pagecache, file, if ((error= pagecache_fread(pagecache, file,
page_buffer, page_buffer,
pageno, pageno,
pagecache->readwrite_flags); pagecache->readwrite_flags)))
if (error)
goto end; goto end;
else if ((file->read_callback)(page_buffer, pageno, file->callback_data))
{ {
if ((file->read_callback)(page_buffer, pageno, file->callback_data)) DBUG_PRINT("error", ("read callback problem"));
{ error= 1;
DBUG_PRINT("error", ("read callback problem")); goto end;
goto end;
}
} }
memcpy(page_buffer + offset, buff, size); memcpy(page_buffer + offset, buff, size);
buff= page_buffer; buff= page_buffer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment