title: Syntax error defining triggers in mysql 5.0.77
body: <pre><code>CREATE TABLE `applications` (
  `id` int(2) NOT NULL,
  `applicationID` varchar(36) character set utf8 collate utf8_unicode_ci NOT NULL,
  `applicationType` enum('M','W') character set utf8 collate utf8_unicode_ci NOT NULL,
  `applicationName` varchar(30) character set utf8 collate utf8_unicode_ci NOT NULL,
  `applicationPath` varchar(100) character set utf8 collate utf8_unicode_ci NOT NULL,
  `isDeleted` tinyint(1) NOT NULL default '0',
  `lastModified` timestamp NOT NULL default CURRENT_TIMESTAMP
  ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>-- 
     -- Dumping data for table <code>applications</code>
     -- </p>
  
  <pre><code> INSERT INTO `applications` (`id`, `applicationID`, `applicationType`, `applicationName`,     `applicationPath`, `isDeleted`, `lastModified`) VALUES (1, 'a49af37e-7f4c-1032-a010-   c067c39cc60b', 'W', 'workshopWorkerWeb',   'http://www.workshopworker.com/workshopWorkerLogin/workshopWorkerLogin.html', 0, '2014-08-27   15:11:46'),
  (2, 'a49af5c2-7f4c-1032-a010-c067c39cc60b', 'W', 'agriMapper', '', 0, '2014-08-27 15:11:46'),
  (3, 'a49af702-7f4c-1032-a010-c067c39cc60b', 'M', 'promacRegistration',  'https://play.google.com/store/apps/details?id=com.ncbaclusapromac.ncbaclusapromac', 0, '2014-08-27 15:11:46'),
  (4, 'a49af838-7f4c-1032-a010-c067c39cc60b', 'M', 'eBAF', 'https://play.google.com/store/apps/details?id=com.ncbaclusapromac.eBAF', 0, '2014-08-27 15:11:46'),
  (5, 'a49af996-7f4c-1032-a010-c067c39cc60b', 'M', 'extensionWorker',  'https://play.google.com/store/apps/details?id=pt.com.extensionWorker', 0, '2014-08-27 15:11:46'),
  (6, 'a49afad6-7f4c-1032-a010-c067c39cc60b', 'W', 'promacAdministration', '  'http://ncbaclusapromac.com/clientLogin.html', 0, '2014-08-27 15:11:46');
  
  DELIMITER $$
  CREATE TRIGGER `applicationsUUID` BEFORE INSERT ON `applications`
  FOR EACH ROW BEGIN
  IF NEW.applicationID = '' THEN
  SET NEW.applicationID = UUID();
  END IF;
  END
  $$
  DELIMITER ;
  </code></pre>
  
  <p>Gives:- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER $$</p>
  
  <p>I know it is problem with the DELIMITER syntax but I can't see where.</p>