Bug #4465 Date_Add + Date_Format in MyODBC 3.51.008
Submitted: 8 Jul 2004 15:58 Modified: 28 Jul 2004 23:08
Reporter: Hergen F. Meyer Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51.008 / 4.1.3 OS:Microsoft Windows (Windows)
Assigned to: Assigned Account CPU Architecture:Any

[8 Jul 2004 15:58] Hergen F. Meyer
Description:
Hi, first - english not my natural language ....

summary windows client and server: 
very complex SQL works fine with 4.1.2 and (3.51.006 or /bin/mysql)
statement didn't work with 4.1.3 and (3.51.007 or 3.51.008)
works with 4.1.3 and (3.51.006 or /bin/mysql)

summary windows client and linux server: 
very complex SQL works fine with 4.1.2 cl. and 4.1.1 sv. and (3.51.006 or /bin/mysql)
statement didn't work with 4.1.3 cl and 4.1.1 sv. and (3.51.007 or 3.51.008)
works with 4.1.3 cl. and 4.1.1 sv. and (3.51.006 or /bin/mysql)

How to repeat:
difficult - without database - dumpfile request ?
sql in attached files
-----------------------------------------
Error 1: DATE_ADD(concat(Year(V1.ursprungsbeginn),'-',Month(V1.ursprungsbeginn),'-01'), INTERVAL N1.number_id MONTH) as blup,
=> this column's data type(blup) requires the use of an embedded SQL Statement

Error 2: DATE_FORMAT(PBM1.abrechnung_von,"%Y-%m-%d") as hihi,
=> this column's data type(hihi) requires the use of an embedded SQL Statement

Error 3:  @cc_faellig_am:=Date_Format(CASE AP1.provision_ap_faelligkeit_id 
WHEN 1 THEN @cc_vertragsabschluss 
WHEN 2 THEN @cc_vertragsbeginn 
WHEN 3 THEN @cc_vertragbezahlt 
ELSE '2099-12-31'
END,"%Y-%m-%d") as cc_faellig_am,
=> this column's data type(cc_faellig_am) requires the use of an embedded SQL Statement

where in left outer join didn't as expected - wrong count of rows 
Error4: and DATE_FORMAT(PBM1.abrechnung_von,"%Y-%m-%d") = DATE_ADD(concat(Year(V1.ursprungsbeginn),'-',Month(V1.ursprungsbeginn),'-01'), INTERVAL N1.number_id MONTH)
=> cause expression won't be true in 3.51.008

Error 1,2,3,4 with Windows 4.1.3 client/server + Odbc 3.5.1.008
Error 1,2,4 with Windows 4.1.3 client/ Linux Server 4.1.1 server  + Odbc 3.5.1.008

Error 1,2,3,4 not with Windows 4.1.3 client/server + Odbc 3.5.1.006
Error 1,2,3,4 not with Windows 4.1.2 client/server + Odbc 3.5.1.006
Error 3 not with Windows 4.1.3 client/ Linux Server 4.1.1 server  + Odbc 3.5.1.008

Suggested fix:
Date_Add and Date_format have problems in 3.51.007 or 3.51.008
[28 Jul 2004 23:08] Timothy Smith
Hello!  First, no need to apologize about your english - it is entirely legible, and we are very grateful for your bug report.

This bug should be fixed along with bug #4578.  Please download 3.51.9 when it is available, and let us know if you still have this problem after that.

Thank you,

Timothy