Skip to content

Commit 6fa984f

Browse files
authored
Merge pull request mariadb-corporation#1344 from benthompson15/MCOL-4181-dev
MCOL-4181: Possible setting of ci->stats.fUser to NULL causing crash.
2 parents dc1852a + 219f67d commit 6fa984f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dbcon/mysql/ha_mcs_impl.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5041,7 +5041,14 @@ int ha_cs_impl_pushdown_init(mcs_handler_info* handler_info, TABLE* table)
50415041
{
50425042
ci->stats.reset(); // reset query stats
50435043
ci->stats.setStartTime();
5044-
ci->stats.fUser = thd->main_security_ctx.user;
5044+
if (thd->main_security_ctx.user)
5045+
{
5046+
ci->stats.fUser = thd->main_security_ctx.user;
5047+
}
5048+
else
5049+
{
5050+
ci->stats.fUser = "";
5051+
}
50455052

50465053
if (thd->main_security_ctx.host)
50475054
ci->stats.fHost = thd->main_security_ctx.host;

0 commit comments

Comments
 (0)