zabbarob February 2016

PhpMyAdmin displays SUBTIME() output as hexadecimal dump

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.

Answers


Isaac Bennetch February 2016

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.

Post Status

Asked in February 2016
Viewed 1,721 times
Voted 10
Answered 1 times

Search




Leave an answer