[wp-trac] [WordPress Trac] #32090: Bug: Can not update tables in non-wordpress-installation databases when the query contains non ASCII characters

WordPress Trac noreply at wordpress.org
Wed May 6 05:09:50 UTC 2015


#32090: Bug: Can not update tables in non-wordpress-installation databases when the
query contains non ASCII characters
--------------------------+-----------------------
 Reporter:  willstedt     |       Owner:  pento
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.2.2
Component:  Database      |     Version:  4.1.2
 Severity:  normal        |  Resolution:
 Keywords:  fixed-major   |     Focuses:
--------------------------+-----------------------
Changes (by pento):

 * keywords:  has-patch => fixed-major
 * owner:   => pento
 * status:  new => assigned


Comment:

 Hey @willstedt, sorry I didn't get to work through this patch with you -
 we're aiming for 4.2.2 to be released in the next day or two, so I needed
 to get it committed.

 Anyway, I have some feedback on your initial patch, if you're interested:

 * We can't use inline functions, as WordPress still supports PHP 5.2.
 * When searching for the table name, your patch was looking for any UTF-8
 character, where MySQL only allows 1 and 2 byte UTF-8 characters.
 * The `/u` modifier is quite slow. Unless we absolutely have to, it's good
 to avoid using it in functions that need to be fast.
 * No unit tests.

 That said, it was a great first pass, it put me in the right direction to
 getting it fixed. Thanks for the contribution, I hope to see you sticking
 around! :-)

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


More information about the wp-trac mailing list