Skip to content

fix: Limit index size#6494

Closed
MissAllSunday wants to merge 2 commits intoSimpleMachines:release-2.1from
MissAllSunday:qanda
Closed

fix: Limit index size#6494
MissAllSunday wants to merge 2 commits intoSimpleMachines:release-2.1from
MissAllSunday:qanda

Conversation

@MissAllSunday
Copy link
Copy Markdown
Contributor

Fixes #6163

@MissAllSunday MissAllSunday added this to the RC4 milestone Feb 3, 2021
@sbulen
Copy link
Copy Markdown
Contributor

sbulen commented Feb 4, 2021

There are actually 3 indexes that are too small, this only addresses one of them.

And the DB doesn't actually make use of mb4 until we look into this PR: #6409

Until then, it's mb3 data stuffed into mb4-capable tables...

@sbulen
Copy link
Copy Markdown
Contributor

sbulen commented Feb 4, 2021

And 249 is too big, it needs to be 191, for reasons explained over on #6409 also.

@sbulen
Copy link
Copy Markdown
Contributor

sbulen commented Feb 4, 2021

I clearly worry too much... I am also concerned that the string 'utf8' != the string 'utf8mb4'...

There are several places throughout our code - still old 2.0 code that supports ISO-8859-1 - where the logic treats the contents as EITHER utf8 OR ISO-8859-1... I.e., a utf8mb4 DB may actually get treated as a latin1 DB, because it's not 'utf8'. Hence the importance of ripping out all the old "otherwise its ISO-8859-1" logic.

@sbulen sbulen added MySQL Charset/Encoding UTF8 & mb4 encoding related issues labels Feb 4, 2021
@sbulen
Copy link
Copy Markdown
Contributor

sbulen commented Feb 4, 2021

One last change needed - When we change the DB we also add a corrective step to the upgrader. In this instance, dropping the old index & adding the new one.

An example:
https://github.com/SimpleMachines/SMF2.1/blob/a8f4d6af6465d5990d4df4bd0cb5aed242025a7c/other/upgrade_2-1_mysql.sql#L567

This allows the upgrader to be rerun to fix issues, bring the DB into conformity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Charset/Encoding UTF8 & mb4 encoding related issues MySQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quanda table lngfile key too long

2 participants