I created a database on my computer, with MySQL 5.5 and MySQL Workbench 5.2.34 CE installed. Then i want to migrate the database to another computer, which has MySQL 5.0 installed. (I just need to migrate the schema, data are not needed)
I use the MySQL Workbench's File -> Export -> Forward Engineer SQL CREATE script to generate db.sql script and copy it to the other computer.
I type mysql < db.sql to create the database but only to receive an error.
Error occurs here:
DELIMITER $$
CREATE PROCEDURE `filedb`.`GetIncompleteFileId` (in latestFileId BIGINT UNSIGNED, in serverBits BIT(32), in fileCount SMALLINT UNSIGNED)
BEGIN
SELECT `id`, `key`, `length`, `path`
FROM
(
SELECT * FROM `filedb`.`fileInfo` WHERE `id` <= latestFileId
) AS TempTable
WHERE (serverBits & `serverownership` NOT IN (serverBits, 0))
ORDER BY `id` DESC
LIMIT fileCount;
END
$$
The error is near 'fileCount; END'. If i remove the "LIMIT fileCount", the error disappears.
Anyone tells me what is the problem?