[JBoss JIRA] (TEIID-4283) External Materialization interleaving loads SYSADMIN.loadMatView
by Jan Stastny (JIRA)
Jan Stastny created TEIID-4283:
----------------------------------
Summary: External Materialization interleaving loads SYSADMIN.loadMatView
Key: TEIID-4283
URL: https://issues.jboss.org/browse/TEIID-4283
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.12.5
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Blocker
Attachments: jdg-log.txt
There is a possibility of two concurrent loads of single materialized view when using SYSADMIN.loadMatView function. I observed the issue while:
# Waiting for ttl-driven reload and in right time I triggered another load explicitly by invoking the loadMatView function.
# Invoking SYSADMIN.loadMatView function multiple times in quick succession.
The view definition:
{code:sql}
CREATE VIEW external_long_ttl (
customer_id integer NOT NULL,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE',
MATERIALIZED_TABLE 'Source.JSTASTNY.dv_matviews_mat_view',
"teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
"teiid_rel:MATVIEW_STATUS_TABLE" 'Source.JSTASTNY.dv_matviews_statustable',
"teiid_rel:ON_VDB_START_SCRIPT" 'MERGE INTO dv_matviews_check_table(id,vdb_create) SELECT id, vdb_create+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
"teiid_rel:ON_VDB_DROP_SCRIPT" 'MERGE INTO dv_matviews_check_table(id,vdb_drop) SELECT id, vdb_drop+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
"teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO dv_matviews_mat_view_stage(customer_id,total_amount) SELECT CONVERT(c.id,integer) AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM dv_matviews_customers c INNER JOIN dv_matviews_orders o ON c.id = o.customer_id GROUP BY c.id;',
"teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'exec Source.native(''truncate table ${db.table.prefix}dv_matviews_mat_view_stage'');MERGE INTO dv_matviews_check_table(id,before_load) SELECT id, before_load+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
"teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''RENAME TABLE ${db.table.prefix}dv_matviews_mat_view_stage TO ${db.table.prefix}dv_matviews_mat_view_temp'');exec Source.native(''RENAME TABLE ${db.table.prefix}dv_matviews_mat_view TO ${db.table.prefix}dv_matviews_mat_view_stage'');exec Source.native(''RENAME TABLE ${db.table.prefix}dv_matviews_mat_view_temp TO ${db.table.prefix}dv_matviews_mat_view'');MERGE INTO dv_matviews_check_table(id,after_load) SELECT id, after_load+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
"teiid_rel:MATVIEW_ONERROR_ACTION" 'WAIT',
"teiid_rel:MATVIEW_TTL" 20000)
AS SELECT CONVERT(c.id,integer) AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM dv_matviews_customers c INNER JOIN dv_matviews_orders o ON c.id = o.customer_id GROUP BY c.id;
{code}
Query to explicitly load the view:
{code:sql}
exec SYSADMIN.loadMatView(schemaName=>'View',viewname=>'external_long_ttl', invalidate=>'true')
{code}
I attached a log which starts with ttl-driven load, then the explicit load is performed. The issue noticed is in teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT , where primary and staging tables are being swapped. The second load (explicit) can't find the original table, as the ttl-driven load had already renamed it.
But this situation of two concurrent loads should never occur.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (TEIID-4280) NPE in RuleMergeVirtual when running a query with nested CTEs
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4280?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4280.
-----------------------------------
Resolution: Done
Addressed the inappropriate re-context logic so that groups retain their aliasing.
Also addressed that the planner was allowing with clauses to be nested in the pushdown query:
with x as (with ...
This is not valid for every source, especially Oracle so the safer approach is to pull up the nested with just like is done for subqueries.
> NPE in RuleMergeVirtual when running a query with nested CTEs
> -------------------------------------------------------------
>
> Key: TEIID-4280
> URL: https://issues.jboss.org/browse/TEIID-4280
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 9.1, 9.0.1
>
>
> I defined the following view, based on a table in PostgreSQL (pg.test_a):
> {code:sql}
> create view tv1 as
> WITH
> alias as (SELECT a from pg.test_a),
> alias2 as (select t2.a as a1, t1.a from alias t1 join (SELECT a from pg.test_a) t2 on t1.a=t2.a),
> alias3 as (select t2.a as a1, t1.a from alias t1 join alias2 t2 on t1.a=t2.a)
> SELECT alias3.a1 FROM alias2 join alias3 on alias3.a=alias2.a;
> {code}
> When I run this query:
> {code:sql}
> with
> CTE1 as (
> select a1 from (
> with CTE11 as (select a1 from views.tv1)
> select a1 from CTE11
> ) as SUBQ1),
> CTE2 as (
> select a1 from (
> with CTE21 as (select a1 from views.tv1)
> select a1 from CTE21
> ) as SUBQ2)
> select * from CTE1 as T1 join CTE2 as T2 on T1.a1=T2.a1
> {code}
> this exception is thrown:
> {code:sql}
> 16:36:34,749 ERROR [org.teiid.PROCESSOR] (Worker17_QueryProcessorQueue112) cMD3wCUrebvy TEIID30019 Unexpected exception for request cMD3wCUrebvy.34: java.lang.NullPointerException
> at org.teiid.query.optimizer.relational.rules.RuleMergeVirtual.doMerge(RuleMergeVirtual.java:218)
> at org.teiid.query.optimizer.relational.rules.RuleMergeVirtual.execute(RuleMergeVirtual.java:84)
> at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:870)
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:226)
> at org.teiid.query.optimizer.relational.RelationalPlanner.planWith(RelationalPlanner.java:361)
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:206)
> at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:445)
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:473)
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:655)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> The same error occurs using inline views too.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (TEIID-4280) NPE in RuleMergeVirtual when running a query with nested CTEs
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4280?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4280:
----------------------------------
Affects Version/s: 8.12
> NPE in RuleMergeVirtual when running a query with nested CTEs
> -------------------------------------------------------------
>
> Key: TEIID-4280
> URL: https://issues.jboss.org/browse/TEIID-4280
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 9.1, 9.0.1
>
>
> I defined the following view, based on a table in PostgreSQL (pg.test_a):
> {code:sql}
> create view tv1 as
> WITH
> alias as (SELECT a from pg.test_a),
> alias2 as (select t2.a as a1, t1.a from alias t1 join (SELECT a from pg.test_a) t2 on t1.a=t2.a),
> alias3 as (select t2.a as a1, t1.a from alias t1 join alias2 t2 on t1.a=t2.a)
> SELECT alias3.a1 FROM alias2 join alias3 on alias3.a=alias2.a;
> {code}
> When I run this query:
> {code:sql}
> with
> CTE1 as (
> select a1 from (
> with CTE11 as (select a1 from views.tv1)
> select a1 from CTE11
> ) as SUBQ1),
> CTE2 as (
> select a1 from (
> with CTE21 as (select a1 from views.tv1)
> select a1 from CTE21
> ) as SUBQ2)
> select * from CTE1 as T1 join CTE2 as T2 on T1.a1=T2.a1
> {code}
> this exception is thrown:
> {code:sql}
> 16:36:34,749 ERROR [org.teiid.PROCESSOR] (Worker17_QueryProcessorQueue112) cMD3wCUrebvy TEIID30019 Unexpected exception for request cMD3wCUrebvy.34: java.lang.NullPointerException
> at org.teiid.query.optimizer.relational.rules.RuleMergeVirtual.doMerge(RuleMergeVirtual.java:218)
> at org.teiid.query.optimizer.relational.rules.RuleMergeVirtual.execute(RuleMergeVirtual.java:84)
> at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:870)
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:226)
> at org.teiid.query.optimizer.relational.RelationalPlanner.planWith(RelationalPlanner.java:361)
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:206)
> at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:445)
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:473)
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:655)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> The same error occurs using inline views too.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (TEIID-4282) send and receive json to rest API from teiid
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4282?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4282:
---------------------------------------
This seems more like a forum posting rather than an issue. Can you be more explicit about what is not working? Or if you are just looking for pointers, then start a new forum topic.
> I am not able to send JSON query as part of request.
Can you provide an example of what you are doing?
> Here I am not able to create jsonObject, it is expecting DerivedColoumns
Are you creating a custom translator based upon the WS translator? Can you provide the code?
> Can you please suggest me how I can send JSON object as part of REST API request.Thanks for help.
To send JSON:
EXEC source.invokeHttp(action => 'POST',
request => jsonValue,
endpoint => 'http://host/processTEIIDJsonQueryReq')
where jsonValue is String, Blob, or Clob value of the json. You can use the JSON* Teiid functions to construct a JSON value.
> send and receive json to rest API from teiid
> --------------------------------------------
>
> Key: TEIID-4282
> URL: https://issues.jboss.org/browse/TEIID-4282
> Project: Teiid
> Issue Type: Bug
> Components: Embedded
> Affects Versions: 8.13.5
> Reporter: Surendhar T
> Assignee: Steven Hawkins
>
> Hi Steven/ Ramesh,
> We have an REST streaming api, which will excepts JSON as input and returns JSON as output.
> @POST
> @Consumes({MediaType.APPLICATION_JSON})
> @Produces({MediaType.APPLICATION_JSON})
> @Path("/processTEIIDJsonQueryReq")
> public Response processTEIIDJsonQueryReq(TEIIDJsonRequest Req) throws Exception{
>
>
> }
> We used existing WSExecutionFactory as translator to send/receive JSON Req as stream.
> I am not able to send JSON query as part of request. I followed below references
> https://docs.jboss.org/author/display/TEIID/Web+Services+Translator
> Here I am not able to create jsonObject, it is expecting DerivedColoumns
> https://issues.jboss.org/browse/TEIID-3016
> https://developer.jboss.org/thread/240453?start=0&tstart=0
> https://developer.jboss.org/thread/253551?start=0&tstart=0
> https://developer.jboss.org/message/923210#923210
>
> As some of links you and Ramesh mentioned about TEIID Designer(to see how procedure created), their is also I am not succeeded. invokeHTTP is the method I am using
> I am using below codes
> https://github.com/teiid/teiid-embedded-examples/tree/master/restservice-...
> https://github.com/teiid/teiid-embedded-examples/tree/master/socialmedia-...
> Can you please suggest me how I can send JSON object as part of REST API request.Thanks for help.
> Thanks,
> Surendhar
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (TEIID-4220) Unsupported encoding when POSTing to odata on Windows
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4220?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-4220:
------------------------------------------------
Debi Rieden <drieden(a)redhat.com> changed the Status of [bug 1339503|https://bugzilla.redhat.com/show_bug.cgi?id=1339503] from NEW to CLOSED
> Unsupported encoding when POSTing to odata on Windows
> -----------------------------------------------------
>
> Key: TEIID-4220
> URL: https://issues.jboss.org/browse/TEIID-4220
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.12.x
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Priority: Critical
> Labels: CR2
> Fix For: 9.0
>
>
> When posting to a windows server from a windows client, the default encoding is cp1252. When an xml request such as this is posted:
> {code:xml}
> <?xml version='1.0' encoding='cp1252'?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:gml="http://www.opengis.net/gml" xmlns:georss="http://www.georss.org/georss"><category scheme="http://docs.oasis-open.org/odata/ns/scheme"/>
> <content type="application/xml">
> <m:properties>
> <d:intkey m:type="Int32">4</d:intkey>
> <d:intnum m:type="Int32">4</d:intnum>
> <d:stringkey>4</d:stringkey>
> <d:stringval>value_4</d:stringval>
> <d:booleanval m:type="Boolean">false</d:booleanval>
> <d:decimalval m:type="Double">-20.4</d:decimalval>
> <d:timeval m:type="TimeOfDay">00:00:04</d:timeval>
> <d:dateval m:type="Date">2004-04-04</d:dateval>
> <d:timestampval m:type="DateTimeOffset">2004-01-01T00:00:04Z</d:timestampval>
> </m:properties>
> </content>
> </entry>
> {code}
> the following error is logged in the server:
> {noformat}
> 09:54:38,069 WARN [org.teiid.ODATA] (http-/0.0.0.0:8080-1) TEIID16050 Unable to process odata request due to: An I/O exception occurred. with cause Unsupported encoding: IBM1252: Unsupported encoding: IBM1252
> at org.apache.olingo.server.core.deserializer.xml.ODataXmlDeserializer.entity(ODataXmlDeserializer.java:592)
> at org.apache.olingo.server.core.requests.DataRequest$EntityRequest.getEntityFromClient(DataRequest.java:367)
> at org.apache.olingo.server.core.requests.DataRequest$EntityRequest.execute(DataRequest.java:359)
> at org.apache.olingo.server.core.requests.DataRequest.execute(DataRequest.java:255)
> at org.apache.olingo.server.core.ServiceDispatcher.internalExecute(ServiceDispatcher.java:160)
> at org.apache.olingo.server.core.ServiceDispatcher.execute(ServiceDispatcher.java:98)
> at org.apache.olingo.server.core.OData4HttpHandler.process(OData4HttpHandler.java:66)
> at org.teiid.olingo.web.ODataServlet.service(ODataServlet.java:43) [teiid-olingo-8.12.5.redhat-4.jar:8.12.5.redhat-4]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.teiid.olingo.web.ODataFilter.internalDoFilter(ODataFilter.java:226) [teiid-olingo-8.12.5.redhat-4.jar:8.12.5.redhat-4]
> at org.teiid.olingo.web.ODataFilter.doFilter(ODataFilter.java:100) [teiid-olingo-8.12.5.redhat-4.jar:8.12.5.redhat-4]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_79]
> Caused by: com.ctc.wstx.exc.WstxIOException: Unsupported encoding: IBM1252
> at com.ctc.wstx.io.StreamBootstrapper.bootstrapInput(StreamBootstrapper.java:247)
> at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:546)
> at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:600)
> at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:615)
> at com.ctc.wstx.stax.WstxInputFactory.createXMLEventReader(WstxInputFactory.java:269)
> at __redirected.__XMLInputFactory.createXMLEventReader(__XMLInputFactory.java:170) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.apache.olingo.server.core.deserializer.xml.ODataXmlDeserializer.getReader(ODataXmlDeserializer.java:97)
> at org.apache.olingo.server.core.deserializer.xml.ODataXmlDeserializer.entity(ODataXmlDeserializer.java:583)
> ... 26 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (TEIID-3686) OData DELETE nonexisting row - wrong response code
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3686?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-3686:
-------------------------------------
I asked for V4 behavior confirmation at https://groups.google.com/forum/#!topic/odata-discussion/oAaByKyEkJk
V2, can I have trace logs on context "org.teiid.ODATA", the code shows correctly to return 404
> OData DELETE nonexisting row - wrong response code
> --------------------------------------------------
>
> Key: TEIID-3686
> URL: https://issues.jboss.org/browse/TEIID-3686
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.7.1.6_2
> Reporter: Michal Sanitrak
> Assignee: Ramesh Reddy
> Labels: CR1
> Fix For: 8.12, 8.7.2.6_2
>
>
> I deployed VDB that can be accessed with OData. When I perform DELETE request to remove row for first time response code is 200 OK (maybe it should be 204) but when I repeat the same DELETE request and tried to delete already deleted entry, response is again 200 OK, but it should be 404 Not Found. Same thing happens even I when tried to delete entry with id that doesn't exist at all.
> Only indication of this problem is in the server log:
> {code:plain}INFO [org.teiid.ODATA] (http-/127.0.0.1:8080-1) no entity to delete in = BooksMySQL.BOOKS with key= ('1')
> {code}
> I think that response code for deleting row that doesn't exist should be different than 200 OK.
> For example the service at odata.org returns following content with response code 404 Not Found:
> {code:xml}
> <?xml version="1.0" encoding="utf-8" standalone="yes"?>
> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
> <code></code>
> <message xml:lang="en-US">Resource not found for the segment 'Products'.</message>
> </error>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (TEIID-4228) ODBC "Parse Statements" option can result in changes in LENGTH metadata for columns
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4228?page=com.atlassian.jira.plugin... ]
Steven Hawkins reassigned TEIID-4228:
-------------------------------------
Assignee: Steven Hawkins
> ODBC "Parse Statements" option can result in changes in LENGTH metadata for columns
> -----------------------------------------------------------------------------------
>
> Key: TEIID-4228
> URL: https://issues.jboss.org/browse/TEIID-4228
> Project: Teiid
> Issue Type: Bug
> Components: ODBC
> Affects Versions: 8.7
> Environment: Connections through ODBC driver
> Reporter: Marc Shirley
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 9.x
>
>
> Connections through ODBC driver with the driver setting "Parse Statements" option enabled can result in incorrect length values being passed to the client. In some cases (such as SQL Server linked server capabilities), this can result in the client throwing exceptions due to the expected LENGTH changing during the course of the query execution.
> This may be limited to columns with precision set to 0, as the SQL Server linked server case was corrected when the precision was changed from 0 to 9 for the column specified in the error.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (TEIID-4228) ODBC "Parse Statements" option can result in changes in LENGTH metadata for columns
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4228?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4228:
---------------------------------------
Marc, can you confirm if this only affects columns with 0 precision?
> ODBC "Parse Statements" option can result in changes in LENGTH metadata for columns
> -----------------------------------------------------------------------------------
>
> Key: TEIID-4228
> URL: https://issues.jboss.org/browse/TEIID-4228
> Project: Teiid
> Issue Type: Bug
> Components: ODBC
> Affects Versions: 8.7
> Environment: Connections through ODBC driver
> Reporter: Marc Shirley
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 9.x
>
>
> Connections through ODBC driver with the driver setting "Parse Statements" option enabled can result in incorrect length values being passed to the client. In some cases (such as SQL Server linked server capabilities), this can result in the client throwing exceptions due to the expected LENGTH changing during the course of the query execution.
> This may be limited to columns with precision set to 0, as the SQL Server linked server case was corrected when the precision was changed from 0 to 9 for the column specified in the error.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months