From 81fe5482a180f717d961806a77437914fc48f945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Mon, 14 Jan 2019 23:11:50 +0100 Subject: [PATCH] Fix DB import issues (#1283) - Closes #1278 - Closes #1281 --- .travis.yml | 1 - apps/db_assembler/includes/functions.sh | 5 ++++- data/sql/updates/db_world/2019_01_14_00.sql | 4 ++-- docker/database/generate-databases.sh | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 582817e85..f2bbd4f24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,6 @@ install: - echo "DB_WORLD_CONF=\"MYSQL_USER='root'; MYSQL_PASS=''; MYSQL_HOST='127.0.0.1';\"" >> conf/config.sh # create and import mysql - mysql -e "SET GLOBAL sql_mode = '';" # this is necessary because of mysql 5.7 - - mysql -e "SET GLOBAL max_allowed_packet=128*1024*1024;" - bash ./acore.sh "db-assembler" "import-all" script: diff --git a/apps/db_assembler/includes/functions.sh b/apps/db_assembler/includes/functions.sh index 29c413b38..420cd41b2 100644 --- a/apps/db_assembler/includes/functions.sh +++ b/apps/db_assembler/includes/functions.sh @@ -298,7 +298,10 @@ function dbasm_db_import() { fi export MYSQL_PWD=$MYSQL_PASS - + + # TODO: remove this line after we squash our DB updates + "$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" -e "SET GLOBAL max_allowed_packet=128*1024*1024;" + "$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" --default-character-set=utf8 "$dbname" < "${OUTPUT_FOLDER}${database}_${type}.sql" if [[ $? -ne 0 ]]; then err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" "$dbname" 2>&1 ) diff --git a/data/sql/updates/db_world/2019_01_14_00.sql b/data/sql/updates/db_world/2019_01_14_00.sql index 1fe8a8506..141bd08ce 100644 --- a/data/sql/updates/db_world/2019_01_14_00.sql +++ b/data/sql/updates/db_world/2019_01_14_00.sql @@ -41,8 +41,8 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type (@ENTRY,9,10,0,0,0,100,0,15000,15000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,3.31613,"Overlord Runthak - On Script - Set Orientation 3,31613"), (@ENTRY,9,11,0,0,0,100,0,1000,1000,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Overlord Runthak - On Script - Add Npc Flag Questgiver"); -DELETE FROM `creature_text` WHERE `entry` IN (14392); -INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +DELETE FROM `creature_text` WHERE `CreatureID` IN (14392); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `Comment`, `BroadcastTextId`) VALUES (14392, 0, 0, 'NEFARIAN IS SLAIN! people of Orgrimmar, bow down before the might of $N and his allies for they have laid a blow against the Black Dragonflight that is sure to stir the Aspects from their malaise! This defeat shall surely be felt by the father of the Black Flight: Deathwing reels in pain and anguish this day!', 14, 0, 100, 0, 0, 0, 'Overlord Runthak', 9867), (14392, 1, 0, 'Be lifted by $N accomplishment! Revel in his rallying cry!', 14, 0, 100, 0, 0, 0, 'Overlord Runthak', 9868); diff --git a/docker/database/generate-databases.sh b/docker/database/generate-databases.sh index 0cd33fdd3..75b6852e8 100644 --- a/docker/database/generate-databases.sh +++ b/docker/database/generate-databases.sh @@ -1,6 +1,8 @@ # TODO: remove this line after we fully support mysql 5.7 mysql -u root -p$MYSQL_ROOT_PASSWORD -e "SET GLOBAL sql_mode = '';" +# TODO: remove this line after we squash our DB updates +mysql -u root -p$MYSQL_ROOT_PASSWORD -e "SET GLOBAL max_allowed_packet=128*1024*1024;" echo "Creating DBs..." mysql -u root -p$MYSQL_ROOT_PASSWORD -e "CREATE DATABASE acore_auth"