porting fix to mysql_prm