You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Database table creation can fail with error "Specified key was too long; max key length is 1000 bytes" #148
Based on this and this, my understanding is that the error happens because Barracuda is not enabled for MySQL, which means our index key length is too long for stock InnoDB.
If it's a problem we want to solve, we could work around this by setting prefix lengths to each column. Alternatively, we can show a warning when Barracuda isn't enabled.
@danielbachhuber I think address was left as varchar(255) because it isn't an indexed column in the events table, but on the tags table it's the PRIMARY KEY. In my testing of that feature I was only seeing the error on indexed columns.
If it's a problem we want to solve, we could work around this by setting prefix lengths to each column. Alternatively, we can show a warning when Barracuda isn't enabled.
We could also change events.address to varchar(171) (accommodating bigint(20) for event_id), but I wonder if that's too short.
Looking into this even further, I think we can revert the utf8mb4 charset on creation because our value column is LONGBLOB, which is binary and doesn't use charsets.
Activity
danielbachhuber commentedon Sep 28, 2017
SHOW VARIABLESon the offending server: https://gist.github.com/ramontolkamp/8e1d5b2402217222f519312da5d640aedanielbachhuber commentedon Sep 29, 2017
@fjarrett Do you recall why you changed
addresstovarchar(191)on thetagstable but not theeventstable (#131)?danielbachhuber commentedon Sep 29, 2017
Based on this and this, my understanding is that the error happens because Barracuda is not enabled for MySQL, which means our index key length is too long for stock InnoDB.
If it's a problem we want to solve, we could work around this by setting prefix lengths to each column. Alternatively, we can show a warning when Barracuda isn't enabled.
frankiejarrett commentedon Sep 29, 2017
@danielbachhuber I think
addresswas left asvarchar(255)because it isn't an indexed column in theeventstable, but on thetagstable it's thePRIMARY KEY. In my testing of that feature I was only seeing the error on indexed columns.danielbachhuber commentedon Sep 29, 2017
We could also change
events.addresstovarchar(171)(accommodatingbigint(20)forevent_id), but I wonder if that's too short.danielbachhuber commentedon Sep 29, 2017
Looking into this even further, I think we can revert the utf8mb4 charset on creation because our
valuecolumn isLONGBLOB, which is binary and doesn't use charsets.danielbachhuber commentedon Oct 3, 2017
🔨