From f2f64ed486a931aeccb376a3eac28a4e00e44b4b Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Sat, 13 Apr 2013 09:53:50 +0200 Subject: Actually use transactions for mysql updates BEGIN; END; does not work similar to sqlite here. --- src/sql/mysql/updates/update_19_to_20.sql | 4 ++-- src/sql/mysql/updates/update_20_to_21.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/sql') diff --git a/src/sql/mysql/updates/update_19_to_20.sql b/src/sql/mysql/updates/update_19_to_20.sql index affdc99c..dfc38878 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 d66f2208..0bf9b347 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; -- cgit v1.2.3-70-g09d2