summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-04-13 09:53:50 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-04-13 09:53:50 +0200
commitf2f64ed486a931aeccb376a3eac28a4e00e44b4b (patch)
tree1d31fada7cf3ec1cf7ebc05a1fb2579712a7a77e
parent7215742c41afbde95eaecac2f98849d1a7a513ad (diff)
downloadmanaserv-f2f64ed486a931aeccb376a3eac28a4e00e44b4b.tar.gz
manaserv-f2f64ed486a931aeccb376a3eac28a4e00e44b4b.tar.xz
manaserv-f2f64ed486a931aeccb376a3eac28a4e00e44b4b.zip
Actually use transactions for mysql updates
BEGIN; END; does not work similar to sqlite here.
-rw-r--r--src/sql/mysql/updates/update_19_to_20.sql4
-rw-r--r--src/sql/mysql/updates/update_20_to_21.sql4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/sql/mysql/updates/update_19_to_20.sql b/src/sql/mysql/updates/update_19_to_20.sql
index affdc99..dfc3887 100644
--- a/src/sql/mysql/updates/update_19_to_20.sql
+++ b/src/sql/mysql/updates/update_19_to_20.sql
@@ -1,4 +1,4 @@
-BEGIN;
+START TRANSACTION;
-- Set existing world variables to the world map (0)
UPDATE mana_world_states SET map_id = 0 WHERE map_id IS NULL;
@@ -22,4 +22,4 @@ UPDATE mana_world_states
moddate = UNIX_TIMESTAMP()
WHERE state_name = 'database_version';
-END;
+COMMIT;
diff --git a/src/sql/mysql/updates/update_20_to_21.sql b/src/sql/mysql/updates/update_20_to_21.sql
index d66f220..0bf9b34 100644
--- a/src/sql/mysql/updates/update_20_to_21.sql
+++ b/src/sql/mysql/updates/update_20_to_21.sql
@@ -1,4 +1,4 @@
-BEGIN;
+START TRANSACTION;
ALTER TABLE mana_char_specials ADD COLUMN special_current_mana int(10) unsigned NOT NULL;
@@ -8,4 +8,4 @@ UPDATE mana_world_states
moddate = UNIX_TIMESTAMP()
WHERE state_name = 'database_version';
-END;
+COMMIT;