diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index d2052d1485b..eb8798449fd 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -114,6 +114,8 @@ static int mysql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, pdo_mysql_stmt *S = ecalloc(1, sizeof(pdo_mysql_stmt)); S->H = H; + S->result = NULL; + stmt->driver_data = S; stmt->methods = &mysql_stmt_methods; stmt->supports_placeholders = PDO_PLACEHOLDER_NONE;