Bug #5681 Fetching time fields as SQL_C_TIME or SQL_C_TYPE_TIME is broken
Submitted: 21 Sep 2004 11:39 Modified: 9 Jun 2005 18:15
Reporter: Yury Sidorov Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51.09 OS:Microsoft Windows (Windows 2000)
Assigned to: Bugs System CPU Architecture:Any

[21 Sep 2004 11:39] Yury Sidorov
Description:
Fetching time fields as SQL_C_TIME or SQL_C_TYPE_TIME is broken in 3.51.09 release. The driver returns 00:00:00 or NULLS. 

3.51.06 driver works fine.

How to repeat:
Bind time column as SQL_C_TIME or SQL_C_TYPE_TIME and fetch data.
[21 Sep 2004 11:41] Yury Sidorov
Forgot to specify bug's severity and priority.
[14 Oct 2004 0:36] Bill Dargel
I submitted:  http://lists.mysql.com/myodbc/9515 -- to the myodbc mailing list before learning of this bug-tracking database.

I ran into the same issue, though on linux 2.2.20. The above link has a code change that I made to the 3.51.09 driver that seems to be taking care of the problem for me.
[17 Nov 2004 10:06] Julia Range
Same problem here with 3.51.10. I use ColdFusion and MySQL. When I use the 3.51.06 its working fine when I read a time-column. all newer drivers returns "00:00:00" or empty string.

When will this bug be fixed? Anybody know?
[22 Nov 2004 1:38] Luke Arms
Same problem here. With MySQL 4.1's new authentication scheme, using MyODBC 3.51.06 is not an option. Neither is building from source. Have spent many hours trying to establish the cause of this problem, now there is no fix and the bug has been open since September. Please provide an estimated resolution time or a workaround I can implement in .NET. Thanks.
[6 Jan 2005 14:22] Aleksey Kishkin
not only for windows. I attached test case. 

one must create table before using this test case:

create table aa (t time);
insert into aa values (now());
[6 Jan 2005 14:23] Aleksey Kishkin
testcase.  if it returs 0 : 0, bug is present.

Attachment: odbc.c (text/x-csrc), 4.01 KiB.

[20 Feb 2005 13:20] Neal Hudson
I have come across this problem with MyODBC version 3.51.11

Is there any progress / workaround available? (Other than setting up a new table and doing a Data Conversion)
[8 Mar 2005 10:35] Neal Hudson
Can I please have an update on this bug, as it is preventing me from moving forward from version 4.0 of MySQL
Thanks,
Neal

neal.hudson@o2.ie
[17 Mar 2005 11:58] Sledge Hammer
Same problem here -- Windows 2003 Server Standart Ed. MySQL 4.1.10 MyODBC 3.51.11.
Please, somebody fix it, because we can't move on with our huge project, which uses MySQL; and we would have to put a bunch of limitations into user's manuals. Or downgrade their MySQLs or ask them to install older (4.0) next to their working 4.1s.. Along with MyODBCs..
Very many upset faces..
[24 Mar 2005 15:49] Vasily Kishkin
I found a reason and sent patch for review.
[27 Mar 2005 12:31] Willem van Schalkwyk
Same problem.  MySQL 4.1.7, ODBC versions 3.51.07 and up.  Time fields read as '00:00:00'.  How will we be advised when this patch becomes available?

It is real urgent!

Willem van Schalkwyk
[29 Mar 2005 13:53] Sledge Hammer
Really really really URGENT! ASAP...
Anyone could release a patch/fix/update the sooner the better? Please?
[30 Mar 2005 14:59] Vasily Kishkin
The bug was found. Patch was sent for approval.
[31 Mar 2005 14:15] Neal Hudson
Thanks Vasily,

Do you know how long it takes for Approval?

Also, after the patch is Approved, does it get added to the current release version / previous versions, or put into the next release?

Thanks again
[31 Mar 2005 14:41] Vasily Kishkin
I fixed bug and attached new myodbc.dll. 

Yury:Can you test this dll file on your computer ? I want to be sure that I fixed it right. If all is ok I'll  insert this changes in distributive.

Thanks !
[25 Apr 2005 9:21] Bertrand Messager
Thank you for your work on that issue.
That is really important for many partners and Customers.
Is there a way to get this fix available into the next ODBC connector, 3.51.12? Do you know the plan?
Regards,
Bertrand
[26 Apr 2005 10:42] Neal Hudson
Do we have any update on this issue?

Also, do you know when would the fix be included in the next Windows version of MyODBC?
[26 Apr 2005 14:15] Taras Bredel
Could you please mail the dll to me instead of the c-file, so I wouldn't have to compile it  ?

Thanx!

ttb@bluefish.dk
[6 May 2005 7:51] Bogdan Degtyariov
I'll look into this bug in a short time. The fix will be available as soon as possible.
[7 May 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[8 May 2005 7:22] Yury Sidorov
Vasily Kishkin fixed this bug and I tested a fixed version of driver. But Vasily did not post current status here.
[9 May 2005 8:36] Stefano Cavazzini
Fetching time fields as SQL_C_TIME or SQL_C_TYPE_TIME is broken in 3.51.09, 3.51.10. 3.51.11 and MySQL 4.1.x
release. The driver returns 00:00:00 or NULLS. 

MySQL 4.0.24 and 3.51.06 driver works fine.
[16 May 2005 14:28] Sledge Hammer
Could you force the release of myodbc 3.51.12? Or at least make a quick-beta?.. This delay is killing all our sales process and users moods..
[9 Jun 2005 18:15] Mark Matthews
3.51.12 with this bugfix is in testing and will be shipped soon.

If you'd be willing to test before release, please download and install from here:

ftp://ftp.mysql.com/pub/mysql/hidden/connectors/odbc/3.51.12/MyODBC-3.51.12-win32.exe

And report success/failure back to this bug report.
[11 Jul 2005 18:04] B.J. Nolletti
Had this problem with v3.51.11.  Just tried installing 3.51.12 and it is fixed.  (I'm using ADO2.5 in VB6)
[12 Jul 2005 5:27] Stefano Cavazzini
I use Ado 2.8 and VB6, with Connector/ODBC 3.51.12 it is fixed.
[28 Sep 2005 8:13] Anthony Johnston
Fix works for me too.

H'Ray,  Ant
[27 Oct 2005 14:21] Peter Marbler
With the following constellation I still get the wrong time:
MySQL 4.0.18
MyODBC 3.51.12
Office Access 2003 SP1

Kind regards, Peter