Hi!

On 9/5/11 2:49 AM, Ulf Wendel wrote:
Returning a relevant value for stmt_num_rows() seems a valid feature
request that makes perfectly sense to me and is somewhat in line with
the vague non-PS documentation of the case.

It's not a good situation where mysqlnd and libmysql have different semantics and people are encouraged to rely on it (if you call it feature, you encourage people to use it, otherwise why call it feature?). It leads to code that works on mysqnd but not on libmysql, without any indication of it - you'll just install an app, and it would work on one server but not on the other, for unknown reason. But if you add it at least it should be clearly documented - both in the manual and in the tests - that this is a non-portable mysqnd-only semantics. And the tests should be changed accordingly, so libmysql won't fail.

To the end user the message is "undefined, do not rely on". Towards the
library implementor the message is "try to make libmysql become better
in the future, keep reasonable value in mysqlnd implementation meanwhile".

Do something like:

   if ($IS_MYSQLND)
      /* TO END USER: no promise on this assumption */
      ...

Please, do not drop the information of the difference by removal of the
assertion.

OK, please make the patch yourself, so it looks as you prefer.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to