[Phpmyadmin-devel] Bug #2983056 patch proposal

Marc Delisle marc at infomarc.info
Fri Apr 9 16:21:29 CEST 2010


Edouard SWIAC a écrit :
> Hi,
> 
> Bug is : https://sourceforge.net/tracker/?func=detail&aid=2983056&group_id=23067&atid=377408
> 
> At first I didn't achieve to reproduce the situation, no warning appeared even with error handler activated. Then, after switching from PHP 5.2 to PHP 5.3, the warning appeared, so it's a PHP 5.3 bug only. I think the PMA demo server is running PHP 5.3.
> 
> This not the best fix, though. It would be better to fix the sysvar type at the source in StorageEngine::getVariablesStatus() I think. 
> But when fetching results from the "SHOW GLOBAL VARIABLES" query (line 232), which returns only sysvar names and values, a type is assigned only if the sysvar hasn't one (line #247) and set to PMA_ENGINE_DETAILS_TYPE_PLAINTEXT (0).
> Elsewhere in the method, even in the whole file, I don't see where a type assignation is done. And it has to be done somewhere since a sysvar that emits the warning is set to ON and has a PMA_ENGINE_DETAILS_TYPE_NUMERIC (2) type, which is incorrect and should be PMA_ENGINE_DETAILS_TYPE_BOOLEAN (3).
> 
> Maybe PMA guys can highlight me on that =)
> 
> Thanks
> Edouard

Edouard,

in StorageEngine.class.php, the comment for getVariables() says that 
this function is overridden when extending this class for a particular 
engine.

So the type comes from libraries/engines/innodb.lib.php in getVariables().

-- 
Marc Delisle
http://infomarc.info




More information about the Developers mailing list