Make WordPress Core

#64005 closed defect (bug) (fixed)

Cast the Non_unique to a string before checking it

Reported by: tsteel Owned by: SergeyBiryukov
Priority: normal Milestone: 6.9
Component: Database Version: 6.8.2
Severity: major Keywords:
Cc: Focuses:

Description

We're piping our queries through Doctrine DBAL which casts Non_unique to an integer (which it should be). However, when the dbDelta function runs it specifically checks for a string and it fails.

Change History (4)

This ticket was mentioned in PR #9954 on WordPress/wordpress-develop by trsteel88.


10 months ago
#1

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/64005#ticket

This change ensures the Non_unique is always cast to the type expected (string)

#3 @SergeyBiryukov
10 months ago

  • Component GeneralDatabase
  • Milestone Awaiting Review6.9
  • Owner set to SergeyBiryukov
  • Status newaccepted

#4 @SergeyBiryukov
10 months ago

  • Resolutionfixed
  • Status acceptedclosed

In 60784:

Database: Ensure Non_unique index value is compared as a string in dbDelta().

Follow-up to [1575], [58994].

Props tsteel.
Fixes #64005.

Note: See TracTickets for help on using tickets.