diff options
-rw-r--r-- | heap/hp_create.c | 1 | ||||
-rw-r--r-- | heap/hp_update.c | 6 | ||||
-rw-r--r-- | heap/hp_write.c | 2 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 6 | ||||
-rw-r--r-- | sql/item_sum.cc | 2 | ||||
-rw-r--r-- | sql/item_sum.h | 2 | ||||
-rw-r--r-- | sql/sql_class.cc | 19 | ||||
-rw-r--r-- | sql/sql_lex.cc | 5 | ||||
-rw-r--r-- | sql/sql_select.cc | 2 |
9 files changed, 26 insertions, 19 deletions
diff --git a/heap/hp_create.c b/heap/hp_create.c index 40b8202d94f..5265607ce53 100644 --- a/heap/hp_create.c +++ b/heap/hp_create.c @@ -140,6 +140,7 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, share->auto_key= create_info->auto_key; share->auto_key_type= create_info->auto_key_type; share->auto_increment= create_info->auto_increment; + /* Must be allocated separately for rename to work */ if (!(share->name= my_strdup(name,MYF(0)))) { my_free((gptr) share,MYF(0)); diff --git a/heap/hp_update.c b/heap/hp_update.c index dd7374f506c..b789ab82b84 100644 --- a/heap/hp_update.c +++ b/heap/hp_update.c @@ -62,7 +62,8 @@ int heap_update(HP_INFO *info, const byte *old, const byte *heap_new) /* we don't need to delete non-inserted key from rb-tree */ if ((*keydef->write_key)(info, keydef, old, pos)) { - if (++(share->records) == share->blength) share->blength+= share->blength; + if (++(share->records) == share->blength) + share->blength+= share->blength; DBUG_RETURN(my_errno); } keydef--; @@ -78,6 +79,7 @@ int heap_update(HP_INFO *info, const byte *old, const byte *heap_new) keydef--; } } - if (++(share->records) == share->blength) share->blength+= share->blength; + if (++(share->records) == share->blength) + share->blength+= share->blength; DBUG_RETURN(my_errno); } /* heap_update */ diff --git a/heap/hp_write.c b/heap/hp_write.c index 9edd897eb34..87211d4c224 100644 --- a/heap/hp_write.c +++ b/heap/hp_write.c @@ -155,7 +155,7 @@ static byte *next_free_record_pos(HP_SHARE *info) /* Write a hash-key to the hash-index */ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, - const byte *record, byte *recpos) + const byte *record, byte *recpos) { HP_SHARE *share = info->s; int flag; diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index d585243c6bc..745cde325f9 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -19,7 +19,7 @@ TZ=GMT-3; export TZ # for UNIX_TIMESTAMP tests to work # Program Definitions #-- -PATH=/bin:/usr/bin:/usr/local/bin:/usr/bsd:/usr/X11R6/bin:/usr/openwin/bin:/usr/bin/X11 +PATH=/bin:/usr/bin:/usr/local/bin:/usr/bsd:/usr/X11R6/bin:/usr/openwin/bin:/usr/bin/X11:$PATH MASTER_40_ARGS="--rpl-recovery-rank=1 --init-rpl-role=master" # Standard functions @@ -319,8 +319,8 @@ while test $# -gt 0; do VALGRIND="valgrind --alignment=8 --leak-check=yes" EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc" EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc" - SLEEP_TIME_AFTER_RESTART=120 - SLEEP_TIME_FOR_DELETE=120 + SLEEP_TIME_AFTER_RESTART=60 + SLEEP_TIME_FOR_DELETE=60 ;; --valgrind-options=*) TMP=`$ECHO "$1" | $SED -e "s;--valgrind-options=;;"` diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 63329cd3823..fe7523a5fc5 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -41,7 +41,7 @@ Item_sum::Item_sum(List<Item> &list) list.empty(); // Fields are used } -inline void Item_sum::mark_as_sum_func() +void Item_sum::mark_as_sum_func() { current_thd->lex.current_select->with_sum_func= with_sum_func= 1; } diff --git a/sql/item_sum.h b/sql/item_sum.h index 56b36b615f4..23b8482d41a 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -34,7 +34,7 @@ public: uint arg_count; bool quick_group; /* If incremental update of fields */ - inline void mark_as_sum_func(); + void mark_as_sum_func(); Item_sum() : arg_count(0),quick_group(1) { mark_as_sum_func(); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 9bca7245cba..57cd0e7a13d 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -142,8 +142,6 @@ THD::THD():user_time(0), fatal_error(0), bzero((char*) &con_root,sizeof(con_root)); bzero((char*) &warn_root,sizeof(warn_root)); init_alloc_root(&warn_root, 1024, 0); - bzero((char*) warn_count, sizeof(warn_count)); - warn_list.empty(); user_connect=(USER_CONN *)0; hash_init(&user_vars, system_charset_info, USER_VARS_HASH_SIZE, 0, 0, (hash_get_key) get_var_key, @@ -187,17 +185,20 @@ THD::THD():user_time(0), fatal_error(0), void THD::init(void) { + pthread_mutex_lock(&LOCK_global_system_variables); + variables= global_system_variables; + pthread_mutex_unlock(&LOCK_global_system_variables); server_status= SERVER_STATUS_AUTOCOMMIT; - update_lock_default= (variables.low_priority_updates ? - TL_WRITE_LOW_PRIORITY : - TL_WRITE); options= thd_startup_options; sql_mode=(uint) opt_sql_mode; open_options=ha_open_options; - pthread_mutex_lock(&LOCK_global_system_variables); - variables= global_system_variables; - pthread_mutex_unlock(&LOCK_global_system_variables); + update_lock_default= (variables.low_priority_updates ? + TL_WRITE_LOW_PRIORITY : + TL_WRITE); session_tx_isolation= (enum_tx_isolation) variables.tx_isolation; + warn_list.empty(); + bzero((char*) warn_count, sizeof(warn_count)); + total_warn_count= 0; } /* @@ -228,6 +229,7 @@ void THD::cleanup(void) { DBUG_ENTER("THD::cleanup"); ha_rollback(this); + delete_tree(&prepared_statements); if (locked_tables) { lock=locked_tables; locked_tables=0; @@ -289,7 +291,6 @@ THD::~THD() free_root(&con_root,MYF(0)); free_root(&warn_root,MYF(0)); free_root(&transaction.mem_root,MYF(0)); - delete_tree(&prepared_statements); mysys_var=0; // Safety (shouldn't be needed) pthread_mutex_destroy(&LOCK_delete); #ifndef DBUG_OFF diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index d765c741932..54f28668644 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -458,7 +458,7 @@ int yylex(void *arg, void *yythd) LINT_INIT(c); for (;;) { - switch(state) { + switch (state) { case STATE_OPERATOR_OR_IDENT: // Next is operator or keyword case STATE_START: // Start of token // Skip startspace @@ -900,7 +900,8 @@ int yylex(void *arg, void *yythd) return((int) '@'); case STATE_HOSTNAME: // end '@' of user@hostname for (c=yyGet() ; - my_isalnum(system_charset_info,c) || c == '.' || c == '_' || c == '$'; + my_isalnum(system_charset_info,c) || c == '.' || c == '_' || + c == '$'; c= yyGet()) ; yylval->lex_str=get_token(lex,yyLength()); return(LEX_HOSTNAME); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index c1f7e8272bc..50820b931b6 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -4115,6 +4115,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, keyinfo->usable_key_parts=keyinfo->key_parts= param->group_parts; keyinfo->key_length=0; keyinfo->rec_per_key=0; + keyinfo->algorithm= HA_KEY_ALG_UNDEF; for (; group ; group=group->next,key_part_info++) { Field *field=(*group->item)->tmp_table_field(); @@ -4191,6 +4192,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, keyinfo->flags=HA_NOSAME | HA_NULL_ARE_EQUAL; keyinfo->key_length=(uint16) reclength; keyinfo->name=(char*) "tmp"; + keyinfo->algorithm= HA_KEY_ALG_UNDEF; if (null_pack_length) { key_part_info->null_bit=0; |