[svn] * Proper SVN structure
--HG-- branch : trunk
This commit is contained in:
commit
9b1c0e006f
2564 files changed
+621124
No files matched your search
@@ -0,0 +1,36 @@
|
||||
# Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Sub-directories to parse
|
||||
|
||||
## Change installation location
|
||||
# datadir = mangos/sql/tools
|
||||
pkgdatadir = $(datadir)/mangos/sql/tools
|
||||
|
||||
## Files to be installed
|
||||
# Install basic SQL files to datadir
|
||||
pkgdata_DATA = \
|
||||
characters_item_duplicates_remove.sql \
|
||||
characters_pet_data_cleanup.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
EXTRA_DIST = \
|
||||
characters_item_duplicates_remove.sql \
|
||||
characters_pet_data_cleanup.sql \
|
||||
README
|
||||
@@ -0,0 +1,10 @@
|
||||
= MaNGOS -- README =
|
||||
|
||||
Copyright (c) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
|
||||
See the COPYING file for copying conditions.
|
||||
|
||||
== Database tools ==
|
||||
This folder contains SQL files which can be used for cleanup DB from corrupted or outdated data in safe way.
|
||||
This tools must be used _only_ when mangos server stopped.
|
||||
But you can safely use its any times while server shutdown.
|
||||
@@ -0,0 +1,22 @@
|
||||
DROP TABLE IF EXISTS item_test;
|
||||
CREATE TABLE item_test
|
||||
SELECT w.`item_guid`,w.`source`,w.`count` FROM
|
||||
(SELECT u.`item_guid`,u.`source`,COUNT(u.`item_guid`) as `count` FROM
|
||||
((SELECT c.`item` as `item_guid`, 'i' as `source` FROM character_inventory c) UNION
|
||||
(SELECT a.`itemguid` as `item_guid`, 'a' as `source` FROM auctionhouse a) UNION
|
||||
(SELECT m.`item_guid` as `item_guid`, 'm' as `source` FROM mail_items m) UNION
|
||||
(SELECT g.`item_guid` as `item_guid`, 'g' as `source` FROM guild_bank_item g)
|
||||
) as u
|
||||
GROUP BY u.`item_guid`
|
||||
) as w
|
||||
WHERE w.`count` > 1;
|
||||
|
||||
DELETE FROM auctionhouse WHERE itemguid IN (SELECT item_guid FROM item_test WHERE `source`='i');
|
||||
DELETE FROM mail_items WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='i');
|
||||
DELETE FROM guild_bank_item WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='i');
|
||||
|
||||
DELETE FROM mail_items WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='a');
|
||||
DELETE FROM guild_bank_item WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='a');
|
||||
|
||||
DELETE FROM guild_bank_item WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='m');
|
||||
DROP TABLE IF EXISTS item_test;
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM pet_aura WHERE guid NOT IN (SELECT id FROM character_pet);
|
||||
DELETE FROM pet_spell WHERE guid NOT IN (SELECT id FROM character_pet);
|
||||
DELETE FROM pet_spell_cooldown WHERE guid NOT IN (SELECT id FROM character_pet);
|
||||
Reference in new issue
Block a user