Я использую следующий sql:
DELIMITER $$
DROP PROCEDURE IF EXISTS `get_auto_increment_settings`$$
CREATE PROCEDURE `get_auto_increment_settings`()
BEGIN
select @@global.auto_increment_offset as 'offset', @@global.auto_increment_increment as 'increment' ;
END $$
DELIMITER ;
Я сохранил это в db_auto_increment_settings_procedure.sql, и когда я пытаюсь выполнить это из ant, я сталкиваюсь со следующей ошибкой:
[sql] Executing resource: /mysql/install/db_auto_increment_settings_procedure.sql
[sql] Failed to execute: DELIMITER
[sql] com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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' at line 1
[sql] Failed to execute: DELIMITER ;
[sql] com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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' at line 1