Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unique keys have a 767 max byte length as well. Thanks Phil!
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fcb6d90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wilsonge
Is there a reason to do this only for that two points?
There are much more places see:
https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/sql/updates/mysql/3.5.0-2015-07-01.sql#L82-L89
and https://raw.githubusercontent.com/joomla/joomla-cms/staging/installation/sql/mysql/joomla.sql
search for
varchar(400)
. (8 places)fcb6d90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
varchar(400)
is fine (and indeed for alias') required to avoid truncation. UNLESS there is a index (in which case it is limited to 767 bytes which in UTF8MB4 is 191 characters - hence the reversion for these specific fields. Unless people come accross other issues during install like #9132 then we should be ok :)fcb6d90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. Thanks for checking.
fcb6d90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wilsonge
I updated my joomla test instaltion by just replacing the joomla files (sincronizing them with git) has i do always.
I get several db warnings.
I press fix and i get an error.
Also this ones are still in database warning:
I don't know if it's related to this change...
fcb6d90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem here. My db is already set to varchar(191) on my test site.
Shall we not not make a conditional to the series of ALTER TABLE for future updates (from 3.5.0 to 3.5.1)?
fcb6d90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may have found the solution:
Change
https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/sql/updates/mysql/3.5.0-2015-07-01.sql#L86
to
ALTER TABLE
#__menuMODIFY
aliasvarchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT 'The SEF alias of the menu item.';
fcb6d90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that may be the problem, i.e., the lack of default.
fcb6d90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks more like a hack than a fix to me. Taken at a global context, it implies that menu data would be OK without an alias set. Then again, honestly the SQL schema is in terrible shape globally and the application has far too many dependencies on the data that gets inserted during installation, but fixing that is something far beyond scope here.
fcb6d90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is I need to set the index's of the alias's to be max 100 chars then it doesn't exist 767