Problems with MySQL conditional statements


I've been tearing my hair out trying to work out why a MySQL dump won't import to my web host using phpMyAdmin. Error was:


SQL query:

-- Host: localhost Database: mydb
-- ------------------------------------------------------
-- Server version 4.1.12a-nt

MySQL said: Documentation
#1065 - Query was empty

I didn't really understand what these statements meant, but now I know that they refer to "conditional" SQL statement, only to be executed if the MySQL database version is equal or greater to that specified. In this case, /*40101 refers to version 4.1.1.

According to phpMyAdmin on my web host, the server is running MySQL version 4.1.14-log. This means the conditional statement should be executed correctly, and in fact, if I remove the delimiters on all similar statements to be just:


everything works fine. It appears that using an appendix like '-log' on the version number is the cause of the failure of these conditional statements.