Jesse wrote:
Are you sure this is the right line - I mean the whole statement?

You are right, I did not include the whole statement. Here's the entire section:

/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;
DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;; /*!50003 CREATE TRIGGER `AlumniAddDate` BEFORE INSERT ON `alumni` FOR EACH ROW SET NEW.AddDate=Now() */;;

DELIMITER ;
/*!50003 SET SESSION [EMAIL PROTECTED] */;

SELECT VERSION(); on my server returns 5.0.15-nt. This appears to be sufficient to execute the statement.

...perhaps as some comments suggest try to remove single apostrophes /which sometimes puzzle parser/ and see if it works. What puzzles me personally is double ;; at the end?!

As you can probably see from the rest of the statement that I've included above, ";;" ends the current line becuase the delimiter was changed before hand.

Any ideas why this won't execute? I could go through the entire backup file and remove the comments, but this would take quite a while, and I'd rather it execute properly to begin with, but not sure why it's not executing now.

Thanks,
Jesse

Strange it ran just fine here on my 5.0.22-nt with sample MyISAM table `alumni`... Is your table `alumni` MyISAM or Innodb?

Here are few more pointers:
1. If it is possible *always* try latest version first when solving problems. In your case 5.0.22 I think...

2. Yes 5.0.15-nt should run commented code just fine - I still think problem is in that multiline comment... can you try running it from console (or to edit file with text editor if its only at line 29765) and see what happens? - just try to remove backticks first. I read somewhere on the forums for problems with some spec. characters `'..etc. in comments in earlier versions.

3. For single line CREATE TRIGGER changing DELIMITER wasn't needed actually... but if mandatory I would personally write it like this:

DELIMITER //;

DROP TRIGGER `AlumniAddDate`//

create trigger `AlumniAddDate` BEFORE INSERT on `alumni`
for each row SET NEW.AddDate=Now();
//

DELIMITER ;//

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to