Navigation Menu

Skip to content

Commit

Permalink
Add error for mrn_snippet_prepare.
Browse files Browse the repository at this point in the history
  • Loading branch information
shibakentoku committed Nov 19, 2013
1 parent ebc66d9 commit b079e49
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions udf/mrn_udf_snippet.cpp
Expand Up @@ -70,6 +70,14 @@ static my_bool mrn_snippet_prepare(st_mrn_snip_info *snip_info, UDF_ARGS *args,
}
}
if (mrn::encoding::set(ctx, cs)) {
if (args->arg_type[3] == STRING_RESULT) {
snprintf(message, MYSQL_ERRMSG_SIZE,
"Charset: <%s> is not supported", args->args[3]);
} else {
uint charset_id = static_cast<uint>(*((long long *) args->args[3]));
snprintf(message, MYSQL_ERRMSG_SIZE,
"Charset ID: <%u> is not supported", charset_id);
}
goto error;
}

Expand Down

0 comments on commit b079e49

Please sign in to comment.