PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 29, 2022

[FIXED] PhpMyAdmin displays SUBTIME() output as hexadecimal dump

 January 29, 2022     mysql, phpmyadmin     No comments   

Issue

When I execute the example from http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_subtime I don't get the answer in the format shown there. This is the example:

mysql> SELECT SUBTIME('2007-12-31 23:59:59.999999','1 1:1:1.000002');
        -> '2007-12-30 22:58:58.999997'

But the answer I get is:

323030372d31322d33302032323a35383a35382e393939393937

If you remove every second letter from that answer you get

2007d12d30022a58a58e999997

...which is almost the expected string. Maybe the conversion from some internal format to the actual representation goes somehow wrong?

I used PhpMyAdmin to execute the SELECT on my provider's web server. With PhpMyAdmin on my local machine it works correctly, i.e. as shown in the MySQL docs.

EDIT: The answer I get is actually the string representation of the hexadecimal character values of the DATETIME string, see http://www.asciitable.com/. But I still don't know how that happens.


Solution

I believe the issue you're talking about is this one: https://github.com/phpmyadmin/phpmyadmin/issues/6321 which will be fixed in version 4.6.0. I've just tested with the pre-release version of 4.6.0 and it looks correct, so I suggest upgrading once 4.6.0 comes available.



Answered By - Isaac Bennetch
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing