I have a script AH Tool that populates the database for searching the AH. About every three days, it's set to return all the unsold items to charid 0. Since this char doesn't exist, I get thousands of errors that read like this:
[SQL] Query: INSERT INTO delivery_box (charid, charname, box, itemid, itemsubid, quantity, senderid, sender) VALUES (0, (select charname from chars where charid=0), 1, 2571, 0, 1, 0, 'AH-Jeuno');
[SQL] DB error - Out of range value for column 'slot' at row 1
This destroys my /var/log/syslog file causing my system to run out of disk space very quickly. I'm curious what I can do to find where the mySQL errors write to, and modify that to write to a different file, or completely skip the output on these specific errors.
I've also considered creating a cron job to truncate the syslog file, or rotate it once it reaches a specified size, but I'm afraid I might cut out something important. It might also be easier to try to modify the script not to return the unsold items, as my AH runs at 10gil an item, and is always populated. There isn't any real need for gil in the game, as you can come by anything easily. Any suggestions/advice would be great!
It's not a huge deal, as I only play with friends on this server, but it's an annoying hassle to have to deal with this all the time.
Thanks for the help!
==EDIT==
Taking a look again, I realize it's not the charid that's breaking it, but the slot in the mailbox.
~Miz
AH Script or DB error
Re: AH Script or DB error
Why don't you just delete the item instead of returning it to a non-existent character?
-- Whasf
Re: AH Script or DB error
That's a great idea. I'm not entirely sure I know that much about mySQL to handle the task alone, but I'll see if I can figure things out with Google's help, unless you have a pointer for altering it.
I think I'm looking at darkstar/sql/triggers.sql. But I can't really tell which line to edit to remove the expired sales.
Thanks!
I think I'm looking at darkstar/sql/triggers.sql. But I can't really tell which line to edit to remove the expired sales.
Thanks!