mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8332] Add non-unique key accid for realmcharacters table for speedup queries by this field.
Just note about related _not_ mangos bug: this table _expected_ to have primary key by pair (`realmid`,`acctid`). If used DB not have it for table, then this wrongly setup of DB. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
4e2536df45
commit
175d1c5551
4 changed files with 10 additions and 3 deletions
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `realmd_db_version`;
|
DROP TABLE IF EXISTS `realmd_db_version`;
|
||||||
CREATE TABLE `realmd_db_version` (
|
CREATE TABLE `realmd_db_version` (
|
||||||
`required_7938_01_realmd_account` bit(1) default NULL
|
`required_8332_01_realmd_realmcharacters` bit(1) default NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
@ -133,7 +133,8 @@ CREATE TABLE `realmcharacters` (
|
||||||
`realmid` int(11) unsigned NOT NULL default '0',
|
`realmid` int(11) unsigned NOT NULL default '0',
|
||||||
`acctid` bigint(20) unsigned NOT NULL,
|
`acctid` bigint(20) unsigned NOT NULL,
|
||||||
`numchars` tinyint(3) unsigned NOT NULL default '0',
|
`numchars` tinyint(3) unsigned NOT NULL default '0',
|
||||||
PRIMARY KEY (`realmid`,`acctid`)
|
PRIMARY KEY (`realmid`,`acctid`),
|
||||||
|
KEY (acctid)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Realm Character Tracker';
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Realm Character Tracker';
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
|
||||||
4
sql/updates/8332_01_realmd_realmcharacters.sql
Normal file
4
sql/updates/8332_01_realmd_realmcharacters.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
ALTER TABLE realmd_db_version CHANGE COLUMN required_7938_01_realmd_account required_8332_01_realmd_realmcharacters bit;
|
||||||
|
|
||||||
|
ALTER TABLE realmcharacters
|
||||||
|
ADD KEY (acctid);
|
||||||
|
|
@ -263,6 +263,7 @@ pkgdata_DATA = \
|
||||||
8254_01_mangos_spell_proc_event.sql \
|
8254_01_mangos_spell_proc_event.sql \
|
||||||
8294_01_mangos_playercreateinfo_action.sql \
|
8294_01_mangos_playercreateinfo_action.sql \
|
||||||
8310_01_mangos_spell_proc_event.sql \
|
8310_01_mangos_spell_proc_event.sql \
|
||||||
|
8332_01_realmd_realmcharacters.sql \
|
||||||
README
|
README
|
||||||
|
|
||||||
## Additional files to include when running 'make dist'
|
## Additional files to include when running 'make dist'
|
||||||
|
|
@ -506,4 +507,5 @@ EXTRA_DIST = \
|
||||||
8254_01_mangos_spell_proc_event.sql \
|
8254_01_mangos_spell_proc_event.sql \
|
||||||
8294_01_mangos_playercreateinfo_action.sql \
|
8294_01_mangos_playercreateinfo_action.sql \
|
||||||
8310_01_mangos_spell_proc_event.sql \
|
8310_01_mangos_spell_proc_event.sql \
|
||||||
|
8332_01_realmd_realmcharacters.sql \
|
||||||
README
|
README
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8331"
|
#define REVISION_NR "8332"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue