From 5dcf2cde9cd3d1eaa9b2d66800b757066c70eb5c Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 26 Sep 2018 19:01:45 +0200 Subject: [PATCH] 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. --- sql/mysql.new.sql | 2 +- sql/mysql.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/mysql.new.sql b/sql/mysql.new.sql index 3c9e9ed58..0f564f08f 100644 --- a/sql/mysql.new.sql +++ b/sql/mysql.new.sql @@ -276,7 +276,7 @@ CREATE TABLE pubsub_item ( publisher text NOT NULL, creation 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; CREATE INDEX i_pubsub_item_itemid ON pubsub_item(itemid(36)); CREATE UNIQUE INDEX i_pubsub_item_tuple ON pubsub_item(nodeid, itemid(36)); diff --git a/sql/mysql.sql b/sql/mysql.sql index f5c22953d..d731f89df 100644 --- a/sql/mysql.sql +++ b/sql/mysql.sql @@ -253,7 +253,7 @@ CREATE TABLE pubsub_item ( publisher text NOT NULL, creation 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; CREATE INDEX i_pubsub_item_itemid ON pubsub_item(itemid(36)); CREATE UNIQUE INDEX i_pubsub_item_tuple ON pubsub_item(nodeid, itemid(36));