[squeak-dev] MySQL driver can't convert; I can't debug

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] MySQL driver can't convert; I can't debug

Tim Johnson
Hi,

Using latest Mysql-Driver from Package Universe on 3.10.2-7179, Mac  
Intel, vm 3.8.19beta1U.

Jdm's Mysql-Driver is trying to convert the SQL date value  
"0000-00-00" to a TimeStamp but fails.  The Date value in  
JdmFieldConverter>>toTimestamp:column: does not get set correctly --  
it becomes #nil.  TimeStamp then does not like being passed a nil value.

I am trying to debug but get a "Code simulation error" when I attempt  
to step "Through" (JdmDateHolder readFrom: stream) in  
JdmFieldConverter>>toTimestamp:column:.  The "Code simulation error"  
lists the top of the stack as "Project class>>spawnNewProcess".

Is there anything I can, or should, do?

Thanks,
Tim


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] MySQL driver can't convert; I can't debug

keith1y
Tim Johnson wrote:

> Hi,
>
> Using latest Mysql-Driver from Package Universe on 3.10.2-7179, Mac
> Intel, vm 3.8.19beta1U.
>
> Jdm's Mysql-Driver is trying to convert the SQL date value
> "0000-00-00" to a TimeStamp but fails.  The Date value in
> JdmFieldConverter>>toTimestamp:column: does not get set correctly --
> it becomes #nil.  TimeStamp then does not like being passed a nil value.
>
> I am trying to debug but get a "Code simulation error" when I attempt
> to step "Through" (JdmDateHolder readFrom: stream) in
> JdmFieldConverter>>toTimestamp:column:.  The "Code simulation error"
> lists the top of the stack as "Project class>>spawnNewProcess".
>
> Is there anything I can, or should, do?
>
> Thanks,
> Tim
First see if there is a more recent version from squeaksource.
http://www.squeaksource.com/MySQL I know it works I am using it every day.

cheers

Keith

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] MySQL driver can't convert; I can't debug

Tim Johnson

On Nov 6, 2008, at 10:19 PM, Keith Hodges wrote:

> First see if there is a more recent version from squeaksource.
> http://www.squeaksource.com/MySQL I know it works I am using it  
> every day.

Keith, thanks for the tip.  The SqueakSource version was indeed much  
newer than the Package Universes version.  And yes, all other parts of  
this MySQL code seems to work well.

However, this does not solve my problem.  JdmDateHolder or still  
returns #nil for a year value of '0000'.  I could not debug this  
because the debug fails.

I seem to have found the culprit, however.  It lies in  
JdmTimestampReader>>readMysqlDateFrom:

I would rather this method return 1970 or something for the year than  
nil, wouldn't you think that would be better?

Thanks,
Tim