WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#34692 closed defect (bug) (fixed)

Unknown system variable storage_engine when running tests in MySQL 5.7

Reported by: jeremyfelt Owned by: pento
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

The MySQL system variable storage_engine was removed in 5.7 after being deprecated in 5.5. The following error is shown when running our tests with MySQL 5.7:

PHPUnit_Framework_Exception: WordPress database error Unknown system variable 'storage_engine' for query SET storage_engine = INNODB

It looks like we should be able to convert our use to default_storage_engine when setting up WordPress for unit tests.

Related #30462

Attachments (2)

34692.diff (512 bytes) - added by jeremyfelt 4 years ago.
34692.2.diff (640 bytes) - added by skithund 4 years ago.

Download all attachments as: .zip

Change History (10)

@jeremyfelt
4 years ago

#1 @pento
4 years ago

default_storage_engine was added in MySQL 5.5.3, so this will fail on older MySQL versions.

Last edited 4 years ago by pento (previous) (diff)

#2 @Collizo4sky
4 years ago

Got this same error today. Note: am using Laravel Homestead with MySQL 5.7.9.

How do i solve this problem?

#3 @skithund
4 years ago

Got hit by this today. Revised patch checks MySQL version.

@skithund
4 years ago

#4 @pento
4 years ago

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

In 36055:

Tests: Use the default_storage_engine MySQL option on newer MySQL versions.

In MySQL 5.5.3, storage_engine was deprecated in favour of default_storage_engine, and subsequently removed in MySQL 5.7. To avoid errors when running tests on MySQL 5.7, we need to switch between the options based on MySQL version.

Props skithund, jeremyfelt.

Fixes #34692.

#5 @pento
4 years ago

  • Milestone changed from Future Release to 4.5

#6 @jorbin
4 years ago

@pento If this is backported to 4.4.1, would that mean 4.4.1 would completely support MySQL 5.7?

#7 @pento
4 years ago

4.4 already supports MySQL 5.7, it's just that the tests don't run.

This is not a regression in 4.4, but it is a fairly small change, so I have no strong feelings either way about backporting it to 4.4.1.

#8 @jorbin
4 years ago

Cool beans.

Note: See TracTickets for help on using tickets.