WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#33171 closed defect (bug) (fixed)

Unit test Tests_DB_Charset::test_strip_invalid_text fails with MariaDB 10.1

Reported by: netweb Owned by: boonebgorges
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Database Keywords: has-patch commit
Focuses: Cc:
PR Number:

Description

Tests_DB_Charset::test_strip_invalid_text

1) Tests_DB_Charset::test_strip_invalid_text with data set #41 (array(array('big5', 'a�@ba�@ba�@ba�@ba�@ba�@ba�@ba...@ba�@b', array('byte', 10))), array(array('big5', 'a�@ba�@ba', array('byte', 10))), 'big5_byte_length')
big5_byte_length
Failed asserting that Array &0 (
    0 => Array &1 (
        'charset' => 'big5'
        'value' => 'a�@ba�@ba?'
        'length' => Array &2 (
            'type' => 'byte'
            'length' => 10
        )
    )
) is identical to Array &0 (
    0 => Array &1 (
        'charset' => 'big5'
        'value' => 'a�@ba�@ba'
        'length' => Array &2 (
            'type' => 'byte'
            'length' => 10
        )
    )
).

https://core.trac.wordpress.org/browser/trunk/tests/phpunit/tests/db/charset.php#L349

Attachments (1)

33171.patch (1.3 KB) - added by ocean90 3 years ago.

Download all attachments as: .zip

Change History (12)

#1 @vdwijngaert
4 years ago

Can confirm, I am running MariaDB 10.1.9 and have the same problem. Anyone looking into this?

This ticket was mentioned in Slack in #core by pento. View the logs.


4 years ago

#3 @swissspidy
4 years ago

Still happening with 10.1.12. A bit annoying because I use MariaDB on my local machine and usually run the tests there when working on patches.

Is there something we can do about it on our side?

#4 @netweb
4 years ago

#36547 was marked as a duplicate.

#5 @onnimonni
4 years ago

I can also confirm this with with MariaDB version:

10.1.12-MariaDB-1~jessie

#6 @ocean90
3 years ago

Any objections for skipping this data set when running MariaDB?

#7 @pento
3 years ago

I'm inclined to just skip it. MariaDB have shown no interest in fixing it, I don't think it's possible for us to work around it, and we haven't had an reports of this behaviour causing problems on production sites.

#8 @boonebgorges
3 years ago

  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

Let's skip, with a reference back to this ticket for our future selves. I, for one, am tired of seeing this failure locally.

@ocean90
3 years ago

#9 @ocean90
3 years ago

  • Keywords has-patch added; needs-patch good-first-bug removed

33171.patch skips the failing data set if the MySQL version contains MariaDB.

#10 @pento
3 years ago

  • Keywords commit added
  • Milestone changed from Future Release to 4.7

:thumbsup:

#11 @boonebgorges
3 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 38843:

Tests: Skip strip_invalid_text() test for big5 charset on MariaDB.

MariaDB doesn't support the tested configuration.

Props ocean90.
Fixes #33171.

Note: See TracTickets for help on using tickets.