else {
char *normalized_name = NULL;
int lang = CTSVC_LANG_OTHERS;
- bool add_brace = false;
char *hiragana = NULL;
char *search_hiragana = NULL;
bool need_union = false;
if (need_union) {
temp_len = SAFE_SNPRINTF(query, query_size, len, " UNION SELECT contact_id FROM (");
if (0 <= temp_len) len += temp_len;
- add_brace = true;
}
temp_len = SAFE_SNPRINTF(query, query_size, len, " SELECT contact_id FROM ");
if (0 <= temp_len) len += temp_len;
CONTACTS_SEARCH_RANGE_DATA, NULL, NULL, temp_str);
if (0 <= temp_len) len = temp_len;
}
- if (add_brace) {
+ if (need_union) {
temp_len = SAFE_SNPRINTF(query, query_size, len, ") ");
if (0 <= temp_len) len += temp_len;
- add_brace = false;
}
need_union = true;
}
if (need_union) {
temp_len = SAFE_SNPRINTF(query, query_size, len, " UNION SELECT contact_id FROM (");
if (0 <= temp_len) len += temp_len;
- add_brace = true;
}
if (CTSVC_LANG_KOREAN == lang) { /* chosung search */
temp_len = SAFE_SNPRINTF(query, query_size, len, "%%' ESCAPE '\\' "); /* CTSVC_DB_ESCAPE_CHAR */
if (0 <= temp_len) len += temp_len;
- if (add_brace) {
+ if (need_union) {
temp_len = SAFE_SNPRINTF(query, query_size, len, ") ");
if (0 <= temp_len) len += temp_len;
- add_brace = false;
}
}