https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39618 --- Comment #19 from David Cook <dcook@prosentient.com.au> --- (In reply to Adolfo Rodríguez Taboada from comment #16)
This patch returned the following error in my local instance.
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: BLOB/TEXT column 'preferred_name' used in key specification without a key length
The field preferred_name is defined as longtext so I understand the key for preferred_name should have a length like the index of middle_name
CREATE INDEX middle_name_idx ON borrowers ( middle_name(768) )
I think that Adolfo makes a good point. At the very least, we should be consistent in the adding of indexes, and middle name is a good one to copy. On a fairly new KTD, I dropped "preferred_name_idx" and re-added it. While there wasn't a noisy error message, I did notice that there was a warning in KTD: MariaDB [koha_kohadev]> ALTER TABLE `borrowers` ADD KEY `preferred_name_idx` (`preferred_name`); Query OK, 0 rows affected, 1 warning (0.050 sec) Records: 0 Duplicates: 0 Warnings: 1 MariaDB [koha_kohadev]> show warnings; +-------+------+----------------------------------------------------------+ | Level | Code | Message | +-------+------+----------------------------------------------------------+ | Note | 1071 | Specified key was too long; max key length is 3072 bytes | +-------+------+----------------------------------------------------------+ 1 row in set (0.000 sec) -- You are receiving this mail because: You are watching all bug changes.