Permalink
Browse files

MRN_MAX_PATH_SIZE -> MRN_MAX_KEY_SIZE

Because index name is used as key in groonga database not path
  • Loading branch information...
1 parent 75dc541 commit f1d34cd5cfc2b92cfa410076edfcd42acf8ffe06 @kou kou committed Apr 10, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/mrn_index_table_name.cpp
  2. +1 −1 lib/mrn_index_table_name.hpp
@@ -27,11 +27,11 @@ namespace mrn {
const char *mysql_index_name)
: table_name_(table_name),
mysql_index_name_(mysql_index_name) {
- char encoded_mysql_index_name[MRN_MAX_PATH_SIZE];
+ char encoded_mysql_index_name[MRN_MAX_KEY_SIZE];
encode(encoded_mysql_index_name,
- encoded_mysql_index_name + MRN_MAX_PATH_SIZE,
+ encoded_mysql_index_name + MRN_MAX_KEY_SIZE,
mysql_index_name_, mysql_index_name_ + strlen(mysql_index_name_));
- snprintf(name_, MRN_MAX_PATH_SIZE,
+ snprintf(name_, MRN_MAX_KEY_SIZE,
"%s-%s", table_name_, encoded_mysql_index_name);
length_ = strlen(name_);
}
@@ -32,7 +32,7 @@ namespace mrn {
private:
const char *table_name_;
const char *mysql_index_name_;
- char name_[MRN_MAX_PATH_SIZE];
+ char name_[MRN_MAX_KEY_SIZE];
size_t length_;
uint encode(char *buf_st, char *buf_ed, const char *st, const char *ed);

0 comments on commit f1d34cd

Please sign in to comment.