summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-04-06 17:22:21 +0300
committermonty@mysql.com <>2005-04-06 17:22:21 +0300
commit49e721677f9eec2ae8e869dacc8acb522f72ef05 (patch)
treee94c78c8db8d7f6ca96a83d37f1af529688c9a72 /sql
parent48de1ff27744c996d7f3b63e4b75eeaeb96c9f0c (diff)
downloadmariadb-git-49e721677f9eec2ae8e869dacc8acb522f72ef05.tar.gz
Fixed errors descovered by valgrind 2.4
Added suppression file for some valgrind warnings that are not real errors
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_federated.cc6
-rw-r--r--sql/ha_heap.cc1
-rw-r--r--sql/mysqld.cc3
-rw-r--r--sql/sql_parse.cc3
4 files changed, 8 insertions, 5 deletions
diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc
index 8000aae180d..33acc9cad0b 100644
--- a/sql/ha_federated.cc
+++ b/sql/ha_federated.cc
@@ -548,12 +548,12 @@ error:
static int parse_url(FEDERATED_SHARE *share, TABLE *table,
uint table_create_flag)
{
- DBUG_ENTER("ha_federated::parse_url");
-
- share->port= 0;
uint error_num= (table_create_flag ? ER_CANT_CREATE_TABLE :
ER_CONNECT_TO_MASTER);
+ DBUG_ENTER("ha_federated::parse_url");
+ share->port= 0;
+ share->socket= 0;
share->scheme= my_strdup(table->s->comment, MYF(0));
if ((share->username= strstr(share->scheme, "://")))
diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc
index de51fad4365..0d700f6c9a5 100644
--- a/sql/ha_heap.cc
+++ b/sql/ha_heap.cc
@@ -548,6 +548,7 @@ int ha_heap::create(const char *name, TABLE *table_arg,
hp_create_info.auto_increment= (create_info->auto_increment_value ?
create_info->auto_increment_value - 1 : 0);
hp_create_info.max_table_size=current_thd->variables.max_heap_table_size;
+ hp_create_info.with_auto_increment= found_real_auto_increment;
max_rows = (ha_rows) (hp_create_info.max_table_size / mem_per_row);
error= heap_create(fn_format(buff,name,"","",4+2),
keys, keydef, share->reclength,
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index e1303585114..7611270fc42 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1519,6 +1519,7 @@ void end_thread(THD *thd, bool put_in_cache)
thd=thread_cache.get();
thd->real_id=pthread_self();
(void) thd->store_globals();
+ thd->thr_create_time= time(NULL);
threads.append(thd);
pthread_mutex_unlock(&LOCK_thread_count);
DBUG_VOID_RETURN;
@@ -5180,7 +5181,7 @@ log and this option does nothing anymore.",
(gptr*) &dflt_key_cache_var.param_buff_size,
(gptr*) 0,
0, (GET_ULL | GET_ASK_ADDR),
- REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, UINT_MAX32, MALLOC_OVERHEAD,
+ REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, ~(ulong) 0, MALLOC_OVERHEAD,
IO_SIZE, 0},
{"key_cache_age_threshold", OPT_KEY_CACHE_AGE_THRESHOLD,
"This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache",
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 1d7eba4ce43..9e7cf81de3c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1103,7 +1103,8 @@ pthread_handler_decl(handle_one_connection,arg)
thd->proc_info=0;
thd->set_time();
thd->init_for_queries();
- while (!net->error && net->vio != 0 && !(thd->killed == THD::KILL_CONNECTION))
+ while (!net->error && net->vio != 0 &&
+ !(thd->killed == THD::KILL_CONNECTION))
{
net->no_send_error= 0;
if (do_command(thd))