Сохранил дамп базы в SQL Manager 2005, сейчас использую SQLyog. Немогу поднять дамп, ошибка синтаксиса при вызове процедур:
CREATE PROCEDURE `AddSignal` (IN object_id_full INTEGER, IN target_id_full INTEGER, IN target_x INTEGER, IN target_y INTEGER, IN ap_command INTEGER, IN command INTEGER, IN command_parameters INTEGER, IN attack_type INTEGER, IN fly_mode INTEGER)
NOT DETERMINISTIC
SQL SECURITY DEFINER
COMMENT ''
BEGIN
ADD_SIGNAL:Begin
declare done int default 0;
declare continue handler for sqlstate '02000'
begin
set done=1;
end;
# команды управления (сигналы)
if (ap_command=1) then
insert into signals
(
object_id_full,target_id_full,
target_x,target_y,ap_command,
command,command_parameters,
attack_type,fly_mode
)
values
(
object_id_full,target_id_full,
target_x,target_y,ap_command,
command,command_parameters,
attack_type,fly_mode
)
on duplicate key update
signals.`target_id_full`=target_id_full,
signals.`target_x`=target_x,
signals.`target_y`=target_y,
signals.`command`=command,
signals.`command_parameters`=command_parameters,
signals.`attack_type`=attack_type,
signals.`fly_mode`=fly_mode
;
end if;
if (ap_command=2) then
insert into signals
(
object_id_full,target_id_full,
target_x,target_y,ap_command,
command,command_parameters,
attack_type,fly_mode
)
values
(
object_id_full,target_id_full,
target_x,target_y,ap_command,
command,command_parameters,
attack_type,fly_mode
)
on duplicate key update
signals.`fly_mode`=fly_mode
;
end if;
if (ap_command=3) then
insert into signals
(
object_id_full,target_id_full,
target_x,target_y,ap_command,
command,command_parameters,
attack_type,fly_mode
)
values
(
object_id_full,target_id_full,
target_x,target_y,ap_command,
command,command_parameters,
attack_type,fly_mode
)
on duplicate key update
signals.`target_id_full`=target_id_full,
signals.`target_x`=target_x,
signals.`target_y`=target_y,
signals.`command`=command,
signals.`command_parameters`=command_parameters,
signals.`attack_type`=attack_type,
signals.`fly_mode`=fly_mode
;
end if;
if (ap_command=4) then
insert ignore into signals
(
object_id_full,target_id_full,
target_x,target_y,ap_command,
command,command_parameters,
attack_type,fly_mode
)
values
(
object_id_full,target_id_full,
target_x,target_y,ap_command,
command,command_parameters,
attack_type,fly_mode
)
;
end if;
end ADD_SIGNAL;
END;
Error occured at:2010-03-15 21:12:34
Line no.:2481
Error Code: 1064 - 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 '' at line 7
COMMENT '' - из дампа я убрал(мало ли, может непонимает коммент, хотя должен), но подобная ошибка все равно выходит... Буду благодарен за помощь...
Отредактированно Fenrir (15.03.2010 22:18:01)