From 35ce512af8502658a3204beb4f5eac5a1774dca4 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 30 Jul 2010 17:50:21 +0200 Subject: This should fix mysql syntax errors some people were getting with 9090_characters_item_instance.sql --HG-- branch : trunk --- sql/updates/9090_characters_item_instance.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sql/updates') diff --git a/sql/updates/9090_characters_item_instance.sql b/sql/updates/9090_characters_item_instance.sql index 89301903d2d..db6e3928d72 100644 --- a/sql/updates/9090_characters_item_instance.sql +++ b/sql/updates/9090_characters_item_instance.sql @@ -11,12 +11,18 @@ ALTER TABLE `item_instance` ADD `durability` int(10) unsigned NOT NULL default '0' AFTER `randomPropertyId`, ADD `playedTime` int(10) unsigned NOT NULL default '0' AFTER `durability`; +-- Temporarily change delimiter to prevent SQL syntax errors +DELIMITER || + -- Function to convert ints from unsigned to signed DROP FUNCTION IF EXISTS `uint32toint32`; CREATE FUNCTION `uint32toint32`(input INT(10) UNSIGNED) RETURNS INT(11) SIGNED DETERMINISTIC BEGIN RETURN input; -END; +END|| + +-- Restore original delimiter +DELIMITER ; -- Move data to new fields UPDATE `item_instance` SET -- cgit v1.2.3