[wp-trac] [WordPress Trac] #48756: Missing support for VALUE() function in MariaDB >= 10.3?

WordPress Trac noreply at wordpress.org
Thu Nov 21 22:56:12 UTC 2019


#48756: Missing support for VALUE() function in MariaDB >= 10.3?
--------------------------+----------------------
 Reporter:  robertscheck  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Database      |     Version:  5.3
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Hi @robertscheck and welcome to Trac!

 Thankfully this doesn't really affect us, or most people by the look of
 it.

 As the [https://mariadb.com/kb/en/library/values-value/ MariaDB page
 reads]:
 > The VALUES() function can still be used even from MariaDB 10.3.3, but
 only in INSERT ... ON DUPLICATE KEY UPDATE statements; it's a syntax error
 otherwise.

 which is the case for the `wp-includes/taxonomy.php` and `wp-
 includes/options.php` instances.

 > `wp-includes/SimplePie`
 Can be ignored, as we don't use or expose it's MySQL caching component,
 but it should be reported upstream to them if it affect them differently.

 What the MariaDB change does is that it makes calling the `VALUES()`
 function outside of it's intended use-case as invalid.
 So for example, under MariaDB 10.2 the following would be an acceptable
 query.
 {{{
 SELECT id, VALUES(id) as will_return_null FROM wp_posts LIMIT 1;
 }}}
 Under 10.3.3 the above query will fail as `VALUES()` is used incorrectly,
 and you need to use `VALUE()` instead (But I really have no idea under
 what circumstances you'd ever actually use that - I'm sure it has an
 actual purpose though).

 As far as I can tell, no further action is required by WordPress here, so
 I'm marking it as `invalid`. If I've misunderstood the ticket or MariaDB
 comments can still be added and/or the ticket re-opened.

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


More information about the wp-trac mailing list