Navigation Menu

Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhys committed Nov 19, 2018
1 parent c973452 commit 8f327ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 1 addition & 5 deletions ha_mroonga.cpp
Expand Up @@ -4153,11 +4153,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table,
"reference column [%s.%s.%s] is not used for primary key",
table->s->db.str,
normalized_ref_table_name,
#ifdef MRN_KEY_PART_SPEC_FIELD_NAME_USE_ACCESSSOR_FUNCTION
ref_field_name);
#else
ref_field_name->str);
#endif
MRN_KEY_PART_SPEC_FIELD_NAME_CSTR(ref_field_name));
my_message(error, err_msg, MYF(0));
DBUG_RETURN(false);
}
Expand Down
4 changes: 4 additions & 0 deletions mrn_mysql_compat.h
Expand Up @@ -171,12 +171,16 @@
(key_part_spec)
# define MRN_FIELD_NAME_EQUAL_KEY_PART_SPEC_FIELD_NAME(field, name) \
(strcmp((field)->field_name, name) == 0)
# define MRN_KEY_PART_SPEC_FIELD_NAME_CSTR(key_part_spec) \
(key_part_spec)
#else
# define MRN_KEY_PART_SPEC_FIELD_NAME(key_part_spec) \
&(key_part_spec)->field_name
# define MRN_KEY_PART_SPEC_FIELD_NAME_FORMAT "%.*s"
# define MRN_KEY_PART_SPEC_FIELD_NAME_VALUE(key_part_spec) \
static_cast<int>((key_part_spec)->length), (key_part_spec)->str
# define MRN_KEY_PART_SPEC_FIELD_NAME_CSTR(key_part_spec) \
(key_part_spec)->str)
# ifdef MRN_FIELD_FIELD_NAME_IS_LEX_STRING
# define MRN_FIELD_NAME_EQUAL_KEY_PART_SPEC_FIELD_NAME(field, string) \
FIELD_NAME_EQUAL_STRING(field, string)
Expand Down

0 comments on commit 8f327ea

Please sign in to comment.