[wp-trac] [WordPress Trac] #41716: Check for utf8mb4 incorrectly assumes auto-truncating indexes
WordPress Trac
noreply at wordpress.org
Mon Oct 9 13:34:10 UTC 2017
#41716: Check for utf8mb4 incorrectly assumes auto-truncating indexes
--------------------------+-----------------------
Reporter: straussd | Owner: pento
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.9
Component: Database | Version: 4.2
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+-----------------------
Comment (by danielbachhuber):
@pento When running 41716.diff on Pantheon, I see this error in the test
log:
{{{
<div id="error"><p class="wpdberror"><strong>WordPress database
error:</strong> [Index column size too large. The maximum column size is
767 bytes.]<br /><code>
CREATE TABLE wptests__test_truncated_index (
a varchar(255) COLLATE utf8mb4_unicode_ci,
KEY a_key (a)
) ENGINE=InnoDB
ROW_FORMAT=COMPACT</code></p></div>
}}}
And this test failure:
{{{
1) Tests_dbDelta::test_truncated_index
Failed asserting that Array &0 (
'wptests__test_truncated_index' => 'Created table
wptests__test_truncated_index'
) is identical to Array &0 ().
}}}
I see the same test failure when running the test locally.
{{{
$ mysql --version
mysql Ver 15.1 Distrib 10.2.8-MariaDB, for osx10.12 (x86_64) using
readline 5.1
}}}
My understanding is that the table **is not** being created when the index
column size is too large. Subsequently, dbDelta reports the table needs to
be created when the test expects the table is already created.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41716#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list