diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-03-10 09:39:14 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-03-10 09:39:14 +0100 |
commit | 41d432462b905207b9a1cf51d2fcc88a7b09dd35 (patch) | |
tree | c046292241c90cdf078c49c93539a78e80094ea0 /storage/myisam | |
parent | d4a3a7b90ef06cb3eaf68317c42020e2980d3777 (diff) | |
parent | ce675406ca8dbc1532a908803a1371de8432d466 (diff) | |
download | mariadb-git-41d432462b905207b9a1cf51d2fcc88a7b09dd35.tar.gz |
merge 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 | 20 | ||||
-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, 18 insertions, 9 deletions
diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c index 90ad2d635b7..a00fa8e840c 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 09a20383937..c9450fd813f 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -591,7 +591,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); @@ -627,7 +631,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)); @@ -810,7 +818,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) param.thd = thd; param.op_name = "check"; param.db_name= table->s->db.str; - param.table_name= table->alias; + param.table_name= table->alias.c_ptr(); param.testflag = check_opt->flags | T_CHECK | T_SILENT; param.stats_method= (enum_handler_stats_method)thd->variables.myisam_stats_method; @@ -903,7 +911,7 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) param.thd = thd; param.op_name= "analyze"; param.db_name= table->s->db.str; - param.table_name= table->alias; + param.table_name= table->alias.c_ptr(); param.testflag= (T_FAST | T_CHECK | T_SILENT | T_STATISTICS | T_DONT_CHECK_CHECKSUM); param.using_global_keycache = 1; @@ -1129,7 +1137,7 @@ int ha_myisam::repair(THD *thd, HA_CHECK ¶m, bool do_optimize) DBUG_ENTER("ha_myisam::repair"); param.db_name= table->s->db.str; - param.table_name= table->alias; + param.table_name= table->alias.c_ptr(); param.tmpfile_createflag = O_RDWR | O_TRUNC; param.using_global_keycache = 1; param.thd= thd; @@ -1470,7 +1478,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 e92c9879e57..04bda066270 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 ba3ff3cdf0d..f1b9e04c474 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 |