summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <monty@tramp.mysql.fi>2000-10-03 14:18:03 +0300
committerunknown <monty@tramp.mysql.fi>2000-10-03 14:18:03 +0300
commit63b7b45ff7f79a08a673e8b759a69f5ee7e67902 (patch)
treec02cc6a9c6585038615c596332aae70354b44aac /include
parent27a17a6ef909533820b2137ab598fb7df220876d (diff)
downloadmariadb-git-63b7b45ff7f79a08a673e8b759a69f5ee7e67902.tar.gz
First part of automatic repair of MyISAM tables.
Error on full disk on repair. SIGHUP signal handling. Update with keys on timestamp Portability fixes Docs/manual.texi: Added documentation about automatic repair of MyISAM tables client/mysql.cc: Remove usage of tempnam. include/my_sys.h: Added create_temp_file include/myisam.h: Fix for disk full on repair myisam/mi_check.c: Fix for disk full on repair myisam/sort.c: Fix for disk full on repair & removed usage of tempnam() mysys/mf_cache.c: Remove usage of tempnam() mysys/mf_dirname.c: Changed convert_dirname to return end 0 mysys/my_fopen.c: Security fixes mysys/my_tempnam.c: remove blanks readline/bind.c: Portability fixes readline/complete.c: Portability fixes readline/histexpand.c: Portability fixes readline/input.c: Portability fixes readline/search.c: Portability fixes readline/shell.c: Portability fixes readline/terminal.c: Portability fixes readline/tilde.c: Portability fixes readline/undo.c: Portability fixes regex/cname.h: Portability fixes regex/debug.c: Portability fixes regex/main.c: Portability fixes regex/regcomp.c: Portability fixes regex/regerror.c: Portability fixes sql/filesort.cc: Remove dummy code sql/ha_myisam.cc: Automatic repair of MyISAM tables sql/ha_myisam.h: Automatic repair of MyISAM tables sql/handler.cc: Automatic repair of MyISAM tables sql/handler.h: Automatic repair of MyISAM tables sql/key.cc: Fix for UPDATE with key on timestamp column sql/mysql_priv.h: Automatic repair of MyISAM tables sql/mysqld.cc: Automatic repair of MyISAM tables & signal SIGHUP handling sql/sql_base.cc: Automatic repair of MyISAM tables sql/sql_class.cc: Automatic repair of MyISAM tables sql/sql_class.h: Fix for insert with reference to columns sql/sql_insert.cc: Fix for insert with reference to columns sql/table.cc: Automatic repair of MyISAM tables BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'include')
-rw-r--r--include/my_sys.h15
-rw-r--r--include/myisam.h3
2 files changed, 11 insertions, 7 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 05c63df1d77..77057ffa439 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -266,20 +266,21 @@ typedef struct st_dynamic_string {
typedef struct st_io_cache /* Used when cacheing files */
{
+ my_off_t pos_in_file,end_of_file;
byte *rc_pos,*rc_end,*buffer,*rc_request_pos;
+ int (*read_function)(struct st_io_cache *,byte *,uint);
+ char *file_name; /* if used with 'open_cached_file' */
+ char *dir,*prefix;
File file;
int seek_not_done,error;
uint buffer_length,read_length;
- my_off_t pos_in_file,end_of_file;
myf myflags; /* Flags used to my_read/my_write */
+ enum cache_type type;
#ifdef HAVE_AIOWAIT
uint inited;
my_off_t aio_read_pos;
my_aio_result aio_result;
#endif
- enum cache_type type;
- int (*read_function)(struct st_io_cache *,byte *,uint);
- char *file_name; /* if used with 'open_cached_file' */
} IO_CACHE;
typedef int (*qsort2_cmp)(const void *, const void *, const void *);
@@ -399,7 +400,7 @@ extern void TERMINATE(FILE *file);
#endif
extern void init_glob_errs(void);
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
-extern FILE *my_fdopen(File Filedes,int Flags,myf MyFlags);
+extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
extern int my_fclose(FILE *fd,myf MyFlags);
extern int my_chsize(File fd,my_off_t newlength,myf MyFlags);
extern int my_error _VARARGS((int nr,myf MyFlags, ...));
@@ -430,7 +431,7 @@ extern uint dirname_part(my_string to,const char *name);
extern uint dirname_length(const char *name);
#define base_name(A) (A+dirname_length(A))
extern int test_if_hard_path(const char *dir_name);
-extern void convert_dirname(my_string name);
+extern char *convert_dirname(my_string name);
extern void to_unix_path(my_string name);
extern my_string fn_ext(const char *name);
extern my_string fn_same(my_string toname,const char *name,int flag);
@@ -507,6 +508,8 @@ extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
myf cache_myflags);
extern my_bool real_open_cached_file(IO_CACHE *cache);
extern void close_cached_file(IO_CACHE *cache);
+File create_temp_file(char *to, const char *dir, const char *pfx,
+ int mode, myf MyFlags);
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
uint init_alloc,uint alloc_increment);
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element);
diff --git a/include/myisam.h b/include/myisam.h
index 885ded085ca..5d7ef6325db 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -339,7 +339,6 @@ typedef struct st_mi_check_param
typedef struct st_mi_sortinfo {
- uint key_length;
ha_rows max_records;
SORT_INFO *sort_info;
char *tmpdir;
@@ -347,6 +346,8 @@ typedef struct st_mi_sortinfo {
int (*key_read)(SORT_INFO *info,void *buff);
int (*key_write)(SORT_INFO *info, const void *buff);
void (*lock_in_memory)(MI_CHECK *info);
+ uint key_length;
+ myf myf_rw;
} MI_SORT_PARAM;
/* functions in mi_check */