1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

fix embedded to compile with -DHAVE_EMBEDDED_PRIVILEGE_CONTROL

This commit is contained in:
Sergei Golubchik
2013-10-04 13:34:25 +02:00
parent 0b6c4bb34f
commit c96b82f652

View File

@ -771,15 +771,15 @@ int check_embedded_connection(MYSQL *mysql, const char *db)
if (acl_authenticate(thd, 0, end - buf)) if (acl_authenticate(thd, 0, end - buf))
{ {
x_free(thd->security_ctx->user); my_free(thd->security_ctx->user);
goto err; goto err;
} }
return 0; return 0;
err: err:
strmake_buf(net->last_error, thd->main_da.message()); strmake_buf(net->last_error, thd->get_stmt_da()->message());
memcpy(net->sqlstate, memcpy(net->sqlstate,
mysql_errno_to_sqlstate(thd->main_da.sql_errno()), mysql_errno_to_sqlstate(thd->get_stmt_da()->sql_errno()),
sizeof(net->sqlstate)-1); sizeof(net->sqlstate)-1);
return 1; return 1;
} }