diff options
author | Sadie Powell <sadie@witchery.services> | 2021-04-27 23:18:04 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-04-27 23:18:04 +0100 |
commit | 6274bd0b34e51c3540f0dd467ab6a98567c502f6 (patch) | |
tree | 9f5756568ac97a23c69b67e468668c8965aac367 /modules/extra/stats/irc2sql/tables.cpp | |
parent | 095a25d4731c7b2df73174eaedecae90aa1e610b (diff) |
Use utf8mb4 instead of utf8 in chanstats and irc2sql.
The utf8 charset, confusingly, is an alias for utf8mb3 which is not
a real UTF-8 encoding as it can only store three byte characters.
The real UTF-8 charset is utf8mb4.
Diffstat (limited to 'modules/extra/stats/irc2sql/tables.cpp')
-rw-r--r-- | modules/extra/stats/irc2sql/tables.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/extra/stats/irc2sql/tables.cpp b/modules/extra/stats/irc2sql/tables.cpp index 1c286a191..598dc49a7 100644 --- a/modules/extra/stats/irc2sql/tables.cpp +++ b/modules/extra/stats/irc2sql/tables.cpp @@ -34,7 +34,7 @@ void IRC2SQL::CheckTables() "`countryname` varchar(50)," "PRIMARY KEY `end` (`end`)," "KEY `start` (`start`)" - ") ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"; this->RunQuery(query); } if (GeoIPDB.equals_ci("city") && !this->HasTable(prefix + "geoip_city_blocks")) @@ -45,7 +45,7 @@ void IRC2SQL::CheckTables() "`locId` INT UNSIGNED NOT NULL," "PRIMARY KEY `end` (`end`)," "KEY `start` (`start`)" - ") ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"; this->RunQuery(query); } @@ -60,7 +60,7 @@ void IRC2SQL::CheckTables() "`longitude` FLOAT," "`areaCode` INT," "PRIMARY KEY (`locId`)" - ") ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"; this->RunQuery(query); } if (GeoIPDB.equals_ci("city") && !this->HasTable(prefix + "geoip_city_region")) @@ -69,7 +69,7 @@ void IRC2SQL::CheckTables() "`region` CHAR(2) NOT NULL," "`regionname` VARCHAR(100) NOT NULL," "PRIMARY KEY (`country`,`region`)" - ") ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"; this->RunQuery(query); } if (!this->HasTable(prefix + "server")) @@ -87,7 +87,7 @@ void IRC2SQL::CheckTables() "`ulined` enum('Y','N') NOT NULL DEFAULT 'N'," "PRIMARY KEY (`id`)," "UNIQUE KEY `name` (`name`)" - ") ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"; this->RunQuery(query); } if (!this->HasTable(prefix + "chan")) @@ -101,7 +101,7 @@ void IRC2SQL::CheckTables() "`modes` varchar(512) DEFAULT NULL," "PRIMARY KEY (`chanid`)," "UNIQUE KEY `channel`(`channel`)" - ") ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"; this->RunQuery(query); } if (!this->HasTable(prefix + "user")) @@ -136,7 +136,7 @@ void IRC2SQL::CheckTables() "PRIMARY KEY (`nickid`)," "UNIQUE KEY `nick` (`nick`)," "KEY `servid` (`servid`)" - ") ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"; this->RunQuery(query); } if (!this->HasTable(prefix + "ison")) @@ -147,7 +147,7 @@ void IRC2SQL::CheckTables() "`modes` varchar(255) NOT NULL default ''," "PRIMARY KEY (`nickid`,`chanid`)," "KEY `modes` (`modes`)" - ") ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"; this->RunQuery(query); } if (!this->HasTable(prefix + "maxusers")) @@ -158,7 +158,7 @@ void IRC2SQL::CheckTables() "`maxtime` DATETIME NOT NULL," "`lastused` DATETIME NOT NULL," "UNIQUE KEY `name` (`name`)" - ") ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + ") ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;"; this->RunQuery(query); } if (this->HasProcedure(prefix + "UserConnect")) |