Open gpn39f opened 10 years ago
we have now split the database in 3 databases. i think it is not possible to create one query that can take a filter for more and one database. so i try to do it in 2 steps.. i think this is very slow.. someone with a better Idee?
it will be possible with a join, i did something similar in ServerOne.
Any chance of a push of the changes ?
look at my changes in my fork :-) can a join sample data from different databases??? also between accessdatabase.realm and worlddatabase.creature ???
yes, with some cleaver coding ;)
Point me at the lines you need adjusting and I’ll post the required changes
If you are a member of the getmangos forum, please PM me (ID: Antz) with your email / skype details and we can chat more)
From: Frank [mailto:notifications@github.com] Sent: 18 October 2013 20:44 To: mangosvb/serverTwo Cc: Antz Subject: Re: [serverTwo] Database error (#6)
look at my changes in my fork :-) can a join sample data from different databases???
— Reply to this email directly or view it on GitHub https://github.com/mangosvb/serverTwo/issues/6#issuecomment-26624133 . https://github.com/notifications/beacon/oaF1d12tQ5hKyEU6svQ6h4B-6BeCtD4DJkf6_-UzC7Xq0tvS94WwdwrjJFFmFKsP.gif
it's on ws.quest.vb
Public Function GetQuestMenu Public Function GetQuestMenuGO Public Function GetQuestgiverStatus
in this function's there are many of query typ with join "queststarters on worlddatabase" and "characters_quests on characterdatabase"
if i see a example i can try to fix the rest :-)
I'm now on work, i'm back late to day..
please look at https://github.com/mangosvb/serverOne/blob/master/Server/WorldServer/WS.Quests.vb
Lines 537 onwards
Super.. thanks..
I was update my fork, include you’re corrections.
Found some more errors on packet, changed in 335
now we can move on J
Frank
Von: Antz [mailto:notifications@github.com] Gesendet: Montag, 28. Oktober 2013 14:34 An: mangosvb/serverTwo Cc: Frank Betreff: Re: [serverTwo] Database error (#6)
please look at https://github.com/mangosvb/serverOne/blob/master/Server/WorldServer/WS.Quests.vb
Lines 537 onwards
— Reply to this email directly or view it on GitHub https://github.com/mangosvb/serverTwo/issues/6#issuecomment-27211373 . https://github.com/notifications/beacon/CVbCK3wKjFbWhf7M4-goom6E2GWUB9AGZI-nW114_eyEWef-nnVsuF6tXH6qEmWS.gif
frank, can you contact me on the getmangos.co.uk forum using pm ?
on Public Function GetQuestMenu in class WS.Quests.vb
is a query:
[code] WorldDatabase.Query(String.Format("SELECT s.questid, q.Title, q.Level_Normal, q.specialflags FROM queststarters s LEFT JOIN quests q ON (s.questid=q.id) WHERE s.type = {0} AND s.typeid = {1} AND q.Level_Start <= {2} AND (q.Required_Race = 0 OR (Required_Race & {4}) > 0) AND (q.Required_Class = 0 OR (RequiredClass & {5}) > 0) " & "AND NOT EXISTS(SELECT * FROM characters_quests WHERE char_guid = {3} AND quest_status <> -2 AND quest_id = q.id) AND (q.Required_Quest1 = 0 OR EXISTS(SELECT * FROM characters_quests WHERE char_guid = {3} AND quest_status = -1 AND quest_id = q.RequiredQuest1)) " & "AND (q.Required_Quest2 = 0 OR EXISTS(SELECT * FROM characters_quests WHERE char_guid = {3} AND quest_status = -1 AND quest_id = q.Required_Quest2)) AND (q.Required_Quest3 = 0 OR EXISTS(SELECT * FROM characters_quests WHERE char_guid = {3} AND quest_status = -1 AND quest_id = q.RequiredQuest3)) " & "AND (q.Required_Quest4 = 0 OR EXISTS(SELECT * FROM characters_quests WHERE char_guid = {3} AND quest_status = -1 AND quest_id = q.RequiredQuest4));", CType(QuestGiverType.QUEST_OBJECTTYPE_CREATURE, Byte), CType(WORLD_CREATUREs(GUID), CreatureObject).ID, c.Level, c.GUID, 1 << (c.Race - 1), 1 << (c.Classe - 1)), MySQLQuery) [/code]
this query is not only stored on table worlddatabase, but in CharacterDatabase to.
is there are profi, there can split this to a new query over two databases?
later in the class the next function have a similar query over two databases..