Commit 3b1a6ddf authored by unknown's avatar unknown

Added --skip-symlinks

Don't force repair of tables that are not closed properly.


Docs/manual.texi:
  Added information about symbolic links.
include/my_sys.h:
  symbolic link support
myisam/mi_check.c:
  Don't force repair of tables that are not closed properly.
myisam/myisamchk.c:
  Version number change.
mysys/my_static.c:
  symbolic link support
mysys/my_symlink2.c:
  Disabling of symbolic link support
sql/mysqld.cc:
  Disabling of symbolic link support
parent 7c9175ec
This diff is collapsed.
......@@ -208,7 +208,7 @@ extern long lCurMemory,lMaxMemory; /* from safemalloc */
extern ulong my_default_record_cache_size;
extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
NEAR my_disable_flush_key_blocks;
NEAR my_disable_flush_key_blocks, NEAR my_disable_symlinks;
extern char wild_many,wild_one,wild_prefix;
extern const char *charsets_dir;
extern char *defaults_extra_file;
......
......@@ -110,9 +110,14 @@ int chk_status(MI_CHECK *param, register MI_INFO *info)
"Table is marked as crashed");
if (share->state.open_count != (uint) (info->s->global_changed ? 1 : 0))
{
/* Don't count this as a real warning, as check can correct this ! */
uint save=param->warning_printed;
mi_check_print_warning(param,
"%d clients is using or hasn't closed the table properly",
share->state.open_count);
/* If this will be fixed by the check, forget the warning */
if (param->testflag & T_UPDATE_STATE)
param->warning_printed=save;
}
return 0;
}
......
......@@ -201,7 +201,7 @@ static struct option long_options[] =
static void print_version(void)
{
printf("%s Ver 1.45 for %s at %s\n",my_progname,SYSTEM_TYPE,
printf("%s Ver 1.46 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
}
......
......@@ -97,4 +97,5 @@ int (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)=
my_bool NEAR my_disable_locking=0;
my_bool NEAR my_disable_async_io=0;
my_bool NEAR my_disable_flush_key_blocks=0;
my_bool NEAR my_disable_symlinks=0;
my_bool NEAR mysys_uses_curses=0;
......@@ -62,7 +62,8 @@ File my_create_with_symlink(const char *linkname, const char *filename,
int my_delete_with_symlink(const char *name, myf MyFlags)
{
char link_name[FN_REFLEN];
int was_symlink= !my_readlink(link_name, name, MYF(0));
int was_symlink= (!my_disable_symlinks &&
!my_readlink(link_name, name, MYF(0)));
int result;
DBUG_ENTER("my_delete_with_symlink");
......@@ -90,7 +91,8 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
return my_rename(from, to, MyFlags);
#else
char link_name[FN_REFLEN], tmp_name[FN_REFLEN];
int was_symlink= !my_readlink(link_name, name, MYF(0));
int was_symlink= (!my_disable_symlinks &&
!my_readlink(link_name, name, MYF(0)));
int result;
DBUG_ENTER("my_rename_with_symlink");
......
......@@ -2462,7 +2462,7 @@ enum options {
OPT_TEMP_POOL, OPT_TX_ISOLATION,
OPT_GEMINI_FLUSH_LOG, OPT_GEMINI_RECOVER,
OPT_GEMINI_UNBUFFERED_IO, OPT_SKIP_SAFEMALLOC,
OPT_SKIP_STACK_TRACE
OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS
};
static struct option long_options[] = {
......@@ -2588,6 +2588,7 @@ static struct option long_options[] = {
{"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB},
{"skip-slave-start", no_argument, 0, (int) OPT_SKIP_SLAVE_START},
{"skip-stack-trace", no_argument, 0, (int) OPT_SKIP_STACK_TRACE},
{"skip-symlinks", no_argument, 0, (int) OPT_SKIP_SYMLINKS},
{"skip-thread-priority", no_argument, 0, (int) OPT_SKIP_PRIOR},
{"sql-bin-update-same", no_argument, 0, (int) OPT_SQL_BIN_UPDATE_SAME},
#include "sslopt-longopts.h"
......@@ -3420,6 +3421,7 @@ static void get_options(int argc,char **argv)
myisam_delay_key_write=0;
myisam_concurrent_insert=0;
myisam_recover_options= HA_RECOVER_NONE;
my_disable_symlinks=1;
ha_open_options&= ~HA_OPEN_ABORT_IF_CRASHED;
break;
case (int) OPT_SAFE:
......@@ -3476,6 +3478,9 @@ static void get_options(int argc,char **argv)
case (int) OPT_SKIP_STACK_TRACE:
test_flags|=TEST_NO_STACKTRACE;
break;
case (int) OPT_SKIP_SYMLINKS:
my_disable_symlinks=1;
break;
case (int) OPT_BIND_ADDRESS:
if (optarg && isdigit(optarg[0]))
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment