diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/gen_lex_hash.cc | 14 | ||||
-rw-r--r-- | sql/ha_berkeley.cc | 2 | ||||
-rw-r--r-- | sql/ha_berkeley.h | 2 | ||||
-rw-r--r-- | sql/handler.h | 4 | ||||
-rw-r--r-- | sql/mysqld.cc | 102 | ||||
-rw-r--r-- | sql/sql_class.h | 2 |
6 files changed, 65 insertions, 61 deletions
diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index 97a3bc6f518..274445f7432 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -330,7 +330,7 @@ static struct option long_options[] = static void usage(int version) { - printf("%s Ver 3.1 Distrib %s, for %s (%s)\n", + printf("%s Ver 3.2 Distrib %s, for %s (%s)\n", my_progname, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); if (version) return; @@ -350,7 +350,7 @@ static void usage(int version) } static uint best_type; -static ulong best_t1,best_t2; +static ulong best_t1,best_t2, best_start_value; static int get_options(int argc, char **argv) { @@ -510,8 +510,10 @@ int main(int argc,char **argv) best_mod=function_mod; best_add=function_plus; best_functype=function_type; best_t1=t1; best_t2=t2; best_type=type; - printf("\nstart_value=%ldL; best_t1=%ldL; best_t2=%ldL; best_type=%d; /* mode=%d add=%d func_type: %d */\n", - start_value,best_t1,best_t2,best_type,best_mod,best_add,best_functype); + best_start_value=start_value; + printf("\nstart_value=%ldL; best_t1=%ldL; best_t2=%ldL; best_type=%d; /* mode=%d add=%d type: %d */\n", + best_start_value,best_t1,best_t2,best_type,best_mod,best_add, + best_functype); } } } @@ -537,8 +539,8 @@ printf("/* This code is generated by gen_lex_hash.cc that seeks for a perfect\nh print_arrays(); - printf("/* start_value=%ldL; best_t1=%ldL; best_t2=%ldL; best_type=%d; */ /* mode=%d add=%d type: %d */\n\n", - start_value, best_t1, best_t2,best_type, + printf("/* start_value=%ldL; best_t1=%ldL; best_t2=%ldL; best_type=%d; */ /* mode=%d add=%d t ype: %d */\n\n", + best_start_value, best_t1, best_t2, best_type, best_mod, best_add, best_functype); printf("inline SYMBOL *get_hash_symbol(const char *s,unsigned int length,bool function)\n\ diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index d1f5937263c..98e798a377b 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -89,7 +89,7 @@ static DB_ENV *db_env; static HASH bdb_open_tables; const char *berkeley_lock_names[] = -{ "DEFAULT", "OLDEST","RANDOM","YOUNGEST" }; +{ "DEFAULT", "OLDEST","RANDOM","YOUNGEST",0 }; u_int32_t berkeley_lock_types[]= { DB_LOCK_DEFAULT, DB_LOCK_OLDEST, DB_LOCK_RANDOM }; TYPELIB berkeley_lock_typelib= {array_elements(berkeley_lock_names),"", diff --git a/sql/ha_berkeley.h b/sql/ha_berkeley.h index 91b3405d593..5da38cd41fd 100644 --- a/sql/ha_berkeley.h +++ b/sql/ha_berkeley.h @@ -91,7 +91,7 @@ class ha_berkeley: public handler HA_BLOB_KEY | HA_NOT_EXACT_COUNT | HA_PRIMARY_KEY_IN_READ_INDEX | HA_DROP_BEFORE_CREATE | HA_AUTO_PART_KEY), - last_dup_key((uint) -1),version(0) + last_dup_key((uint) -1),version(0),using_ignore(0) { } ~ha_berkeley() {} diff --git a/sql/handler.h b/sql/handler.h index 571825c36ef..a4ebe9b51ff 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -25,7 +25,7 @@ #define NO_HASH /* Not yet implemented */ #endif -#if defined(HAVE_BERKELEY_DB) || defined(HAVE_INNOBASE_DB) || defined(HAVE_GEMENI_DB) +#if defined(HAVE_BERKELEY_DB) || defined(HAVE_INNOBASE_DB) || defined(HAVE_GEMINI_DB) #define USING_TRANSACTIONS #endif @@ -121,7 +121,7 @@ enum row_type { ROW_TYPE_DEFAULT, ROW_TYPE_FIXED, ROW_TYPE_DYNAMIC, typedef struct st_thd_trans { void *bdb_tid; void *innobase_tid; - void *gemeni_tid; + void *gemini_tid; } THD_TRANS; typedef struct st_ha_create_information diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d48171d49be..c56e98b305e 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -151,16 +151,21 @@ SHOW_COMP_OPTION have_berkeley_db=SHOW_OPTION_YES; #else SHOW_COMP_OPTION have_berkeley_db=SHOW_OPTION_NO; #endif -#ifdef HAVE_GEMENI_DB -SHOW_COMP_OPTION have_gemeni=SHOW_OPTION_YES; +#ifdef HAVE_GEMINI_DB +SHOW_COMP_OPTION have_gemini=SHOW_OPTION_YES; #else -SHOW_COMP_OPTION have_gemeni=SHOW_OPTION_NO; +SHOW_COMP_OPTION have_gemini=SHOW_OPTION_NO; #endif #ifdef HAVE_INNOBASE_DB SHOW_COMP_OPTION have_innobase=SHOW_OPTION_YES; #else SHOW_COMP_OPTION have_innobase=SHOW_OPTION_NO; #endif +#ifndef NO_ISAM +SHOW_COMP_OPTION have_isam=SHOW_OPTION_YES; +#else +SHOW_COMP_OPTION have_isam=SHOW_OPTION_NO; +#endif #ifdef USE_RAID SHOW_COMP_OPTION have_raid=SHOW_OPTION_YES; #else @@ -1077,26 +1082,26 @@ inline static __volatile__ void trace_stack() uchar **stack_bottom; uchar** ebp; LINT_INIT(ebp); - fprintf(stderr, "Attemping backtrace, please send the info below to\ - bugs@lists.mysql.com. If you see no messages after this, something \ - went terribly wrong - report this anyway\n"); + fprintf(stderr, "Attemping backtrace, please send the info below to \ +bugs@lists.mysql.com. If you see no messages after this, something \ +went terribly wrong - report this anyway\n"); THD* thd = current_thd; uint frame_count = 0; __asm __volatile__ ("movl %%ebp,%0" :"=r"(ebp) :"r"(ebp)); - if(!ebp) - { - fprintf(stderr, "frame pointer (ebp) is NULL, did you compile with \ - -fomit-frame-pointer? Aborting backtrace\n"); - return; - } - if(!thd) - { - fprintf(stderr, "Cannot determine thread, ebp=%p, aborting backtrace\n", - ebp); - return; - } + if (!ebp) + { + fprintf(stderr, "frame pointer (ebp) is NULL, did you compile with \ +-fomit-frame-pointer? Aborting backtrace\n"); + return; + } + if (!thd) + { + fprintf(stderr, "Cannot determine thread, ebp=%p, aborting backtrace\n", + ebp); + return; + } stack_bottom = (uchar**)thd->thread_stack; if(ebp > stack_bottom || ebp < stack_bottom - thread_stack) { @@ -1107,20 +1112,20 @@ inline static __volatile__ void trace_stack() fprintf(stderr, "stack range sanity check, ok, backtrace follows\n"); - while(ebp < stack_bottom) + while (ebp < stack_bottom) + { + uchar** new_ebp = (uchar**)*ebp; + fprintf(stderr, "%p\n", frame_count == SIGRETURN_FRAME_COUNT ? + *(ebp+17) : *(ebp+1)); + if (new_ebp <= ebp ) { - uchar** new_ebp = (uchar**)*ebp; - fprintf(stderr, "%p\n", frame_count == SIGRETURN_FRAME_COUNT ? - *(ebp+17) : *(ebp+1)); - if(new_ebp <= ebp ) - { - fprintf(stderr, "New value of ebp failed sanity check\ + fprintf(stderr, "New value of ebp failed sanity check\ terminating backtrace\n"); - return; - } - ebp = new_ebp; - ++frame_count; + return; } + ebp = new_ebp; + ++frame_count; + } fprintf(stderr, "stack trace successful\n"); } @@ -1133,31 +1138,27 @@ static sig_handler handle_segfault(int sig) // but since we have got SIGSEGV already, things are a mess // so not having the mutex is not as bad as possibly using a buggy // mutex - so we keep things simple - if(segfaulted) + if (segfaulted) return; segfaulted = 1; fprintf(stderr,"\ -mysqld got signal %s in thread %d; \n\ +mysqld got signal %d;\n\ The manual section 'Debugging a MySQL server' tells you how to use a \n\ debugger on the core file to produce a backtrace that may help you find out\n\ -why mysqld died\n",sys_siglist[sig],getpid()); -#if defined(HAVE_LINUXTHREADS) && defined(__i386__) +why mysqld died\n",sig); +#if defined(HAVE_LINUXTHREADS) +#ifdef __i386__ trace_stack(); -#endif -#ifdef HAVE_LINUXTHREADS +#endif /* __i386__ */ if (test_flags & TEST_CORE_ON_SIGNAL) write_core(sig); - else - exit(1); -#else - exit(1); /* abort everything */ -#endif +#endif /* HAVE_LINUXTHREADS */ + exit(1); } -#ifdef HAVE_LINUXTHREADS - /* Produce a core for the thread */ +#ifdef HAVE_LINUXTHREADS static sig_handler write_core(int sig) { signal(sig, SIG_DFL); @@ -1756,7 +1757,7 @@ The server will not act as a slave"); if (master_host) { pthread_t hThread; - if(!opt_skip_slave_start && + if (!opt_skip_slave_start && pthread_create(&hThread, &connection_attrib, handle_slave, 0)) sql_print_error("Warning: Can't create thread to handle slave"); else if(opt_skip_slave_start) @@ -2623,8 +2624,9 @@ struct show_var_st init_vars[]= { {"flush", (char*) &myisam_flush, SHOW_MY_BOOL}, {"flush_time", (char*) &flush_time, SHOW_LONG}, {"have_bdb", (char*) &have_berkeley_db, SHOW_HAVE}, - {"have_gemeni", (char*) &have_gemeni, SHOW_HAVE}, + {"have_gemini", (char*) &have_gemini, SHOW_HAVE}, {"have_innobase", (char*) &have_innobase, SHOW_HAVE}, + {"have_isam", (char*) &have_isam, SHOW_HAVE}, {"have_raid", (char*) &have_raid, SHOW_HAVE}, {"have_ssl", (char*) &have_ssl, SHOW_HAVE}, {"init_file", (char*) &opt_init_file, SHOW_CHAR_PTR}, @@ -3101,7 +3103,7 @@ static void get_options(int argc,char **argv) { char* key = optarg,*p, *val; p = strstr(optarg, "->"); - if(!p) + if (!p) { fprintf(stderr, "bad syntax in replicate-rewrite-db - missing ->\n"); @@ -3118,7 +3120,7 @@ static void get_options(int argc,char **argv) *val = 0; val += 2; while(*val && isspace(*val)) *val++; - if(!*val) + if (!*val) { fprintf(stderr, "bad syntax in replicate-rewrite-db - empty TO db\n"); @@ -3144,7 +3146,7 @@ static void get_options(int argc,char **argv) } case (int)OPT_REPLICATE_DO_TABLE: { - if(!do_table_inited) + if (!do_table_inited) init_table_rule_hash(&replicate_do_table, &do_table_inited); if(add_table_rule(&replicate_do_table, optarg)) { @@ -3156,7 +3158,7 @@ static void get_options(int argc,char **argv) } case (int)OPT_REPLICATE_WILD_DO_TABLE: { - if(!wild_do_table_inited) + if (!wild_do_table_inited) init_table_rule_array(&replicate_wild_do_table, &wild_do_table_inited); if(add_wild_table_rule(&replicate_wild_do_table, optarg)) @@ -3169,7 +3171,7 @@ static void get_options(int argc,char **argv) } case (int)OPT_REPLICATE_WILD_IGNORE_TABLE: { - if(!wild_ignore_table_inited) + if (!wild_ignore_table_inited) init_table_rule_array(&replicate_wild_ignore_table, &wild_ignore_table_inited); if(add_wild_table_rule(&replicate_wild_ignore_table, optarg)) @@ -3182,7 +3184,7 @@ static void get_options(int argc,char **argv) } case (int)OPT_REPLICATE_IGNORE_TABLE: { - if(!ignore_table_inited) + if (!ignore_table_inited) init_table_rule_hash(&replicate_ignore_table, &ignore_table_inited); if(add_table_rule(&replicate_ignore_table, optarg)) { diff --git a/sql/sql_class.h b/sql/sql_class.h index 67aac31257f..bd295be101c 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -301,7 +301,7 @@ public: { return (transaction.all.bdb_tid != 0 || transaction.all.innobase_tid != 0 || - transaction.all.gemeni_tid != 0); + transaction.all.gemini_tid != 0); } inline gptr alloc(unsigned int size) { return alloc_root(&mem_root,size); } inline gptr calloc(unsigned int size) |