summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/nosik.monty.fi>2008-01-31 08:48:49 +0200
committerunknown <monty@mysql.com/nosik.monty.fi>2008-01-31 08:48:49 +0200
commit4d1cb99149ab28222ae24596df1570f301692cdb (patch)
treeba6b8b88079f1c0f24b26e2b38ed0d2ca51ce7c7
parent0857a6930d38602ec8d17fa1aa80bcf9e4ee1f5d (diff)
downloadmariadb-git-4d1cb99149ab28222ae24596df1570f301692cdb.tar.gz
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
-rw-r--r--KNOWN_BUGS.txt4
-rw-r--r--storage/maria/ma_pagecache.c21
2 files changed, 12 insertions, 13 deletions
diff --git a/KNOWN_BUGS.txt b/KNOWN_BUGS.txt
index 8779262cbd4..f2678b60906 100644
--- a/KNOWN_BUGS.txt
+++ b/KNOWN_BUGS.txt
@@ -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
directory, restart mysqld and run CHECK TABLE / REPAIR TABLE or
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
===================================================
diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c
index 47f6cd68cb7..5ea32dbf421 100644
--- a/storage/maria/ma_pagecache.c
+++ b/storage/maria/ma_pagecache.c
@@ -2224,7 +2224,7 @@ static my_bool get_wrlock(PAGECACHE *pagecache,
file.file, block->hash_link->file.file,
(ulong) pageno, (ulong) block->hash_link->pageno));
PCBLOCK_INFO(block);
- while (block->wlocks && block->write_locker != locker)
+ while (block->wlocks && !pthread_equal(block->write_locker, locker))
{
/* Lock failed we will wait */
#ifdef THREAD
@@ -3658,19 +3658,16 @@ no_key_cache:
if (offset != 0 || size != pagecache->block_size)
{
char *page_buffer= alloca(pagecache->block_size);
- int error= pagecache_fread(pagecache, file,
- page_buffer,
- pageno,
- pagecache->readwrite_flags);
- if (error)
+ if ((error= pagecache_fread(pagecache, file,
+ page_buffer,
+ pageno,
+ pagecache->readwrite_flags)))
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"));
- goto end;
- }
+ DBUG_PRINT("error", ("read callback problem"));
+ error= 1;
+ goto end;
}
memcpy(page_buffer + offset, buff, size);
buff= page_buffer;