Community AlphaAlpha MUADMINS
VITiếng Việt
Đăng nhập
Trên MuADMINSConfig ScannerTải lên zip file của bạn: rate, rơi đồ, spot, giới hạnMởTrên MuADMINSGặp chúng tôi trên DiscordNhờ giúp đỡ, chia sẻ những gì bạn đang làm và trò chuyện về MU với các chủ server khác.Mở
← Tất cả giải pháp

Unicode (NVARCHAR) migration of a MuEmu / Louis Season 6 database: what is right and what breaks

MuADMINS biên soạn từ nguồnNot verified

Review of a Season 6 Unicode script set (a migration that converts the name columns to NVARCHAR plus new WZ_CreateCharacter, WZ_DeleteCharacter, WZ_CreateGuild procedures). Its table list (CustomNpcQuest, CustomQuest, CustomAttack, RankingKingGuild, RankingTvT, WarehouseGuild ...) is the Louis Season 6 one.

Right: NVARCHAR stores any language whatever the collation; the guild procedure uses the real Guild.Number column.

What breaks:

  1. It drops the primary keys of 46 tables ("Will NOT recreate") and some UNIQUE constraints. Without them duplicate names become possible and the server's lookups get slow. Put them back after the conversion (in the MuEmu based scripts: Character(Name), AccountCharacter(Id), warehouse(AccountID), Guild(G_Name), GuildMember(Name), MEMB_STAT(memb___id)):
SELECT Name, COUNT(*) FROM Character GROUP BY Name HAVING COUNT(*) > 1;
ALTER TABLE Character ADD CONSTRAINT PK_Character PRIMARY KEY CLUSTERED (Name);
  1. MEMB_INFO and the main AccountCharacter table are not converted (only AccountCharacter2 to 5), but the new WZ_CreateCharacter writes NVARCHAR names into AccountCharacter.GameID1 to GameID5: a Korean name lands there as ?. Convert GameID1 to GameID10 and GameIDC too, for example:
ALTER TABLE AccountCharacter ALTER COLUMN GameID1 NVARCHAR(10) NULL;
  1. The new WZ_CreateCharacter fills only 5 slots; Louis Update 26 and MSPro V6 use 10.
  2. Every other procedure that receives a name with VARCHAR parameters (WZ_RenameCharacter, WZ_GuildCreate, WZ_SetGuildDelete, WZ_GetResetInfo, WZ_SetResetInfo, WZ_FriendAdd ...) still turns it into ?.
  3. Whether the GameServer and client send Unicode names is decided by the server files. Test all of it on a restored copy first, server closed, backup first.

Source: MuADMINS review of Database_Unicode_Migration_SIMPLE_CLEAN.sql, Database_StoredProcedure_Unicode_FINAL.sql and fixed_stored_proc_language.sql, compared with the Louis (JogandoMU) Season 6 Update 2 to 28 scripts and the X-Team / MuDevs MuOnline scripts.

Do MuADMINS biên soạn
Cách này có giúp được bạn không?

Vẫn còn vướng mắc? Tìm trên MuGPS Hỏi Trợ lý MU

MuADMINS Community Alpha: miễn phí, do cộng đồng xây dựng, đang được phát triển tích cực.