[teiid-issues] [JBoss JIRA] Commented: (TEIID-934) MySql Queries - SQL syntax error on pushdown queries when using functions like LPAD, REPLACE, etc

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Thu Jan 21 10:05:19 EST 2010


    [ https://jira.jboss.org/jira/browse/TEIID-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12507522#action_12507522 ] 

Steven Hawkins commented on TEIID-934:
--------------------------------------

The char function on integer values greater than 255 is a problem in MySql 5.0.15 and later, since it returns a byte sequence.


> MySql Queries - SQL syntax error on pushdown queries when using functions like LPAD, REPLACE, etc
> -------------------------------------------------------------------------------------------------
>
>                 Key: TEIID-934
>                 URL: https://jira.jboss.org/jira/browse/TEIID-934
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 7.0
>            Reporter: Warren Gibson
>            Assignee: Steven Hawkins
>             Fix For: 7.0
>
>
> Several CTC queries are failing in MySql when they are pushed down to the source.   See query example and resulting SQL error below:
> SELECT INTKEY, LPAD(TIMESTAMPVALUE, 18) FROM BQT1.SmallA ORDER BY INTKEY
> Error Code:1064 Message:Error Code:1064 Message:Error occurred on connector MySQL_Push<5> - Error Code:1064 Message:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AS c_1 FROM smalla AS g_0 ORDER BY c_0' at line 1 Executing statement: [SQL: SELECT cast(g_0.INTKEY AS signed) AS c_0, LPAD(date_format(g_0.TIMESTAMPVALUE, '%Y-%m-%d %H:%i:%S.%f'), 18) AS c_1 FROM smalla AS g_0 ORDER BY c_0]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list