diff options
author | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
commit | 139a2b64bf8ec2e248656835e23a5c98ffc667a8 (patch) | |
tree | 7d77d6f1073f8090f275b30cb3f10254497da243 /storage/myisam | |
parent | b3f7eac5301529c2d069ebe4d0558980412af3a2 (diff) | |
parent | ce675406ca8dbc1532a908803a1371de8432d466 (diff) | |
download | mariadb-git-139a2b64bf8ec2e248656835e23a5c98ffc667a8.tar.gz |
Merge with 5.2
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/ft_nlq_search.c | 1 | ||||
-rw-r--r-- | storage/myisam/ha_myisam.cc | 14 | ||||
-rw-r--r-- | storage/myisam/mi_check.c | 2 | ||||
-rw-r--r-- | storage/myisam/mi_panic.c | 2 | ||||
-rw-r--r-- | storage/myisam/myisampack.c | 2 |
5 files changed, 15 insertions, 6 deletions
diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c index bcce2cc8d60..edca8c25105 100644 --- a/storage/myisam/ft_nlq_search.c +++ b/storage/myisam/ft_nlq_search.c @@ -79,7 +79,6 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio) #else #error #endif - DBUG_ENTER("walk_and_match"); word->weight=LWS_FOR_QUERY; diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 7d5a81f7943..1edecf5289a 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -598,7 +598,11 @@ int ha_myisam::net_read_dump(NET* net) int data_fd = file->dfile; int error = 0; - my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)); + if (my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)) == MY_FILEPOS_ERROR) + { + error= my_errno; + goto err; + } for (;;) { ulong packet_len = my_net_read(net); @@ -634,7 +638,11 @@ int ha_myisam::dump(THD* thd, int fd) return ENOMEM; int error = 0; - my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)); + if (my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)) == MY_FILEPOS_ERROR) + { + error= my_errno; + goto err; + } for (; bytes_to_read > 0;) { size_t bytes = my_read(data_fd, buf, blocksize, MYF(MY_WME)); @@ -1491,7 +1499,7 @@ int ha_myisam::enable_indexes(uint mode) } else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE) { - THD *thd=current_thd; + THD *thd= table->in_use; HA_CHECK ¶m= *(HA_CHECK*) thd->alloc(sizeof(param)); const char *save_proc_info=thd->proc_info; diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index 3f569bda39c..8dc73443f50 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -1743,6 +1743,8 @@ err: MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) || mi_open_datafile(info,share,name,-1)) got_error=1; + + param->retry_repair= 0; } } if (got_error) diff --git a/storage/myisam/mi_panic.c b/storage/myisam/mi_panic.c index 2d06b66f834..99aef372027 100644 --- a/storage/myisam/mi_panic.c +++ b/storage/myisam/mi_panic.c @@ -72,8 +72,8 @@ int mi_panic(enum ha_panic_function flag) if (info->dfile >= 0 && my_close(info->dfile,MYF(0))) error = my_errno; info->s->kfile=info->dfile= -1; /* Files aren't open anymore */ - break; #endif + break; case HA_PANIC_READ: /* Restore to before WRITE */ #ifdef CANT_OPEN_FILES_TWICE { /* Open closed files */ diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c index 17add155193..6c63f5afaef 100644 --- a/storage/myisam/myisampack.c +++ b/storage/myisam/myisampack.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (C) 2000-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by |