Commit f9323280 authored by unknown's avatar unknown

Added INNODB as a synonym for INNOBASE

Fixed bug where FLUSH TABLES could make indexes unavailable for the next query
Added --skip-safemalloc


Docs/manual.texi:
  Added some information about --with-debug=full
sql/lex.h:
  Added INNODB as a synonym for INNOBASE
sql/mysqld.cc:
  Added myisam variables.
  Moved shutdown message to after databases has been closed.
  Removed old define for MacOS X.
  Added --skip-safemalloc.
  Added missing \ to strings
sql/sql_base.cc:
  Fixed bug where FLUSH TABLES could make indexes unavailable for
  the next query.
support-files/my-huge.cnf.sh:
  Added / to end of innobase directory options
support-files/my-large.cnf.sh:
  Added / to end of innobase directory options
support-files/my-medium.cnf.sh:
  Added / to end of innobase directory options
support-files/my-small.cnf.sh:
  Added / to end of innobase directory options
tests/fork_big.pl:
  Made test harder
parent 1776fbac
...@@ -24063,15 +24063,15 @@ the configuration file. Below is an example of possible configuration ...@@ -24063,15 +24063,15 @@ the configuration file. Below is an example of possible configuration
parameters in my.cnf for Innobase: parameters in my.cnf for Innobase:
@example @example
innobase_data_home_dir = c:\ibdata\ innobase_data_home_dir = /usr/local/mysql/var
innobase_log_group_home_dir = /usr/local/mysql/var
innobase_log_arch_dir = /usr/local/mysql/var
innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M
set-variable = innobase_mirrored_log_groups=1 set-variable = innobase_mirrored_log_groups=1
innobase_log_group_home_dir = c:\iblogs\
set-variable = innobase_log_files_in_group=3 set-variable = innobase_log_files_in_group=3
set-variable = innobase_log_file_size=5M set-variable = innobase_log_file_size=5M
set-variable = innobase_log_buffer_size=8M set-variable = innobase_log_buffer_size=8M
innobase_flush_log_at_trx_commit=1 innobase_flush_log_at_trx_commit=1
innobase_log_arch_dir = c:\iblogs\
innobase_log_archive=0 innobase_log_archive=0
set-variable = innobase_buffer_pool_size=16M set-variable = innobase_buffer_pool_size=16M
set-variable = innobase_additional_mem_pool_size=2M set-variable = innobase_additional_mem_pool_size=2M
...@@ -28120,6 +28120,9 @@ If you compile with @code{--with-debug=full}, then you will loose 20 % ...@@ -28120,6 +28120,9 @@ If you compile with @code{--with-debug=full}, then you will loose 20 %
for most queries, but some queries may take substantially longer (The for most queries, but some queries may take substantially longer (The
@strong{MySQL} benchmarks ran 35 % slower) @strong{MySQL} benchmarks ran 35 % slower)
If you use @code{--with-debug}, then you will only loose 15 %. If you use @code{--with-debug}, then you will only loose 15 %.
By starting a @code{mysqld} version compiled with @code{--with-debug=full}
with @code{--skip-safemalloc} the end result should be close to when
configuring with @code{--with-debug}.
@item @item
On a Sun SPARCstation 20, SunPro C++ 4.2 is 5 % faster than @code{gcc} 2.95.2. On a Sun SPARCstation 20, SunPro C++ 4.2 is 5 % faster than @code{gcc} 2.95.2.
...@@ -30899,9 +30902,9 @@ The @code{mysqladmin status} command result has the following columns: ...@@ -30899,9 +30902,9 @@ The @code{mysqladmin status} command result has the following columns:
@cindex open tables @cindex open tables
@item Open tables @tab Number of tables that are open now. @item Open tables @tab Number of tables that are open now.
@cindex memory use @cindex memory use
@item Memory in use @tab Memory allocated directly by the mysqld code (only available when @strong{MySQL} is compiled with --with-debug). @item Memory in use @tab Memory allocated directly by the mysqld code (only available when @strong{MySQL} is compiled with --with-debug=full).
@cindex max memory used @cindex max memory used
@item Max memory used @tab Maximum memory allocated directly by the mysqld code (only available when @strong{MySQL} is compiled with --with-debug). @item Max memory used @tab Maximum memory allocated directly by the mysqld code (only available when @strong{MySQL} is compiled with --with-debug=full).
@end multitable @end multitable
If you do @code{myslqadmin shutdown} on a socket (in other words, on a If you do @code{myslqadmin shutdown} on a socket (in other words, on a
...@@ -34363,8 +34366,9 @@ Try @code{fork_test.pl} and @code{fork2_test.pl}. ...@@ -34363,8 +34366,9 @@ Try @code{fork_test.pl} and @code{fork2_test.pl}.
@item @item
If you configure @strong{MySQL} for debugging, it will be much easier to If you configure @strong{MySQL} for debugging, it will be much easier to
gather information about possible errors if something goes wrong. gather information about possible errors if something goes wrong.
Reconfigure @strong{MySQL} with the @code{--with-debug} option to Reconfigure @strong{MySQL} with the @code{--with-debug} option or
@code{configure} and then recompile. @xref{Debugging server}. @code{--with-debug=full} to @code{configure} and then recompile.
@xref{Debugging server}.
@item @item
Configuring @strong{MySQL} for debugging causes a safe memory allocator to be Configuring @strong{MySQL} for debugging causes a safe memory allocator to be
...@@ -42479,6 +42483,10 @@ not yet 100 % confident in this code. ...@@ -42479,6 +42483,10 @@ not yet 100 % confident in this code.
Fixed bug in @code{ALTER TABLE} and @code{LOAD DATA INFILE} that disabled Fixed bug in @code{ALTER TABLE} and @code{LOAD DATA INFILE} that disabled
key-sorting. These command should now be faster in most cases. key-sorting. These command should now be faster in most cases.
@item @item
Fixed performance bug where reopened tables (tables that had been
waiting for @code{FLUSH} or @code{REPAIR}) would not use indexes for the
next query.
@item
Fixed problem with @code{ALTER TABLE} to Innobase tables on Freebsd. Fixed problem with @code{ALTER TABLE} to Innobase tables on Freebsd.
@item @item
Added @code{mysqld} variables @code{myisam_max_sort_file_size} and Added @code{mysqld} variables @code{myisam_max_sort_file_size} and
...@@ -48049,7 +48057,7 @@ autoheader ...@@ -48049,7 +48057,7 @@ autoheader
aclocal aclocal
automake automake
autoconf autoconf
./configure --with-debug --prefix='your installation directory' ./configure --with-debug=full --prefix='your installation directory'
# The makefiles generated above need GNU make 3.75 or newer. # The makefiles generated above need GNU make 3.75 or newer.
# (called gmake below) # (called gmake below)
...@@ -48123,11 +48131,11 @@ problems that may be unique to your environment. ...@@ -48123,11 +48131,11 @@ problems that may be unique to your environment.
If you have some very specific problem, you can always try to debug If you have some very specific problem, you can always try to debug
@strong{MySQL}. To do this you must configure @strong{MySQL} with the @strong{MySQL}. To do this you must configure @strong{MySQL} with the
option @code{--with-debug}. You can check whether or not @code{--with-debug} or the @code{--with-debug=full} option. You can check
@strong{MySQL} was compiled with debugging by doing: @code{mysqld whether or not @strong{MySQL} was compiled with debugging by doing:
--help}. If the @code{--debug} flag is listed with the options then you @code{mysqld --help}. If the @code{--debug} flag is listed with the
have debugging enabled. @code{mysqladmin ver} also lists the options then you have debugging enabled. @code{mysqladmin ver} also
@code{mysqld} version as @code{mysql ... -debug} in this case. lists the @code{mysqld} version as @code{mysql ... -debug} in this case.
If you are using gcc or egcs, the recommended configure line is: If you are using gcc or egcs, the recommended configure line is:
...@@ -48139,10 +48147,13 @@ This will avoid problems with the @code{libstdc++} library and with C++ ...@@ -48139,10 +48147,13 @@ This will avoid problems with the @code{libstdc++} library and with C++
exceptions (many compilers have problems with C++ exceptions in threaded exceptions (many compilers have problems with C++ exceptions in threaded
code) and compile a @strong{MySQL} version with support for all character sets. code) and compile a @strong{MySQL} version with support for all character sets.
If you suspect a memory overrun error, you can use @code{--with-debug=full}, If you suspect a memory overrun error, you can configure @strong{MySQL}
which will install a memory allocation checker. This is however quite slow with @code{--with-debug=full}, which will install a memory allocation
so this is not something one should do on a server in a heavy production (@code{SAFEMALLOC}) checker. Running with @code{SAFEMALLOC} is however
environment. quite slow, so if you get performance problems you should start
@code{mysqld} with the @code{--skip-safemalloc} option. This will
disable the memory overrun checks for each call to @code{malloc} and
@code{free}.
If @code{mysqld} stops crashing when you compile it with If @code{mysqld} stops crashing when you compile it with
@code{--with-debug}, you have probably found a compiler bug or a timing @code{--with-debug}, you have probably found a compiler bug or a timing
...@@ -165,6 +165,7 @@ static SYMBOL symbols[] = { ...@@ -165,6 +165,7 @@ static SYMBOL symbols[] = {
{ "INFILE", SYM(INFILE),0,0}, { "INFILE", SYM(INFILE),0,0},
{ "INNER", SYM(INNER_SYM),0,0}, { "INNER", SYM(INNER_SYM),0,0},
{ "INNOBASE", SYM(INNOBASE_SYM),0,0}, { "INNOBASE", SYM(INNOBASE_SYM),0,0},
{ "INNODB", SYM(INNOBASE_SYM),0,0},
{ "INSERT", SYM(INSERT),0,0}, { "INSERT", SYM(INSERT),0,0},
{ "INSERT_ID", SYM(INSERT_ID),0,0}, { "INSERT_ID", SYM(INSERT_ID),0,0},
{ "INT", SYM(INT_SYM),0,0}, { "INT", SYM(INT_SYM),0,0},
......
...@@ -271,6 +271,8 @@ ulong max_connections,max_insert_delayed_threads,max_used_connections, ...@@ -271,6 +271,8 @@ ulong max_connections,max_insert_delayed_threads,max_used_connections,
max_connect_errors, max_user_connections = 0; max_connect_errors, max_user_connections = 0;
ulong thread_id=1L,current_pid; ulong thread_id=1L,current_pid;
ulong slow_launch_threads = 0; ulong slow_launch_threads = 0;
ulong myisam_max_sort_file_size, myisam_max_extra_sort_file_size;
char mysql_real_data_home[FN_REFLEN], char mysql_real_data_home[FN_REFLEN],
mysql_data_home[2],language[LIBLEN],reg_ext[FN_EXTLEN], mysql_data_home[2],language[LIBLEN],reg_ext[FN_EXTLEN],
default_charset[LIBLEN],mysql_charsets_dir[FN_REFLEN], *charsets_list, default_charset[LIBLEN],mysql_charsets_dir[FN_REFLEN], *charsets_list,
...@@ -584,7 +586,6 @@ static void __cdecl kill_server(int sig_ptr) ...@@ -584,7 +586,6 @@ static void __cdecl kill_server(int sig_ptr)
my_thread_init(); // If this is a new thread my_thread_init(); // If this is a new thread
#endif #endif
close_connections(); close_connections();
sql_print_error(ER(ER_SHUTDOWN_COMPLETE),my_progname);
if (sig != MYSQL_KILL_SIGNAL && sig != 0) if (sig != MYSQL_KILL_SIGNAL && sig != 0)
unireg_abort(1); /* purecov: inspected */ unireg_abort(1); /* purecov: inspected */
else else
...@@ -634,7 +635,7 @@ void unireg_abort(int exit_code) ...@@ -634,7 +635,7 @@ void unireg_abort(int exit_code)
} }
void clean_up(void) void clean_up(bool print_message)
{ {
DBUG_PRINT("exit",("clean_up")); DBUG_PRINT("exit",("clean_up"));
if (cleanup_done++) if (cleanup_done++)
...@@ -655,17 +656,19 @@ void clean_up(void) ...@@ -655,17 +656,19 @@ void clean_up(void)
#ifdef USE_RAID #ifdef USE_RAID
end_raid(); end_raid();
#endif #endif
x_free((gptr) my_errmsg[ERRMAPP]); /* Free messages */
free_defaults(defaults_argv); free_defaults(defaults_argv);
my_free(mysql_tmpdir,MYF(0)); my_free(mysql_tmpdir,MYF(0));
x_free(opt_bin_logname); x_free(opt_bin_logname);
bitmap_free(&temp_pool); bitmap_free(&temp_pool);
free_max_user_conn(); free_max_user_conn();
end_slave();
#ifndef __WIN__ #ifndef __WIN__
if (!opt_bootstrap) if (!opt_bootstrap)
(void) my_delete(pidfile_name,MYF(0)); // This may not always exist (void) my_delete(pidfile_name,MYF(0)); // This may not always exist
#endif #endif
end_slave(); if (print_message)
sql_print_error(ER(ER_SHUTDOWN_COMPLETE),my_progname);
x_free((gptr) my_errmsg[ERRMAPP]); /* Free messages */
my_thread_end(); my_thread_end();
/* Tell main we are ready */ /* Tell main we are ready */
...@@ -1214,6 +1217,7 @@ help in finding out why mysqld died.\n",sig); ...@@ -1214,6 +1217,7 @@ help in finding out why mysqld died.\n",sig);
#if defined(HAVE_LINUXTHREADS) #if defined(HAVE_LINUXTHREADS)
#ifdef __i386__ #ifdef __i386__
trace_stack(); trace_stack();
fflush(stderr);
#endif /* __i386__ */ #endif /* __i386__ */
if (test_flags & TEST_CORE_ON_SIGNAL) if (test_flags & TEST_CORE_ON_SIGNAL)
write_core(sig); write_core(sig);
...@@ -1245,11 +1249,7 @@ static void init_signals(void) ...@@ -1245,11 +1249,7 @@ static void init_signals(void)
sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL); sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL);
if (!(test_flags & TEST_NO_STACKTRACE)) if (!(test_flags & TEST_NO_STACKTRACE))
{ {
#ifdef HAVE_DARWIN_THREADS
sa.sa_handler=( void (*)() ) handle_segfault;
#else
sa.sa_handler=handle_segfault; sa.sa_handler=handle_segfault;
#endif
sigaction(SIGSEGV, &sa, NULL); sigaction(SIGSEGV, &sa, NULL);
#ifdef SIGBUS #ifdef SIGBUS
sigaction(SIGBUS, &sa, NULL); sigaction(SIGBUS, &sa, NULL);
...@@ -1698,6 +1698,10 @@ int main(int argc, char **argv) ...@@ -1698,6 +1698,10 @@ int main(int argc, char **argv)
reset_floating_point_exceptions(); reset_floating_point_exceptions();
init_thr_lock(); init_thr_lock();
/* Fix varibles that are base 1024*1024 */
myisam_max_temp_length= (my_off_t) min(((ulonglong) myisam_max_sort_file_size)*1024*1024, (ulonglong) MAX_FILE_SIZE);
myisam_max_extra_temp_length= (my_off_t) min(((ulonglong) myisam_max_extra_sort_file_size)*1024*1024, (ulonglong) MAX_FILE_SIZE);
/* Setup log files */ /* Setup log files */
if (opt_log) if (opt_log)
open_log(&mysql_log, glob_hostname, opt_logname, ".log", LOG_NORMAL); open_log(&mysql_log, glob_hostname, opt_logname, ".log", LOG_NORMAL);
...@@ -2460,7 +2464,7 @@ enum options { ...@@ -2460,7 +2464,7 @@ enum options {
OPT_GEMINI_SKIP, OPT_INNOBASE_SKIP, OPT_GEMINI_SKIP, OPT_INNOBASE_SKIP,
OPT_TEMP_POOL, OPT_TX_ISOLATION, OPT_TEMP_POOL, OPT_TX_ISOLATION,
OPT_GEMINI_FLUSH_LOG, OPT_GEMINI_RECOVER, OPT_GEMINI_FLUSH_LOG, OPT_GEMINI_RECOVER,
OPT_GEMINI_UNBUFFERED_IO OPT_GEMINI_UNBUFFERED_IO, OPT_SKIP_SAFEMALLOC,
}; };
static struct option long_options[] = { static struct option long_options[] = {
...@@ -2583,6 +2587,7 @@ static struct option long_options[] = { ...@@ -2583,6 +2587,7 @@ static struct option long_options[] = {
{"skip-host-cache", no_argument, 0, (int) OPT_SKIP_HOST_CACHE}, {"skip-host-cache", no_argument, 0, (int) OPT_SKIP_HOST_CACHE},
{"skip-name-resolve", no_argument, 0, (int) OPT_SKIP_RESOLVE}, {"skip-name-resolve", no_argument, 0, (int) OPT_SKIP_RESOLVE},
{"skip-new", no_argument, 0, (int) OPT_SKIP_NEW}, {"skip-new", no_argument, 0, (int) OPT_SKIP_NEW},
{"skip-safemalloc", no_argument, 0, (int) OPT_SKIP_SAFEMALLOC},
{"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB}, {"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB},
{"skip-slave-start", no_argument, 0, (int) OPT_SKIP_SLAVE_START}, {"skip-slave-start", no_argument, 0, (int) OPT_SKIP_SLAVE_START},
{"skip-networking", no_argument, 0, (int) OPT_SKIP_NETWORKING}, {"skip-networking", no_argument, 0, (int) OPT_SKIP_NETWORKING},
...@@ -2705,6 +2710,11 @@ CHANGEABLE_VAR changeable_vars[] = { ...@@ -2705,6 +2710,11 @@ CHANGEABLE_VAR changeable_vars[] = {
~0L, 1, ~0L, 0, 1 }, ~0L, 1, ~0L, 0, 1 },
{ "myisam_sort_buffer_size", (long*) &myisam_sort_buffer_size, { "myisam_sort_buffer_size", (long*) &myisam_sort_buffer_size,
8192*1024, 4, ~0L, 0, 1 }, 8192*1024, 4, ~0L, 0, 1 },
{ "myisam_max_extra_sort_file_size",
(long*) &myisam_max_extra_sort_file_size,
(long) (MI_MAX_TEMP_LENGTH/(1024L*1024L)), 0, ~0L, 0, 1 },
{ "myisam_max_sort_file_size", (long*) &myisam_max_sort_file_size,
(long) (LONG_MAX/(1024L*1024L)), 0, ~0L, 0, 1 },
{ "net_buffer_length", (long*) &net_buffer_length, { "net_buffer_length", (long*) &net_buffer_length,
16384, 1024, 1024*1024L, MALLOC_OVERHEAD, 1024 }, 16384, 1024, 1024*1024L, MALLOC_OVERHEAD, 1024 },
{ "net_retry_count", (long*) &mysqld_net_retry_count, { "net_retry_count", (long*) &mysqld_net_retry_count,
...@@ -2818,6 +2828,9 @@ struct show_var_st init_vars[]= { ...@@ -2818,6 +2828,9 @@ struct show_var_st init_vars[]= {
{"max_tmp_tables", (char*) &max_tmp_tables, SHOW_LONG}, {"max_tmp_tables", (char*) &max_tmp_tables, SHOW_LONG},
{"max_write_lock_count", (char*) &max_write_lock_count, SHOW_LONG}, {"max_write_lock_count", (char*) &max_write_lock_count, SHOW_LONG},
{"myisam_recover_options", (char*) &myisam_recover_options_str, SHOW_CHAR_PTR}, {"myisam_recover_options", (char*) &myisam_recover_options_str, SHOW_CHAR_PTR},
{"myisam_max_extra_sort_file_size", (char*) &myisam_max_extra_sort_file_size,
SHOW_LONG},
{"myisam_max_sort_file_size",(char*) &myisam_max_sort_file_size, SHOW_LONG},
{"myisam_sort_buffer_size", (char*) &myisam_sort_buffer_size, SHOW_LONG}, {"myisam_sort_buffer_size", (char*) &myisam_sort_buffer_size, SHOW_LONG},
{"net_buffer_length", (char*) &net_buffer_length, SHOW_LONG}, {"net_buffer_length", (char*) &net_buffer_length, SHOW_LONG},
{"net_read_timeout", (char*) &net_read_timeout, SHOW_LONG}, {"net_read_timeout", (char*) &net_read_timeout, SHOW_LONG},
...@@ -2950,6 +2963,10 @@ static void usage(void) ...@@ -2950,6 +2963,10 @@ static void usage(void)
#ifndef DBUG_OFF #ifndef DBUG_OFF
printf("\ printf("\
-#, --debug[=...] Debug log. Default is '%s'\n",default_dbug_option); -#, --debug[=...] Debug log. Default is '%s'\n",default_dbug_option);
#ifdef SAFEMALLOC
puts("\
--skip-safemalloc Don't use the memory allocation checking");
#endif
#endif #endif
puts("\ puts("\
--default-character-set=charset\n\ --default-character-set=charset\n\
...@@ -3042,7 +3059,7 @@ static void usage(void) ...@@ -3042,7 +3059,7 @@ static void usage(void)
#ifdef HAVE_GEMINI_DB #ifdef HAVE_GEMINI_DB
puts("\ puts("\
--gemini-recovery=mode Set Crash Recovery operating mode\n\ --gemini-recovery=mode Set Crash Recovery operating mode\n\
(FULL, NONE, FORCE - default FULL) (FULL, NONE, FORCE - default FULL)\n\
--gemini-flush-log-at-commit\n\ --gemini-flush-log-at-commit\n\
Every commit forces a write to the reovery log\n\ Every commit forces a write to the reovery log\n\
--gemini-unbuffered-io Use unbuffered i/o\n\ --gemini-unbuffered-io Use unbuffered i/o\n\
...@@ -3051,13 +3068,13 @@ static void usage(void) ...@@ -3051,13 +3068,13 @@ static void usage(void)
#endif #endif
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
puts("\ puts("\
--innobase_data_home_dir=dir The common part for innobase table spaces\n --innobase_data_home_dir=dir The common part for innobase table spaces\n\
--innobase_data_file_path=dir Path to individual files and their sizes\n --innobase_data_file_path=dir Path to individual files and their sizes\n\
--innobase_flush_log_at_trx_commit[=#] --innobase_flush_log_at_trx_commit[=#]\n\
Set to 0 if you don't want to flush logs\n\ Set to 0 if you don't want to flush logs\n\
--innobase_log_arch_dir=dir Where full logs should be archived\n\ --innobase_log_arch_dir=dir Where full logs should be archived\n\
--innobase_log_archive[=#] Set to 1 if you want to have logs archived\n\ --innobase_log_archive[=#] Set to 1 if you want to have logs archived\n\
--innobase_log_group_home_dir=dir Path to Innobase log files. --innobase_log_group_home_dir=dir Path to Innobase log files.\n\
--skip-innobase Don't use innobase (will save memory)\n\ --skip-innobase Don't use innobase (will save memory)\n\
"); ");
#endif /* HAVE_INNOBASE_DB */ #endif /* HAVE_INNOBASE_DB */
...@@ -3677,10 +3694,14 @@ static void get_options(int argc,char **argv) ...@@ -3677,10 +3694,14 @@ static void get_options(int argc,char **argv)
case OPT_MASTER_CONNECT_RETRY: case OPT_MASTER_CONNECT_RETRY:
master_connect_retry= atoi(optarg); master_connect_retry= atoi(optarg);
break; break;
case (int) OPT_SAFE_SHOW_DB: case OPT_SAFE_SHOW_DB:
opt_safe_show_db=1; opt_safe_show_db=1;
break; break;
case OPT_SKIP_SAFEMALLOC:
#ifdef SAFEMALLOC
sf_malloc_quick=1;
#endif
break;
default: default:
fprintf(stderr,"%s: Unrecognized option: %c\n",my_progname,c); fprintf(stderr,"%s: Unrecognized option: %c\n",my_progname,c);
use_help(); use_help();
......
...@@ -111,7 +111,8 @@ static void check_unused(void) ...@@ -111,7 +111,8 @@ static void check_unused(void)
#define check_unused() #define check_unused()
#endif #endif
int list_open_tables(THD *thd,List<char> *tables, const char *db,const char *wild) int list_open_tables(THD *thd,List<char> *tables, const char *db,
const char *wild)
{ {
int result = 0; int result = 0;
uint col_access=thd->col_access; uint col_access=thd->col_access;
...@@ -940,24 +941,28 @@ bool reopen_table(TABLE *table,bool locked) ...@@ -940,24 +941,28 @@ bool reopen_table(TABLE *table,bool locked)
goto end; goto end;
} }
tmp.key_length=table->key_length; /* This list copies variables set by open_table */
tmp.in_use=table->in_use;
tmp.used_keys=tmp.keys_in_use;
tmp.reginfo.lock_type=table->reginfo.lock_type;
tmp.version=refresh_version;
tmp.next=table->next;
tmp.prev=table->prev;
/* This list copies varibles set by open_table */
tmp.tablenr= table->tablenr; tmp.tablenr= table->tablenr;
tmp.tmp_table= table->tmp_table;
tmp.used_fields= table->used_fields; tmp.used_fields= table->used_fields;
tmp.const_table= table->const_table; tmp.const_table= table->const_table;
tmp.outer_join= table->outer_join; tmp.outer_join= table->outer_join;
tmp.null_row= table->null_row; tmp.null_row= table->null_row;
tmp.maybe_null= table->maybe_null;
tmp.status= table->status; tmp.status= table->status;
tmp.keys_in_use_for_query=tmp.used_keys=tmp.keys_in_use;
/* Get state */
tmp.key_length= table->key_length;
tmp.in_use= table->in_use;
tmp.reginfo.lock_type=table->reginfo.lock_type;
tmp.version= refresh_version;
tmp.tmp_table= table->tmp_table;
tmp.grant= table->grant; tmp.grant= table->grant;
/* Replace table in open list */
tmp.next=table->next;
tmp.prev=table->prev;
if (table->file) if (table->file)
VOID(closefrm(table)); // close file, free everything VOID(closefrm(table)); // close file, free everything
......
...@@ -47,9 +47,9 @@ server-id = 1 ...@@ -47,9 +47,9 @@ server-id = 1
#set-variable = bdb_max_lock=100000 #set-variable = bdb_max_lock=100000
# Uncomment the following if you are using Innobase tables # Uncomment the following if you are using Innobase tables
#innobase_data_home_dir = @datadir@ #innobase_data_home_dir = @localstatedir@/
#innobase_log_group_home_dir = @datadir@ #innobase_log_group_home_dir = @localstatedir@/
#innobase_log_arch_dir = @datadir@ #innobase_log_arch_dir = @localstatedir@/
#innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M #innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M
#set-variable = innobase_mirrored_log_groups=1 #set-variable = innobase_mirrored_log_groups=1
#set-variable = innobase_log_files_in_group=3 #set-variable = innobase_log_files_in_group=3
......
...@@ -43,9 +43,9 @@ server-id = 1 ...@@ -43,9 +43,9 @@ server-id = 1
#set-variable = bdb_max_lock=100000 #set-variable = bdb_max_lock=100000
# Uncomment the following if you are using Innobase tables # Uncomment the following if you are using Innobase tables
#innobase_data_home_dir = @datadir@ #innobase_data_home_dir = @localstatedir@/
#innobase_log_group_home_dir = @datadir@ #innobase_log_group_home_dir = @localstatedir@/
#innobase_log_arch_dir = @datadir@ #innobase_log_arch_dir = @localstatedir@/
#innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M #innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M
#set-variable = innobase_mirrored_log_groups=1 #set-variable = innobase_mirrored_log_groups=1
#set-variable = innobase_log_files_in_group=3 #set-variable = innobase_log_files_in_group=3
......
...@@ -45,9 +45,9 @@ server-id = 1 ...@@ -45,9 +45,9 @@ server-id = 1
#set-variable = bdb_max_lock=10000 #set-variable = bdb_max_lock=10000
# Uncomment the following if you are using Innobase tables # Uncomment the following if you are using Innobase tables
#innobase_data_home_dir = @datadir@ #innobase_data_home_dir = @localstatedir@/
#innobase_log_group_home_dir = @datadir@ #innobase_log_group_home_dir = @localstatedir@/
#innobase_log_arch_dir = @datadir@ #innobase_log_arch_dir = @localstatedir@/
#innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M #innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M
#set-variable = innobase_mirrored_log_groups=1 #set-variable = innobase_mirrored_log_groups=1
#set-variable = innobase_log_files_in_group=3 #set-variable = innobase_log_files_in_group=3
......
...@@ -42,9 +42,9 @@ server-id = 1 ...@@ -42,9 +42,9 @@ server-id = 1
#skip-bdb #skip-bdb
# Uncomment the following if you are using Innobase tables # Uncomment the following if you are using Innobase tables
#innobase_data_home_dir = @datadir@ #innobase_data_home_dir = @localstatedir@/
#innobase_log_group_home_dir = @datadir@ #innobase_log_group_home_dir = @localstatedir@/
#innobase_log_arch_dir = @datadir@ #innobase_log_arch_dir = @localstatedir@/
#innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M #innobase_data_file_path = ibdata1:25M;ibdata2:37M;ibdata3:100M;ibdata4:300M
#set-variable = innobase_mirrored_log_groups=1 #set-variable = innobase_mirrored_log_groups=1
#set-variable = innobase_log_files_in_group=3 #set-variable = innobase_log_files_in_group=3
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Tested a lot with: --threads=30 # Tested a lot with: --threads=30
$opt_loop_count=200000; # Change this to make test harder/easier $opt_loop_count=500000; # Change this to make test harder/easier
##################### Standard benchmark inits ############################## ##################### Standard benchmark inits ##############################
...@@ -308,7 +308,7 @@ sub test_check ...@@ -308,7 +308,7 @@ sub test_check
$type= "check"; $type= "check";
for ($i=$j=0 ; !test_if_abort($dbh) ; $i++) for ($i=$j=0 ; !test_if_abort($dbh) ; $i++)
{ {
sleep(60); sleep(1000);
$table=$testtables[$j]->[0]; $table=$testtables[$j]->[0];
$sth=$dbh->prepare("$type table $table") || die "Got error on prepare: $DBI::errstr\n"; $sth=$dbh->prepare("$type table $table") || die "Got error on prepare: $DBI::errstr\n";
$sth->execute || die $DBI::errstr; $sth->execute || die $DBI::errstr;
...@@ -346,7 +346,7 @@ sub test_repair ...@@ -346,7 +346,7 @@ sub test_repair
$type= "repair"; $type= "repair";
for ($i=0 ; !test_if_abort($dbh) ; $i++) for ($i=0 ; !test_if_abort($dbh) ; $i++)
{ {
sleep(95); sleep(2000);
$table=$testtables[0]->[0]; $table=$testtables[0]->[0];
$sth=$dbh->prepare("$type table $table") || die "Got error on prepare: $DBI::errstr\n"; $sth=$dbh->prepare("$type table $table") || die "Got error on prepare: $DBI::errstr\n";
$sth->execute || die $DBI::errstr; $sth->execute || die $DBI::errstr;
...@@ -382,7 +382,7 @@ sub test_flush ...@@ -382,7 +382,7 @@ sub test_flush
$count=0; $count=0;
while (!test_if_abort($dbh)) while (!test_if_abort($dbh))
{ {
sleep(60); sleep(3000);
$dbh->do("flush tables $tables") || $dbh->do("flush tables $tables") ||
die "Got error on flush $DBI::errstr\n"; die "Got error on flush $DBI::errstr\n";
$count++; $count++;
......
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