summaryrefslogtreecommitdiff
path: root/storage/spider
diff options
context:
space:
mode:
authorKentoku SHIBA <kentokushiba@gmail.com>2013-08-24 14:35:45 +0900
committerKentoku SHIBA <kentokushiba@gmail.com>2013-08-24 14:35:45 +0900
commite1fc2f4d280584d67e2b04967e55d9b685bb0dba (patch)
tree88d2bf495cb7491ec797d12b17b7bed1783ff85f /storage/spider
parent04471ba7b07749208f1ece8e686a32d98d8f9354 (diff)
downloadmariadb-git-e1fc2f4d280584d67e2b04967e55d9b685bb0dba.tar.gz
Fix valgrind warnings.
Diffstat (limited to 'storage/spider')
-rw-r--r--storage/spider/ha_spider.cc3
-rw-r--r--storage/spider/spd_sys_table.cc18
2 files changed, 19 insertions, 2 deletions
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc
index 6d7b62f520a..8c0a9d16d8e 100644
--- a/storage/spider/ha_spider.cc
+++ b/storage/spider/ha_spider.cc
@@ -67,6 +67,7 @@ ha_spider::ha_spider(
conns = NULL;
need_mons = NULL;
condition = NULL;
+ cond_check = FALSE;
blob_buff = NULL;
conn_keys = NULL;
spider_thread_id = 0;
@@ -159,6 +160,7 @@ ha_spider::ha_spider(
conns = NULL;
need_mons = NULL;
condition = NULL;
+ cond_check = FALSE;
blob_buff = NULL;
conn_keys = NULL;
spider_thread_id = 0;
@@ -1676,6 +1678,7 @@ int ha_spider::reset()
spider_free(spider_current_trx, condition, MYF(0));
condition = tmp_cond;
}
+ cond_check = FALSE;
#ifdef HA_MRR_USE_DEFAULT_IMPL
if (multi_range_keys)
{
diff --git a/storage/spider/spd_sys_table.cc b/storage/spider/spd_sys_table.cc
index 3e300bd21c9..0ece056180a 100644
--- a/storage/spider/spd_sys_table.cc
+++ b/storage/spider/spd_sys_table.cc
@@ -371,15 +371,29 @@ int spider_get_sys_table_by_idx(
const int col_count
) {
int error_num;
+ uint key_length;
+ KEY *key_info = table->key_info;
DBUG_ENTER("spider_get_sys_table_by_idx");
if ((error_num = spider_sys_index_init(table, idx, FALSE)))
DBUG_RETURN(error_num);
+ if ((int) key_info->key_parts == col_count)
+ {
+ key_length = key_info->key_length;
+ } else {
+ int roop_count;
+ key_length = 0;
+ for (roop_count = 0; roop_count < col_count; ++roop_count)
+ {
+ key_length += key_info->key_part[roop_count].store_length;
+ }
+ }
+
key_copy(
(uchar *) table_key,
table->record[0],
- table->key_info,
- table->key_info->key_length);
+ key_info,
+ key_length);
if (
/*