[JBoss JIRA] Created: (TEIID-1630) XQT queries failing with: [TeiidProcessingException] 1054: Error Code:1054 Message:Source: Error Code:1054 Message:'Unknown column 'c_2' in 'order clause'
by Warren Gibson (JIRA)
XQT queries failing with: [TeiidProcessingException] 1054: Error Code:1054 Message:Source: Error Code:1054 Message:'Unknown column 'c_2' in 'order clause'
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Key: TEIID-1630
URL: https://issues.jboss.org/browse/TEIID-1630
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.5
Environment: Teiid 7.5-Alpha1
Reporter: Warren Gibson
Assignee: Steven Hawkins
The following 4 XQT queries are failing query testing in MySQL50 and Teradata. I suspect they are failing in all sources.
SELECT * FROM XQTDoc.defaultValueTestDocument ORDER BY XQTDoc.defaultValueTestDocument.defaultValueTest.wrapper.data,
XQTDoc.defaultValueTestDocument.defaultValueTest.wrapper.key
SELECT * FROM XQTDoc.defaultValueTestDocument ORDER BY XQTDoc.defaultValueTestDocument.defaultValueTest.wrapper.data
DESC,XQTDoc.defaultValueTestDocument.defaultValueTest.wrapper.key
SELECT * FROM XQTDoc.defaultValueTestDocument ORDER BY XQTDoc.defaultValueTestDocument.defaultValueTest.wrapper.key,
XQTDoc.defaultValueTestDocument.defaultValueTest.wrapper.data
SELECT * FROM XQTDoc.defaultValueTestDocument ORDER BY XQTDoc.defaultValueTestDocument.defaultValueTest.wrapper.key ASC,
XQTDoc.defaultValueTestDocument.defaultValueTest.wrapper.data DESC
2011-06-09 09:16:20,342 DEBUG [org.teiid.PROCESSOR] (Worker8_QueryProcessorQueue24551) Sending error to client 9G7rbfezeXon.0
[TeiidProcessingException] 1054: Error Code:1054 Message:Source: Error Code:1054 Message:'Unknown column 'c_2' in 'order clause'' error executing statement(s): [Prepared Values: [] SQL: SELECT cast(g_1.INTNUM AS signed) AS c_0, cast(g_0.INTKEY AS signed) AS c_1 FROM smalla AS g_0, smallb AS g_1 WHERE cast(g_0.INTKEY AS signed) = cast(g_1.INTKEY AS signed) ORDER BY c_2, c_1]
1 [JDBCExecutionException] 1054: Error Code:1054 Message:'Unknown column 'c_2' in 'order clause'' error executing statement(s): [Prepared Values: [] SQL: SELECT cast(g_1.INTNUM AS signed) AS c_0, cast(g_0.INTKEY AS signed) AS c_1 FROM smalla AS g_0, smallb AS g_1 WHERE cast(g_0.INTKEY AS signed) = cast(g_1.INTKEY AS signed) ORDER BY c_2, c_1]
2 [MySQLSyntaxErrorException]Unknown column 'c_2' in 'order clause'
at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:414)
at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:241)
at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:262)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:275)
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:162)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:104)
at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:70)
at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:69)
at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:82)
at org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:91)
at org.teiid.query.processor.xml.RelationalPlanExecutor.execute(RelationalPlanExecutor.java:98)
at org.teiid.query.processor.xml.ExecSqlInstruction.process(ExecSqlInstruction.java:59)
at org.teiid.query.processor.xml.XMLPlan.nextBatch(XMLPlan.java:161)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:104)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:306)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:234)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:56)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:197)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:118)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:288)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: [JDBCExecutionException] 1054: Error Code:1054 Message:'Unknown column 'c_2' in 'order clause'' error executing statement(s): [Prepared Values: [] SQL: SELECT cast(g_1.INTNUM AS signed) AS c_0, cast(g_0.INTKEY AS signed) AS c_1 FROM smalla AS g_0, smallb AS g_1 WHERE cast(g_0.INTKEY AS signed) = cast(g_1.INTKEY AS signed) ORDER BY c_2, c_1]
1 [MySQLSyntaxErrorException]Unknown column 'c_2' in 'order clause'
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:90)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:264)
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:340)
at org.teiid.dqp.internal.process.DataTierTupleSource.access$000(DataTierTupleSource.java:82)
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:140)
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:137)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
... 6 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'c_2' in 'order clause'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:342)
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:86)
... 13 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] Created: (TEIID-1705) Encountered NPE in SQLStringVisitor for TIMESTAMPADD and TIMESTAMPDIFF
by Mark Drilling (JIRA)
Encountered NPE in SQLStringVisitor for TIMESTAMPADD and TIMESTAMPDIFF
----------------------------------------------------------------------
Key: TEIID-1705
URL: https://issues.jboss.org/browse/TEIID-1705
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.4
Reporter: Mark Drilling
Assignee: Steven Hawkins
I was using expression builder in Designer when I encountered this NPE.
java.lang.NullPointerException
at org.teiid.query.sql.visitor.SQLStringVisitor.visit(SQLStringVisitor.java:1280)
at org.teiid.query.sql.symbol.Function.acceptVisitor(Function.java:182)
at org.teiid.query.sql.visitor.SQLStringVisitor.getSQLString(SQLStringVisitor.java:164)
at com.metamatrix.query.internal.ui.builder.util.LanguageObjectLabelProvider.getText(LanguageObjectLabelProvider.java:129)
I think the visit method for FUNCTION in SQLStringVisitor just needs to do a null check on the first arg. I'm attaching a code patch.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] Created: (TEIID-1764) Hibernate Month Date Extraction
by Andrew Block (JIRA)
Hibernate Month Date Extraction
-------------------------------
Key: TEIID-1764
URL: https://issues.jboss.org/browse/TEIID-1764
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.1.1
Reporter: Andrew Block
Assignee: Steven Hawkins
When using teiid-hibernate-dialect-7.1.1.GA, the TeiidDialect does not include a function to get the month value of a date object. It includes functions to get other date attributes (year, dayofmonth etc). Without a defined function, attempting to get a month value falls back on the hibernate-core function which attempts to utilize an extract method which is not supported in 7.1.1.
Being able to obtain a month value from a date is a critical requirement.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] Created: (TEIID-1747) hasROLE(rolename) function always returns false
by Paul Nittel (JIRA)
hasROLE(rolename) function always returns false
-----------------------------------------------
Key: TEIID-1747
URL: https://issues.jboss.org/browse/TEIID-1747
Project: Teiid
Issue Type: Bug
Components: Query Engine
Environment: Fedora 14, SOA-P 5.2 ER3
Reporter: Paul Nittel
Assignee: Steven Hawkins
Given teiid-security-roles.properties contains user=NoRolesRole and the VDB in use has data roles defined, when logged into Teiid as user, the following SQL should return true.
SELECT hasROLE('NoRolesRole')
However, it always--AFAICT--returns false.
(Roles are working for this VDB as this user is not able to query certain tables.)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] Created: (TEIID-1732) Native PG Connector does not pass back errors to client
by Graeme Gillies (JIRA)
Native PG Connector does not pass back errors to client
-------------------------------------------------------
Key: TEIID-1732
URL: https://issues.jboss.org/browse/TEIID-1732
Project: Teiid
Issue Type: Bug
Affects Versions: 7.5
Environment: Red Hat Enterprise Linux Server release 5.7 (Tikanga)
JBoss EAP 5.1.1
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.8) (rhel-1.22.1.9.8.el5_6-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
Reporter: Graeme Gillies
Assignee: Steven Hawkins
Hi,
When we have people connecting to the native postgres emulation component of teiid (port 35432) using say, perl, or python, they can connect and query stuff fine, but if they give it a bad query (for exammple, the statement "selectx * from table.name") we see an error in the server side long saying the syntax is incorrect, but this error is never passed back to the client. The client just sits there waiting for a response that never comes.
Can we please have any and all errors returned back to the client correctly?
Thanks,
Graeme
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] Created: (TEIID-1738) Temp table permissions can be confusing
by Steven Hawkins (JIRA)
Temp table permissions can be confusing
---------------------------------------
Key: TEIID-1738
URL: https://issues.jboss.org/browse/TEIID-1738
Project: Teiid
Issue Type: Quality Risk
Components: Query Engine
Affects Versions: 7.4
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 7.4.1, 7.6
The checking of temptable permissions currently returns the first non-null permission from the role set. This is different than the additive behavior of all other permissions. It means that setting a role to explicitly not be able to create temp tables may inappropriately deny a user from creating temp tables if a later role explicitly grants the permission.
The permission determination logic should be:
if any role allows
return allow
if any role doesn't allow
return not allowed
return the allowCreateTempTablesByDefault setting
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month