1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-7222: Cluster Node Crash at CREATE DEFINER statement

Check whether the definer host string is not null before
appending it to the specified buffer.
This commit is contained in:
Nirbhay Choubey
2015-01-02 10:02:04 -05:00
parent 6f4f8c5f8a
commit aee3ac4877
3 changed files with 19 additions and 1 deletions

View File

@ -2191,7 +2191,7 @@ void append_definer(THD *thd, String *buffer, const LEX_STRING *definer_user,
{
buffer->append(STRING_WITH_LEN("DEFINER="));
append_identifier(thd, buffer, definer_user->str, definer_user->length);
if (definer_host->str[0])
if (definer_host->str && definer_host->str[0])
{
buffer->append('@');
append_identifier(thd, buffer, definer_host->str, definer_host->length);