MIN and MAX returning odd values in MySQL 5.5

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cbrann
Posts: 2
Joined: Mon 09 Apr 2018 20:19

MIN and MAX returning odd values in MySQL 5.5

Post by cbrann » Mon 09 Apr 2018 20:27

Hi,
I am currently using MyDAC 9.0.1 with Delphi 10.2 - get that cleared up.

We've come across an odd issue with MyDAC and MySQL 5.5. When running the below query, we get an 'odd' result:

Code: Select all

select min(starttime) as starttime, max(endtime) as endtime from tbl;
While this should return '8:00:00 AM' and '10:00:00 PM', I am consistently seeing '8:34:12 AM' and '10:16:04 PM'.

When run as two separate queries, I am seeing '8:07:05 AM' and '10:27:30 PM'.

Both fields in question are 'time' fields.

Has anyone seen this before? Do we know if the update to 9.1 fixes this?

So you are aware, this does NOT happen against a MySQL 5.7 database; it also does not happen with the FireDAC components.

I built a small app to connect using FireDAC, then MyDAC and run the same queries against the same database and FireDAC returns the expected results, only MyDAC seems to be returning the incorrect values.

Any help will be greatly appreciated!

ViktorV
Devart Team
Posts: 2160
Joined: Wed 30 Jul 2014 07:16

Re: MIN and MAX returning odd values in MySQL 5.5

Post by ViktorV » Tue 10 Apr 2018 09:11

Unfortunately, we cannot reproduce the issue on the latest version MyDAC 9.1.5.
Please check whether the problem occurs on the latest version MyDAC 9.1.5 and if yes, to investigate the specified MyDAC behavior, please compose a small sample demonstrating the issue of test access to your server and send it to us via e-support form: https://www.devart.com/company/contactform.html, including database objects creating scripts.

cbrann
Posts: 2
Joined: Mon 09 Apr 2018 20:19

Re: MIN and MAX returning odd values in MySQL 5.5

Post by cbrann » Tue 10 Apr 2018 18:08

Tried to install the 9.1.5 trial - but it gave me issues with having '0 days left in the 60 day trial' - fearing that this may give a false negative (because the issue persisted), I have sent in a support ticket.

ViktorV
Devart Team
Posts: 2160
Joined: Wed 30 Jul 2014 07:16

Re: MIN and MAX returning odd values in MySQL 5.5

Post by ViktorV » Wed 11 Apr 2018 15:34

When testing, we could not reproduce the issue on the latest version MyDAC 9.1.5 and reproduce the issue on the MyDAC 9.0.1. To solve the task, you should use the latest version MyDAC 9.1.5.

Post Reply