Comment 2 for bug 1714868

Revision history for this message
Robert Lyon (robertl-9) wrote :

I've started a patch for this - patch 8160 - and so far just allows for install of Mahara without error when using mysql created by:

 create database `maharadb` DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;

The mysqli error "[1071: Specified key was too long; max key length is 3072 bytes]" was due to trying to create the 'client_connections_institution' table with a unique index for 4 varchar fields.

But key length would be (255 chars * 4bits) * 4 columns) = 4080 bytes and so too big
- Currently is (255 chars * 3bits) * 4 columns) = 3060 bytes so just fits

But as we do checks in PHP to make sure that every 'name' is unique we don't need the unique index on 4 fields, just the 'name' field.