MT#64099 15841.up increase prosody unique index keys size

* increase keys size from 20 to 128 to avoid truncated values
  leading to duplicate entries and triggering index violation.

Change-Id: I8325bebb43fbce0b7c1bbf3698ffbd82159a20b7
master
Kirill Solomko 2 weeks ago committed by Sipwise Jenkins Builder
parent 5b840a69e7
commit fa08e4ae1f

@ -12,5 +12,5 @@ WHERE (host, user, store, `key`, `value`) NOT IN (
);
DROP INDEX prosody_index on prosody;
CREATE UNIQUE INDEX prosody_unique_index ON prosody(`host`(20), `user`(20), `store`(20), `key`(20)) USING BTREE;
CREATE UNIQUE INDEX prosody_unique_index ON prosody(`host`(128), `user`(128), `store`(128), `key`(128)) USING BTREE;
COMMIT;

@ -203,7 +203,7 @@
"NON_UNIQUE" : 0,
"NULLABLE" : "YES",
"SEQ_IN_INDEX" : 1,
"SUB_PART" : 20,
"SUB_PART" : 128,
"TABLE_NAME" : "prosody",
"key_col" : "prosody/prosody_unique_index/1"
},
@ -215,7 +215,7 @@
"NON_UNIQUE" : 0,
"NULLABLE" : "YES",
"SEQ_IN_INDEX" : 2,
"SUB_PART" : 20,
"SUB_PART" : 128,
"TABLE_NAME" : "prosody",
"key_col" : "prosody/prosody_unique_index/2"
},
@ -227,7 +227,7 @@
"NON_UNIQUE" : 0,
"NULLABLE" : "YES",
"SEQ_IN_INDEX" : 3,
"SUB_PART" : 20,
"SUB_PART" : 128,
"TABLE_NAME" : "prosody",
"key_col" : "prosody/prosody_unique_index/3"
},
@ -239,7 +239,7 @@
"NON_UNIQUE" : 0,
"NULLABLE" : "YES",
"SEQ_IN_INDEX" : 4,
"SUB_PART" : 20,
"SUB_PART" : 128,
"TABLE_NAME" : "prosody",
"key_col" : "prosody/prosody_unique_index/4"
},

@ -15,7 +15,7 @@ CREATE TABLE `prosody` (
`key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`type` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`value` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
UNIQUE KEY `prosody_unique_index` (`host`(20),`user`(20),`store`(20),`key`(20)) USING BTREE
UNIQUE KEY `prosody_unique_index` (`host`(128),`user`(128),`store`(128),`key`(128)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;

Loading…
Cancel
Save