Commit d92e0431 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

get create index working again. addresses #345

git-svn-id: file:///svn/mysql/tokudb-engine-test3/src@2139 c7de825b-a66e-492c-adef-691d508d4ae1
parent d7f0a226
...@@ -2567,7 +2567,9 @@ int ha_tokudb::rename_table(const char * from, const char * to) ...@@ -2567,7 +2567,9 @@ int ha_tokudb::rename_table(const char * from, const char * to)
MY_UNPACK_FILENAME|MY_APPEND_EXT), 0); MY_UNPACK_FILENAME|MY_APPEND_EXT), 0);
} }
#else #else
error = rename(from, to); char newfrom[strlen(from) + 32]; sprintf(newfrom, "%s%s", from, ha_tokudb_ext);
char newto[strlen(to) + 32]; sprintf(newto, "%s%s", to, ha_tokudb_ext);
error = rename(newfrom, newto);
if (error != 0) if (error != 0)
error = my_errno = errno; error = my_errno = errno;
#endif #endif
...@@ -2590,6 +2592,7 @@ ha_rows ha_tokudb::records_in_range(uint keynr, key_range *start_key, ...@@ -2590,6 +2592,7 @@ ha_rows ha_tokudb::records_in_range(uint keynr, key_range *start_key,
key_range *end_key) key_range *end_key)
{ {
DBUG_ENTER("ha_tokudb::records_in_range"); DBUG_ENTER("ha_tokudb::records_in_range");
#if 0
DBT key; DBT key;
DB_KEY_RANGE start_range, end_range; DB_KEY_RANGE start_range, end_range;
DB *kfile=key_file[keynr]; DB *kfile=key_file[keynr];
...@@ -2639,6 +2642,9 @@ ha_rows ha_tokudb::records_in_range(uint keynr, key_range *start_key, ...@@ -2639,6 +2642,9 @@ ha_rows ha_tokudb::records_in_range(uint keynr, key_range *start_key,
rows=(end_pos-start_pos)*stats.records; rows=(end_pos-start_pos)*stats.records;
DBUG_PRINT("exit",("rows: %g",rows)); DBUG_PRINT("exit",("rows: %g",rows));
DBUG_RETURN((ha_rows)(rows <= 1.0 ? 1 : rows)); DBUG_RETURN((ha_rows)(rows <= 1.0 ? 1 : rows));
#else
DBUG_RETURN(HA_TOKUDB_RANGE_COUNT);
#endif
} }
...@@ -2769,8 +2775,10 @@ int ha_tokudb::analyze(THD* thd, HA_CHECK_OPT* check_opt) ...@@ -2769,8 +2775,10 @@ int ha_tokudb::analyze(THD* thd, HA_CHECK_OPT* check_opt)
err: err:
if (stat) if (stat)
free(stat); free(stat);
#endif
return HA_ADMIN_FAILED; return HA_ADMIN_FAILED;
#else
return HA_ADMIN_NOT_IMPLEMENTED;
#endif
} }
int ha_tokudb::optimize(THD* thd, HA_CHECK_OPT* check_opt) int ha_tokudb::optimize(THD* thd, HA_CHECK_OPT* check_opt)
......
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