ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vc_ace <vc_...@yahoo.com>
Subject Ibatis crashing MySQL when I use DATE_FORMAT
Date Sat, 09 Sep 2006 20:13:37 GMT

This is very strange but it appears as though Ibatis is crashing my MySql
instance when I use the DATE_FORMAT function in SQL.  Please note: it only
crashes when I use a format string that resolves to text like %a
(Abbreviated weekday name) , %b (Abbreviated month name).  The problem
doesn’t seem to exist for format strings that return numeric data.

<statement id="getEmailList"  resultClass="com.vc.domain.Email">
   		SELECT emailTrn.id, DATE_FORMAT(email.entryDate, '%a. %b %D - %h %i %p'
) as entryDateS, FROM email, emailTrn WHERE emailTrn.userId = 1 AND
emailTrn.emailId = email.id 

MySql: 4.1.21
Java: 1.5.0_08
Ibatis: 2.1.7
Connector/J: 3.1.13
Running using Struts

Please note: I had the same problem when I was using Ibatis 1.x.  I upgraded
to see if that resolved the problem.

1.	My application can hit the database
2.	I can hit all of my other SQL statements without problem or errors
3.	I’m not sure when this problem started but it does not happen when I run
MySql 4.1.18. Unfortunately not an option with my hosting provider.  So I’m
thinking there is a problem with Ibatis and this version of MySql.  

Any help or insight would be appreciated.  I’d provide my other Ibatis
configuration files but they don’t appear to be the problem.  I take the
DATE_FORMAT out and the problem goes away and data is properly returned to
my jsp.


View this message in context: http://www.nabble.com/Ibatis-crashing-MySQL-when-I-use-DATE_FORMAT-tf2245286.html#a6227542
Sent from the iBATIS - User - Java forum at Nabble.com.

View raw message