That's correct. Since it doesn't have a particular branch to go down, that is executed all the time and then it determines which branch to go down (guess or restart).
You can likely group both the restart and okay buttons together though, the functionality sounds like it'd be the same.
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php