Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: yappo/mysql-address_normalize
base: d2ee9039ab
...
head fork: yappo/mysql-address_normalize
compare: 927cb2b5a0
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 4 additions and 2 deletions.
  1. +4 −2 mysql_address_normalize.cc
View
6 mysql_address_normalize.cc
@@ -154,7 +154,8 @@ char* address_normalize(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned
{
CTX *ctx;
CURLcode status;
- char *escaped_addres, *uri, *normalized_address;
+ char *escaped_addres, *uri;
+ const char *normalized_address;
size_t escaped_addres_length, normalized_address_length;
long long is_strict_mode;
int ret;
@@ -220,7 +221,7 @@ char* address_normalize(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned
goto error;
string address = result["address"].to_str();
- normalized_address = &(address)[0];
+ normalized_address = address.c_str();
normalized_address_length = address.size();
} else {
goto error;
@@ -234,6 +235,7 @@ char* address_normalize(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned
goto error;
memcpy(ctx->data, normalized_address, normalized_address_length);
+ ctx->data[normalized_address_length] = '\0';
*length = normalized_address_length;
return ctx->data;

No commit comments for this range

Something went wrong with that request. Please try again.