Commit 0944e919 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

closes #1642, addresses #1569

remove unused .h file reference in ha_tokudb.cc
remove unused variables in free_share

git-svn-id: file:///svn/mysql/tokudb-engine/src@10949 c7de825b-a66e-492c-adef-691d508d4ae1
parent c0b8d742
...@@ -42,7 +42,6 @@ static inline void thd_data_set(THD *thd, int slot, void *data) { ...@@ -42,7 +42,6 @@ static inline void thd_data_set(THD *thd, int slot, void *data) {
#include "hatoku_defines.h" #include "hatoku_defines.h"
#include "ha_tokudb.h" #include "ha_tokudb.h"
#include "hatoku_hton.h" #include "hatoku_hton.h"
#include "hatoku_cmptrace.h"
#include <mysql/plugin.h> #include <mysql/plugin.h>
...@@ -96,7 +95,7 @@ static TOKUDB_SHARE *get_share(const char *table_name, TABLE * table) { ...@@ -96,7 +95,7 @@ static TOKUDB_SHARE *get_share(const char *table_name, TABLE * table) {
return NULL; return NULL;
} }
static int free_share(TOKUDB_SHARE * share, TABLE * table, uint hidden_primary_key, bool mutex_is_locked) { static int free_share(TOKUDB_SHARE * share, bool mutex_is_locked) {
int error, result = 0; int error, result = 0;
pthread_mutex_lock(&tokudb_mutex); pthread_mutex_lock(&tokudb_mutex);
...@@ -630,7 +629,7 @@ int ha_tokudb::open(const char *name, int mode, uint test_if_locked) { ...@@ -630,7 +629,7 @@ int ha_tokudb::open(const char *name, int mode, uint test_if_locked) {
); );
if (!primary_key_offsets) { if (!primary_key_offsets) {
free_share(share, table, hidden_primary_key, 1); free_share(share, 1);
my_free((char *) rec_buff, MYF(0)); my_free((char *) rec_buff, MYF(0));
rec_buff = NULL; rec_buff = NULL;
my_free(alloc_ptr, MYF(0)); my_free(alloc_ptr, MYF(0));
...@@ -663,7 +662,7 @@ int ha_tokudb::open(const char *name, int mode, uint test_if_locked) { ...@@ -663,7 +662,7 @@ int ha_tokudb::open(const char *name, int mode, uint test_if_locked) {
DBUG_PRINT("info", ("share->use_count %u", share->use_count)); DBUG_PRINT("info", ("share->use_count %u", share->use_count));
if ((error = db_create(&share->file, db_env, 0))) { if ((error = db_create(&share->file, db_env, 0))) {
free_share(share, table, hidden_primary_key, 1); free_share(share, 1);
my_free((char *) rec_buff, MYF(0)); my_free((char *) rec_buff, MYF(0));
rec_buff = NULL; rec_buff = NULL;
my_free(alloc_ptr, MYF(0)); my_free(alloc_ptr, MYF(0));
...@@ -692,7 +691,7 @@ int ha_tokudb::open(const char *name, int mode, uint test_if_locked) { ...@@ -692,7 +691,7 @@ int ha_tokudb::open(const char *name, int mode, uint test_if_locked) {
sprintf(error_msg, "File %s is dirty, not opening DB", name_buff); sprintf(error_msg, "File %s is dirty, not opening DB", name_buff);
sql_print_error(error_msg); sql_print_error(error_msg);
} }
free_share(share, table, hidden_primary_key, 1); free_share(share, 1);
my_free((char *) rec_buff, MYF(0)); my_free((char *) rec_buff, MYF(0));
rec_buff = NULL; rec_buff = NULL;
my_free(alloc_ptr, MYF(0)); my_free(alloc_ptr, MYF(0));
...@@ -966,7 +965,7 @@ int ha_tokudb::__close(int mutex_is_locked) { ...@@ -966,7 +965,7 @@ int ha_tokudb::__close(int mutex_is_locked) {
alloc_ptr = NULL; alloc_ptr = NULL;
primary_key_offsets = NULL; primary_key_offsets = NULL;
ha_tokudb::reset(); // current_row buffer ha_tokudb::reset(); // current_row buffer
TOKUDB_DBUG_RETURN(free_share(share, table, hidden_primary_key, mutex_is_locked)); TOKUDB_DBUG_RETURN(free_share(share, mutex_is_locked));
} }
// //
......
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