25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

MySQL: Use MEDIUMTEXT for PubSub payload

Let MySQL/MariaDB accept PubSub payloads with a size of up to 16 MiB,
rather than truncating at 64 KiB.
This commit is contained in:
Holger Weiss 2018-09-26 19:01:45 +02:00
parent b72ed7afa4
commit 5dcf2cde9c
2 changed files with 2 additions and 2 deletions

View File

@ -276,7 +276,7 @@ CREATE TABLE pubsub_item (
publisher text NOT NULL, publisher text NOT NULL,
creation varchar(32) NOT NULL, creation varchar(32) NOT NULL,
modification varchar(32) NOT NULL, modification varchar(32) NOT NULL,
payload text NOT NULL payload mediumtext NOT NULL
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE INDEX i_pubsub_item_itemid ON pubsub_item(itemid(36)); CREATE INDEX i_pubsub_item_itemid ON pubsub_item(itemid(36));
CREATE UNIQUE INDEX i_pubsub_item_tuple ON pubsub_item(nodeid, itemid(36)); CREATE UNIQUE INDEX i_pubsub_item_tuple ON pubsub_item(nodeid, itemid(36));

View File

@ -253,7 +253,7 @@ CREATE TABLE pubsub_item (
publisher text NOT NULL, publisher text NOT NULL,
creation varchar(32) NOT NULL, creation varchar(32) NOT NULL,
modification varchar(32) NOT NULL, modification varchar(32) NOT NULL,
payload text NOT NULL payload mediumtext NOT NULL
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE INDEX i_pubsub_item_itemid ON pubsub_item(itemid(36)); CREATE INDEX i_pubsub_item_itemid ON pubsub_item(itemid(36));
CREATE UNIQUE INDEX i_pubsub_item_tuple ON pubsub_item(nodeid, itemid(36)); CREATE UNIQUE INDEX i_pubsub_item_tuple ON pubsub_item(nodeid, itemid(36));