Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
56b mysql
Author Message
nori4
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Sep 2017
Reputation: 0



Post: #1
56b mysql
Hello Guys,

I got issue with MySQL and cant understand what is going on wrong.
May be someone can help me with that?

sphereserver and mysql is located on different pc.
sometimes connection is lost and i dont understand why.
i tried two ways
keep connection all on the time and another way close every time after session
but not happen and again come to the begging with

ERROR:MySQL server link has been lost. Trying to reattach to it

version is Sphere Version 0.56b [WIN32] by http://www.sphereserver.com, compiled at Sep 20 2009 (20:00:04)

may be someone have issue with that?

thanks guys
09-13-2017 08:39 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: 56b mysql
09-13-2017 08:56 PM
Find all posts by this user Like Post Quote this message in a reply
nori4
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Sep 2017
Reputation: 0



Post: #3
RE: 56b mysql
thanks i will try another way with additional check may be it will helps
thank you one more
09-15-2017 04:35 AM
Find all posts by this user Like Post Quote this message in a reply
nori4
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Sep 2017
Reputation: 0



Post: #4
RE: 56b mysql
when i use db.connect

12:45:(added_funcions.scp,2444)'INFORM' db for Record
12:47:CRITICAL:(added_funcions.scp,2445)'Main' thread hang, restarting...

[function mysql_open_connection]
IF !(<DB.CONNECTED>)
serv.log 'INFORM' db for Record
DB.CONNECT --- 2445 line
ENDIF

whats wrong?

Sphere Version 0.56b [WIN32] by http://www.sphereserver.com, compiled at Sep 20 2009 (20:00:04)

libmysql.dll have last update from sphereserver and also have used old one size 4.5mb and 1.1mb

i have 7 update for one time when player login may be it for that?
(This post was last modified: 09-20-2017 08:00 PM by nori4.)
09-20-2017 07:50 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: 56b mysql
'Main' thread hang, restarting...

This error often happens when Sphere enters in an "infinite" loop
09-20-2017 07:58 PM
Find all posts by this user Like Post Quote this message in a reply
nori4
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Sep 2017
Reputation: 0



Post: #6
RE: 56b mysql
now i have split on two cycle for update base i hope may be it will helps.

so, if i understand clear that may happen for 7 update in one time?
09-20-2017 08:05 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #7
RE: 56b mysql
Can you post the update script?
09-20-2017 08:10 PM
Find all posts by this user Like Post Quote this message in a reply
nori4
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Sep 2017
Reputation: 0



Post: #8
RE: 56b mysql
i see that i have missed one dbghelp.dll that dll important or not and for what needed?

yeah of course
Code:
[FUNCTION mysql_classes]
if (<tag0.points> < 10000)
return 1
endif

IF !(<DB.CONNECTED>)
serv.log 'WARNING' DB connection is lost and function is stopped. waiting re-connect.
return 1
ENDIF

DB.QUERY "SELECT `uid` FROM `classes` WHERE `uid`='<UID>'"
IF (<DB.ROW.NUMROWS> > 0)
    DB.EXECUTE "UPDATE classes SET name='<DB.escapedata <skillclass.name>>' WHERE uid='<UID>'"
ELSE
    DB.EXECUTE "INSERT INTO `classes` (`name`,`uid`) VALUES ('<DB.escapedata <skillclass.name>>', '<UID>')"
ENDIF

[FUNCTION mysql_dueling]
if !(<dtag0.dueling_w>)
return 1
endif

IF !(<DB.CONNECTED>)
serv.log 'WARNING' DB connection is lost and function is stopped. waiting re-connect.
return 1
ENDIF
DB.QUERY "SELECT `uid` FROM `dueling` WHERE `uid`='<UID>'"
IF (<DB.ROW.NUMROWS> > 0)
    DB.EXECUTE "UPDATE dueling SET name='<DB.escapedata <name>>', deaths='<dtag0.dueling_d>', win='<dtag0.dueling_w>' WHERE uid='<UID>'"
ELSE
    DB.EXECUTE "INSERT INTO `dueling` (`name`,`uid`, `deaths`, `win`) VALUES ('<DB.escapedata <name>>', '<UID>', '<dtag0.dueling_d>', '<dtag0.dueling_w>')"
ENDIF

and i got like this 7 update
(This post was last modified: 09-20-2017 08:13 PM by nori4.)
09-20-2017 08:12 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #9
RE: 56b mysql
So in the insert no errors?
09-21-2017 01:53 AM
Find all posts by this user Like Post Quote this message in a reply
nori4
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Sep 2017
Reputation: 0



Post: #10
RE: 56b mysql
nope
works fine
i have mysql on different host and sphere also
may be problems is for thaT?
09-21-2017 04:05 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)