25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

MySQL: Increase index prefix length for PEP nodes

For PEP nodes, the "host" column holds the user JID, where the first 20
characters may well not be unique.
This commit is contained in:
Holger Weiss 2019-02-26 13:13:04 +01:00
parent ab2197c455
commit 90dc8ea1e5
2 changed files with 2 additions and 2 deletions

View File

@ -242,7 +242,7 @@ CREATE TABLE pubsub_node (
nodeid bigint auto_increment primary key nodeid bigint auto_increment primary key
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE INDEX i_pubsub_node_parent ON pubsub_node(parent(120)); CREATE INDEX i_pubsub_node_parent ON pubsub_node(parent(120));
CREATE UNIQUE INDEX i_pubsub_node_tuple ON pubsub_node(host(20), node(120)); CREATE UNIQUE INDEX i_pubsub_node_tuple ON pubsub_node(host(71), node(120));
CREATE TABLE pubsub_node_option ( CREATE TABLE pubsub_node_option (
nodeid bigint, nodeid bigint,

View File

@ -219,7 +219,7 @@ CREATE TABLE pubsub_node (
nodeid bigint auto_increment primary key nodeid bigint auto_increment primary key
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE INDEX i_pubsub_node_parent ON pubsub_node(parent(120)); CREATE INDEX i_pubsub_node_parent ON pubsub_node(parent(120));
CREATE UNIQUE INDEX i_pubsub_node_tuple ON pubsub_node(host(20), node(120)); CREATE UNIQUE INDEX i_pubsub_node_tuple ON pubsub_node(host(71), node(120));
CREATE TABLE pubsub_node_option ( CREATE TABLE pubsub_node_option (
nodeid bigint, nodeid bigint,