summaryrefslogtreecommitdiff
path: root/mysys/my_seek.c
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2007-12-18 03:21:32 +0200
committerunknown <monty@mysql.com/narttu.mysql.fi>2007-12-18 03:21:32 +0200
commit30d3d8d3fc41d04f2f90389a42f27520ed63b41b (patch)
tree7a6a9aa09551c88bf567bc3cf7b21c61ce74c0d7 /mysys/my_seek.c
parent7d6d02ca9d2f3868bcfb11ba529ef52a006d83e5 (diff)
downloadmariadb-git-30d3d8d3fc41d04f2f90389a42f27520ed63b41b.tar.gz
Fixed several bugs in page CRC handling
- Ignore CRC errors in REDO for potential new pages - Ignore CRC errors when repairing tables - Don't do readcheck callback on read error - Set my_errno to HA_ERR_WRONG_CRC if we find page with wrong CRC - Check index page for length before calculating CRC to catch bad pages Fixed bugs where we used wrong file descriptor to read/write bitmaps Fixed wrong hash key in 'files_in_flush' Fixed wrong lock method when writing bitmap Fixed some wrong printf statements in check/repair that caused core dumps Fixed argument to translog_page_validator that cause reading of log files to fail Store number of bytes used for delete-linked key pages to be able to use standard index CRC for deleted key pages. Use fast 'dummy' pagecheck callbacks for temporary tables Don't die silently if flush finds pinned pages Give error (for now) if one tries to create a transactional table with fulltext or spatial keys Removed some not needed calls to pagecache_file_init() Added checking of pagecache checksums to ma_test1 and ma_test2 More DBUG Fixed some DBUG_PRINT to be in line with rest of the code include/my_base.h: Added HA_ERR_INTERNAL_ERROR (used for flush with pinned pages) and HA_ERR_WRONG_CRC mysql-test/r/binlog_unsafe.result: Added missing DROP VIEW statement mysql-test/r/maria.result: Added TRANSACTIONAL=0 when testing with fulltext keys Added test that verifies we can't yet create transactional test with fulltext or spatial keys mysql-test/r/ps_maria.result: Added TRANSACTIONAL=0 when testing with fulltext keys mysql-test/t/binlog_unsafe.test: Added missing DROP VIEW statement mysql-test/t/maria.test: Added TRANSACTIONAL=0 when testing with fulltext keys Added test that verifies we can't yet create transactional test with fulltext or spatial keys mysql-test/t/ps_maria.test: Added TRANSACTIONAL=0 when testing with fulltext keys mysys/my_fopen.c: Fd: -> fd: mysys/my_handler.c: Added new error messages mysys/my_lock.c: Fd: -> fd: mysys/my_pread.c: Fd: -> fd: mysys/my_read.c: Fd: -> fd: mysys/my_seek.c: Fd: -> fd: mysys/my_sync.c: Fd: -> fd: mysys/my_write.c: Fd: -> fd: sql/mysqld.cc: Fixed wrong argument to my_uuid_init() sql/sql_plugin.cc: Unified DBUG_PRINT (for convert-dbug-for-diff) storage/maria/ma_bitmap.c: Fixed wrong lock method when writing bitmap Fixed valgrind error Use fast 'dummy' pagecheck callbacks for temporary tables Faster bitmap handling for non transational tables storage/maria/ma_blockrec.c: Fixed that bitmap reading is done with the correct filehandle Handle reading of pages with wrong CRC when page contect doesn't matter Use the page buffer also when we get WRONG CRC or FILE_TOO_SHORT. (Faster and fixed a couple of bugs) storage/maria/ma_check.c: Split long strings for readablity Fixed some wrong printf statements that caused core dumps Use bitmap.file for bitmaps Ignore pages with wrong CRC storage/maria/ma_close.c: More DBUG_PRINT storage/maria/ma_create.c: Give error (for now) if one tries to create a crash safe table with fulltext or spatial keys storage/maria/ma_key_recover.c: Ignore HA_ERR_WRONG_CRC for new pages info->s -> share Store number of bytes used for delete-linked key pages to be able to use standard index CRC for deleted key pages. storage/maria/ma_loghandler.c: Fixed argument to translog_page_validator() storage/maria/ma_open.c: Removed old VMS specific code Added function to setup pagecache callbacks Moved code around to set 'share->temporary' early Removed some not needed calls to pagecache_file_init() storage/maria/ma_page.c: Store number of bytes used for delete-linked key pages to be able to use standard index CRC for deleted key pages. storage/maria/ma_pagecache.c: Don't do readcheck callback on read error Reset PCBLOCK_ERROR in pagecache_unlock_by_link() if we write page Set my_errno to HA_ER_INTERNAL_ERROR if flush() finds pinned pages Don't die silently if flush finds pinned pages. Use correct file descriptor when flushing pages Fixed wrong hash key in 'files_in_flush'; This must be the file descriptor, not the PAGECACHE_FILE as there may be several PAGECACHE_FILE for same file descriptor More DBUG_PRINT storage/maria/ma_pagecrc.c: Removed inline from not tiny static function Set my_errno to HA_ERR_WRONG_CRC if we find page with wrong CRC (Otherwise my_errno may be 0, and a lot of other code will be confused) CRCerror -> error (to keep code uniform) Print crc with %lu, as in my_checksum() uchar* -> uchar * Check index page for length before calculating CRC to catch bad pages Added 'dummy' crc_check and filler functions that are used for temporary tables storage/maria/ma_recovery.c: More DBUG More message to users to give information what phase failed Better error message if recovery failed storage/maria/ma_test1.c: Added checking of page checksums (combined with 'c' to not have to add more test runs) storage/maria/ma_test2.c: Added checking of page checksums (combined with 'c' to not have to add more test runs) storage/maria/maria_chk.c: Fixed wrong argument to _ma_check_print_error() storage/maria/maria_def.h: Added format information to _ma_check_print_xxxx functions uchar* -> uchar *
Diffstat (limited to 'mysys/my_seek.c')
-rw-r--r--mysys/my_seek.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_seek.c b/mysys/my_seek.c
index 2c661baeff7..4e18b510a1e 100644
--- a/mysys/my_seek.c
+++ b/mysys/my_seek.c
@@ -47,7 +47,7 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
{
reg1 os_off_t newpos= -1;
DBUG_ENTER("my_seek");
- DBUG_PRINT("my",("Fd: %d Hpos: %lu Pos: %lu Whence: %d MyFlags: %d",
+ DBUG_PRINT("my",("fd: %d Hpos: %lu Pos: %lu Whence: %d MyFlags: %d",
fd, (ulong) (((ulonglong) pos) >> 32), (ulong) pos,
whence, MyFlags));
DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */
@@ -87,7 +87,7 @@ my_off_t my_tell(File fd, myf MyFlags __attribute__((unused)))
{
os_off_t pos;
DBUG_ENTER("my_tell");
- DBUG_PRINT("my",("Fd: %d MyFlags: %d",fd, MyFlags));
+ DBUG_PRINT("my",("fd: %d MyFlags: %d",fd, MyFlags));
DBUG_ASSERT(fd >= 0);
#ifdef HAVE_TELL
pos=tell(fd);