Welcome Guest, Not a member yet? Register   Sign In
MySQLi and SSL connections
#5

(02-16-2016, 02:38 PM)Narf Wrote: I don't understand how you've come to the conclusion that the referenced documentation talks about the server as opposed to the client. I very intentionally bolded the word "client" when quoting the document, exactly so that we avoid such confusion.

And if you're not disputing that it is in fact the client that makes the fallback, then how does that even make sense? Would the client check the server version before proceeding with the fallback? That would be completely illogical and therefore I won't believe that until I see it. Smile

I'm not disputing that the documentation and behavior is based on the client. I'm disputing the version number referenced in both the documentation and the code. In fact, I am also now in complete agreement with you on the fact that my initial code "fix" will not work correctly.

(02-16-2016, 02:38 PM)Narf Wrote: I think you are incorrectly equating libmysqlclient to Connector/C, but I could see mysqlnd messing things up (it's always been a special case for PHP) and sure - we could do something about that. But checking the server version isn't that something. Smile

I would be more than happy to use some other reference for version numbers for libmysqlclient. Unfortunately, the documentation for Connector/C is the only thing I have found, so far, that details the behavior of libmysqlclient.

As stated here: https://dev.mysql.com/doc/refman/5.7/en/...tions.html
Connector/C distributions include libmysqlclient. (Note: the MySQL PHP API documentation linked from that page is more or less a copy of the PHP mysqlnd documentation.)

As stated in the previous link, the version number returned by client_info in the MySQL Server distribution of libmysqlclient is the same number as the version of the server with which it was distributed. The version number returned by client_info in the Connector/C distribution is the version of the client, which is a higher number than the version of the server with which the same code was distributed.

For this particular check, the problem will only really occur on mysqlnd, though that will mostly likely become the more commonly-used client over time. If there is ever a need to check the client version for some feature introduced in a server version higher than 5.7.3, checking client_info will be more problematic, as libmysqlclient will require a check against two different version numbers and mysqlnd will require a check against a third version number. The whole problem is made worse by the fact that most of the documentation references either the server version or the PHP version (the latter being the case primarily for mysqlnd), while documentation of the actual client versions is rather sparse.
Reply


Messages In This Thread
MySQLi and SSL connections - by mwhitney - 02-15-2016, 02:15 PM
RE: MySQLi and SSL connections - by Narf - 02-15-2016, 03:54 PM
RE: MySQLi and SSL connections - by mwhitney - 02-16-2016, 01:53 PM
RE: MySQLi and SSL connections - by Narf - 02-16-2016, 02:38 PM
RE: MySQLi and SSL connections - by mwhitney - 02-16-2016, 03:20 PM
RE: MySQLi and SSL connections - by mwhitney - 02-26-2016, 10:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB