Shero w/ MySQL "error"?
Hello, I'm having a comeback in the superhero debug and is talking about the tables, the problem is that I'm a bit of a layman on these table things, I wanted to know briefly what I have to do for the error to stop returning?
qconsole.log: Quote:
|
Re: Shero w/ MySQL "error"?
I'm not sure where this query is written but switch timestamp(14)
LAST_PLAY_DATE` timestamp(14) NOT NULL to LAST_PLAY_DATE` timestamp NOT NULL |
Re: Shero w/ MySQL "error"?
Quote:
Quote:
|
Re: Shero w/ MySQL "error"?
looks like youre missing the table from your site db. You will need to make the sh_saveskills table. I would guess you missed part of whatever setup was necessary. http://www.mysqltutorial.org/mysql-create-table/ fyi. Look for whatever step runs the create table statement and run it.
|
Re: Shero w/ MySQL "error"?
Quote:
We had this issue recently when we upgraded the host of our database storage facilities to MariaDB over the winter. Database's used to run off of 'types' but now they run off of 'ENGINE' instead. A change that was made by MySQL some years ago, I found out form another project I run back in 2014! (Yeah, that long ago). The mod creates the tables (two of them) but the tables are stored without an ENGINE type specified. So if you rebuild you database, sure it will recreate the tables, but once you disconnect from the database (a restart or upgrade), MySQL / MariaDB reports the tables are missing even though it IS there. The sad part is, the tables are going to have to be dropped, I have not found a way to recover the information stored within the database tables as they are no longer accessible. Sorry, but you cannot just change the ENGINE to a table once it is no longer seen. Here is the fix; Open amxmodx/scripting/includes/superheromysql.inc At the top you will see the following Code:
CREATE TABLE `sh_savexp` ( Scroll down to line #273 Code:
copy(sql, charsmax(sql), "CREATE TABLE IF NOT EXISTS `sh_savexp` ( `SH_KEY` varchar(32) binary NOT NULL default '', `PLAYER_NAME` varchar(32) binary NOT NULL default '', `LAST_PLAY_DATE` timestamp(14) NOT NULL, `XP` int(10) NOT NULL default '0', `HUDHELP` tinyint(3) unsigned NOT NULL default '1', `SKILL_COUNT` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`SH_KEY`) ) TYPE=MyISAM COMMENT='SUPERHERO XP Saving Table'") Now a little bit further scroll down to line #285 Code:
copy(sql, charsmax(sql), "CREATE TABLE IF NOT EXISTS `sh_saveskills` ( `SH_KEY` varchar(32) binary NOT NULL default '', `SKILL_NUMBER` tinyint(3) unsigned NOT NULL default '0', `HERO_NAME` varchar(25) NOT NULL default '', PRIMARY KEY (`SH_KEY`,`SKILL_NUMBER`) ) TYPE=MyISAM COMMENT='SUPERHERO Skill Saving Table'") Code:
copy(sql, charsmax(sql), "CREATE TABLE IF NOT EXISTS `sh_savexp` ( `SH_KEY` varchar(32) binary NOT NULL default '', `PLAYER_NAME` varchar(32) binary NOT NULL default '', `LAST_PLAY_DATE` timestamp NOT NULL, `XP` int(10) NOT NULL default '0', `HUDHELP` tinyint(3) unsigned NOT NULL default '1', `SKILL_COUNT` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`SH_KEY`) ) ENGINE=MyISAM COMMENT='SUPERHERO XP Saving Table'") Code:
copy(sql, charsmax(sql), "CREATE TABLE IF NOT EXISTS `sh_saveskills` ( `SH_KEY` varchar(32) binary NOT NULL default '', `SKILL_NUMBER` tinyint(3) unsigned NOT NULL default '0', `HERO_NAME` varchar(25) NOT NULL default '', PRIMARY KEY (`SH_KEY`,`SKILL_NUMBER`) ) ENGINE=MyISAM COMMENT='SUPERHERO Skill Saving Table'") This drove me crazy for months so I decided to tackle the source and this is what was found. I lost my players due to this glitch because they would come back to find their work gone not saved or retrieved. I did not know this had been happening as no one told me until I saw the errors in the log files. Logs kept reporting that the tables did not exists even though they were there. The data was just not accessible due to a malformed creation from using "TYPE" instead of "ENGINE". Once you fix this, recompile and stage the new compiled version into your plugins folder. Restart the gameserver, and all will be good to go. I am a bit ticked off I did not see this in 2014 and it took me all this time to find the problem myself. Goodluck! Krillin |
All times are GMT -4. The time now is 06:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.