[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:48:32 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:
--------------------------+-----------------------

Comment (by willstedt):

 Replying to [comment:15 pento]:
 > 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! :-)

 Thanks for your feedback - I am glad you cut me some slack as this is the
 first time ever I contribute to an open source project :)

 I know I made it a bit more tolerant than the actual MySql spec, but I
 thought that didn't matter as that particular function is built to
 retrieve the table name and not verify the SQL. But I am happy you are
 trying to get the code to be perfect :)

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


More information about the wp-trac mailing list