[wp-trac] [WordPress Trac] #51740: Test failures using MySQL 8

WordPress Trac noreply at wordpress.org
Mon Aug 15 13:55:56 UTC 2022


#51740: Test failures using MySQL 8
--------------------------+-----------------------------
 Reporter:  desrosj       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Database      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Some more context on the remaining three failures:
 {{{
 2) Tests_Meta_Query::test_meta_type_key_should_be_passed_to_meta_query
 Failed asserting that two arrays are identical.
 --- Expected
 +++ Actual
 @@ @@
 -Array &0 (
 -    0 => 1424
 -)
 +Array &0 ()

 /var/www/tests/phpunit/includes/abstract-testcase.php:704
 /var/www/tests/phpunit/tests/meta/query.php:775
 }}}
 caused by:
 {{{
 WordPress database error Character set 'utf8mb4_unicode_520_ci' cannot be
 used in conjunction with 'binary' in call to regexp_like. for query
                         SELECT SQL_CALC_FOUND_ROWS  wptests_posts.ID
                         FROM wptests_posts  INNER JOIN wptests_postmeta ON
 ( wptests_posts.ID = wptests_postmeta.post_id )
                         WHERE 1=1  AND (
   wptests_postmeta.meta_key REGEXP BINARY 'AAA_FOO_.*'
 ) AND ((wptests_posts.post_type = 'post' AND (wptests_posts.post_status =
 'publish')))
                         GROUP BY wptests_posts.ID
                         ORDER BY wptests_posts.post_date DESC
                         LIMIT 0, 10
 }}}

 ----

 {{{
 3) Tests_Query_MetaQuery::test_compare_key_regexp_rlike
 Failed asserting that two arrays are identical.
 --- Expected
 +++ Actual
 @@ @@
 -Array &0 (
 -    0 => 36059
 -)
 +Array &0 ()

 /var/www/tests/phpunit/includes/abstract-testcase.php:704
 /var/www/tests/phpunit/tests/query/metaQuery.php:2126
 }}}
 caused by:
 {{{
 WordPress database error Character set 'utf8mb4_unicode_520_ci' cannot be
 used in conjunction with 'binary' in call to regexp_like. for query
                         SELECT SQL_CALC_FOUND_ROWS  wptests_posts.ID
                         FROM wptests_posts  INNER JOIN wptests_postmeta ON
 ( wptests_posts.ID = wptests_postmeta.post_id )
                         WHERE 1=1  AND (
   wptests_postmeta.meta_key RLIKE BINARY 'AAA_FOO_.*'
 ) AND ((wptests_posts.post_type = 'post' AND (wptests_posts.post_status =
 'publish')))
                         GROUP BY wptests_posts.ID
                         ORDER BY wptests_posts.post_date DESC
                         LIMIT 0, 10
 }}}

 ----

 {{{
 4) Tests_Query_MetaQuery::test_compare_key_not_regexp
 Failed asserting that two arrays are identical.
 --- Expected
 +++ Actual
 @@ @@
 -Array &0 (
 -    0 => 36063
 -    1 => 36064
 -)
 +Array &0 ()

 /var/www/tests/phpunit/includes/abstract-testcase.php:704
 /var/www/tests/phpunit/tests/query/metaQuery.php:2169
 }}}
 caused by:
 {{{
 WordPress database error Character set 'utf8mb4_unicode_520_ci' cannot be
 used in conjunction with 'binary' in call to regexp_like. for query
                         SELECT SQL_CALC_FOUND_ROWS  wptests_posts.ID
                         FROM wptests_posts  INNER JOIN wptests_postmeta ON
 ( wptests_posts.ID = wptests_postmeta.post_id )
                         WHERE 1=1  AND (
   NOT EXISTS (SELECT 1 FROM wptests_postmeta mt1 WHERE mt1.post_ID =
 wptests_postmeta.post_ID AND mt1.meta_key REGEXP BINARY 'AAA_FOO_.*' LIMIT
 1)
 ) AND ((wptests_posts.post_type = 'post' AND (wptests_posts.post_status =
 'publish')))
                         GROUP BY wptests_posts.ID
                         ORDER BY wptests_posts.post_date DESC
                         LIMIT 0, 10
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51740#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list