EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Database update system (https://www.eqemulator.org/forums/showthread.php?t=40192)

Nightrider84 11-20-2015 08:45 PM

Database update system
 
I know it checks for sql updates everytime you boot your server up but I wanted to know if there is a way to force run it on bootup bypassing the check. Incase I want to redownload bot scripts because I wipe them out ect. I know I can manually source the script im just curious because its a convenient tool.

Uleat 11-20-2015 08:51 PM

Just run eqemu_update.pl manually.

That's the current method for installing/updating bots (option 4.)

Nightrider84 11-20-2015 08:53 PM

Ah thanks, that saves me some time.
Regarding bots I get this error when I try and run the SQL in required


mysql> source 2015_09_30_bots.sql
Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.16 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.02 sec)

ERROR 1136 (21S01): Column count doesn't match value count at row 1
Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.01 sec)

ERROR 1146 (42S02): Table 'peq.bot_data' doesn't exist
ERROR 1146 (42S02): Table 'peq.bot_groups' doesn't exist
ERROR 1146 (42S02): Table 'peq.bot_data' doesn't exist
ERROR 1146 (42S02): Table 'peq.bot_guild_members' doesn't exist
mysql>

I know it's stating the obvious that the table doesn't exist but I just dropped the bots out of the DB and sourced them back in.

Uleat 11-20-2015 09:14 PM

You really should use eqemu_update.pl to update bots since there is now a 'bots versioning' system in place.

Otherwise, the `bots_version` field doesn't get updated.


Any way to find the query that is causing this: "ERROR 1136 (21S01): Column count doesn't match value count at row 1"

I've seen a few people have issues with it and would like try and track down the issue.

I, personally, haven't had a problem with the error points that people stalling at..but, that doesn't mean there isn't an issue with it.

Nightrider84 11-20-2015 09:16 PM

so should i drop the bots database amd use the updater to source them in?

Uleat 11-20-2015 09:22 PM

You can do that..but, you will lose any bots data that you have.

If it's an unused one, that would be best :)


If not, I'll post what you can remark out and run the script with (still need to setup my commit privileges on this new windows install.)

Nightrider84 11-20-2015 09:29 PM

The Plot thickens, this is the readout I get when I try and update the bots with the updater and no bots in db at all.

================================================== ==========
#::: EQEmu Update Utility Menu: (eqemu_update.pl)
================================================== ==========
1) [Backup Database] :: (Saves to Backups folder)
2) [Backup Database Compressed] :: (Saves to Backups folder)
3) [EQEmu DB Schema] :: Check and stage pending REQUIRED Database updates
4) [EQEmu DB Bots Schema] Run pending REQUIRED updates... (1)
5) [OPCodes] :: Download latest opcodes for each EQ Client
6) [Maps] :: Download latest map and water files
7) [Plugins (Perl)] :: Download latest Perl plugins
8) [Quests (Perl/LUA)] :: Download latest PEQ quests and stage updates
9) [LUA Modules] :: Download latest LUA Modules (Required for Lua)
10) [DB Data : Alternate Advancement] :: Download Latest AA's from PEQ (This ov
erwrites existing data)
20) [Update the updater] Force update this script (Redownload)
0) Exit

Enter numbered option and press enter...

> 4
Running Update: 9000 - 2015_09_30_bots.sql
ERROR 1136 (21S01) at line 675: Column count doesn't match value count at row 1
ERROR 1146 (42S02) at line 735: Table 'peq.bot_data' doesn't exist
ERROR 1146 (42S02) at line 755: Table 'peq.bot_groups' doesn't exist
ERROR 1146 (42S02) at line 768: Table 'peq.bot_data' doesn't exist
ERROR 1146 (42S02) at line 779: Table 'peq.bot_guild_members' doesn't exist
Missing DB Update 9000 '2015_09_30_bots.sql'
[URL] :: https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/git/bo
ts/required/2015_09_30_bots.sql
[Saved] :: db_update/2015_09_30_bots.sql

I tried sourcing in the load_bots.sql in the deprecated folder same error. So im going to assume the update won't add the bots in only update what is already available in the DB. So maybe im adding the bots in with the wrong sql?

Uleat 11-20-2015 09:52 PM

Yeah, it's failing inside of a conditional check that is suppose to keep that from happening...

Seems like the field MUST be present, even if the conditional check never proves true, when a reference is made to it inside of a function...


Here's a link to the thread for the bots db versioning implementation: http://www.eqemulator.org/forums/showthread.php?t=40091

This is the if statement that you will need to remark out to get it to work: https://github.com/EQEmu/Server/blob..._bots.sql#L471 (all 7 lines)


Double-check your `peq`.`db_version` table to see if `bots_version` is set to '9000' - if not, go ahead and set it.

Then manually run the '2015_09_30_bots.sql' script after remarking out those lines.


If that doesn't do it, post back.

Nightrider84 11-20-2015 10:09 PM

bots version was already set to 9000 (too bad its not "over 9000"....im a geek) Redacted the 7 lines still get the same issue. I noticed the 4 table's its refering too don't exist in the db. Ive tried sourcing in the bots manually from the decap folder and doing it through the updater just fyi. Also if bots arenn't in the DB At all the updater doesn't recognize that and only wants to install the 1 required sql update

Akkadius 11-20-2015 10:12 PM

Quote:

Originally Posted by Nightrider84 (Post 245158)
bots version was already set to 9000 (too bad its not "over 9000"....im a geek) Redacted the 7 lines still get the same issue. I noticed the 4 table's its refering too don't exist in the db. Ive tried sourcing in the bots manually from the decap folder and doing it through the updater just fyi. Also if bots arenn't in the DB At all the updater doesn't recognize that and only wants to install the 1 required sql update

I set base version number to 9000 for that exact joke when I created the system ;)

Nightrider84 11-20-2015 10:19 PM

LOL im glad I got the joke, I thought it was pretty funny =)

Nightrider84 11-20-2015 10:21 PM

Im not the best with code but the way it reads atleast is that its trying to modify a table that doesn't exist because the load_bots.sql didn't add in the required tables. Just my 2 cents

Uleat 11-20-2015 10:53 PM

The function is failing..which is causing the tables to not be created.
Quote:

ERROR 1136 (21S01) at line 675: Column count doesn't match value count at row 1
The last 4 lines are the views being added..which reference tables that don't exist
Quote:

ERROR 1146 (42S02) at line 735: Table 'peq.bot_data' doesn't exist
ERROR 1146 (42S02) at line 755: Table 'peq.bot_groups' doesn't exist
ERROR 1146 (42S02) at line 768: Table 'peq.bot_data' doesn't exist
ERROR 1146 (42S02) at line 779: Table 'peq.bot_guild_members' doesn't exist

I honestly don't know what the issue is because I ran this many, many times on both a clean db and a pre-conversion bot one.

(I know what's causing it..but, I don't know why the error is occurring... Maybe NULL is greater than '0'?)

Nightrider84 11-20-2015 11:07 PM

Generally speak NULL means nothing while 0 represents a number. They both mean 0 but 0 is still a number where NULL isn't. if that makes any kind of sense lol.
I guess what im saying is NULL is voiding something out so it actually means less than 0

Huppy 11-20-2015 11:37 PM

Just an observation.
The 2015_09_30_bots.sql drops any and all bot view tables and creates them.
The load_bots.sql drops the view tables and creates them.
Observation : One creates in all lower case names, the other in mixed case.
So I assume if one used both sql's, could that cause headaches?
(depending on the order they were used in)
I also noticed a difference in the table naming, for example;
load_bots creates table botgroup
The update creates table bot_groups but, so far, I can't see anything where
the update drops a botgroup table (if exist).
I've never used the load_bot.sql My db has never been replaced, just
updated over the last few years


All times are GMT -4. The time now is 07:14 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.