aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <none@none>2010-07-30 17:50:21 +0200
committerShauren <none@none>2010-07-30 17:50:21 +0200
commit35ce512af8502658a3204beb4f5eac5a1774dca4 (patch)
tree1d06aa8c0e0c3b38e6f7c7aa0b5cfe9f5f54255e
parentab95e5a6dcf233677057e77017fe90869182c272 (diff)
This should fix mysql syntax errors some people were getting with 9090_characters_item_instance.sql
--HG-- branch : trunk
-rw-r--r--sql/updates/9090_characters_item_instance.sql8
1 files changed, 7 insertions, 1 deletions
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