mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Fix 'metaphon' function to correctly calculate the length of the returned string
sql/udf_example.cc: Calculate length of returned string correctly
This commit is contained in:
parent
e1da710d5b
commit
7c8acd5931
1 changed files with 1 additions and 1 deletions
|
@ -497,7 +497,7 @@ char *metaphon(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||
}
|
||||
}
|
||||
}
|
||||
*length= (ulong) (result - org_result);
|
||||
*length= (ulong) (max(0, result - org_result - 1));
|
||||
return org_result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue