diff --git a/mx_mysql.c b/mx_mysql.c
index 2f80cd38..b537c16b 100644
--- a/mx_mysql.c
+++ b/mx_mysql.c
@@ -962,6 +962,7 @@ static int mx_mysql_statement_init(struct mx_mysql *mysql, struct mx_mysql_stmt
     s = mx_calloc_forever(1, sizeof(*s));
 
     s->mysql       = mysql;
+    s->func = "";
 
     do {
         res = mx__mysql_stmt_init(s);