[JBoss JIRA] (TEIID-3998) EDS 5.3 jdbc driver virtual procedure call against JDV 6.2.3
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3998?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3998.
---------------------------------
> EDS 5.3 jdbc driver virtual procedure call against JDV 6.2.3
> ------------------------------------------------------------
>
> Key: TEIID-3998
> URL: https://issues.jboss.org/browse/TEIID-3998
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12
> Environment: eds-5.3.1_1_2015-jdbc
> Reporter: Filip Elias
> Assignee: Steven Hawkins
> Attachments: server1.log
>
>
> We identified an issue when trying to connect with EDS 5.3 jdbc driver to JDV 6.2.3 instance.
> The problem is caused by virtual procedure execution.
> Query performed:
> EXEC View.hiddenUpdate(456,'changed')
> View definition:
> {code}
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIRTUAL PROCEDURE hiddenUpdate(ID integer,CUSTOMERNAME string) AS BEGIN
> MERGE INTO Customers(id,customername) VALUES(ID,CUSTOMERNAME);
> END
> ]]> </metadata>
> </model>
> {code}
> NPE excepton:
> {code}
> Exception in thread "main" java.lang.NullPointerException
> at org.teiid.jdbc.StatementImpl.executeUpdate(StatementImpl.java:342)
> at jdbcdriver.JDBCClient.executeUpdate(JDBCClient.java:59)
> at jdbcdriver.JDBCClient.main(JDBCClient.java:52)
> {code}
> Client code:
> {code}
> @Test
> public void procedureInvalidateCacheTest(){
> String sqlSelectAll = "/*+ cache */SELECT * FROM Customers;";
> try{
>
> Utils.executeUpdate(con,"INSERT INTO Customers(id,customername) VALUES (456, 'Testing 1');");
>
> ResultSet empty = Utils.executeQuery(con, sqlSelectAll);
> Assert.assertTrue(empty.next(), "ResultSet should be empty");
>
> try{
> Thread.sleep(3000);
> }catch(InterruptedException ie){
>
> }
>
> Utils.executeUpdate(con,"EXEC View.hiddenUpdate(456,'changed')");
>
> ResultSet full = Utils.executeQuery(con, sqlSelectAll);
> Assert.assertTrue(full.next(), "ResultSet shouldn't be empty");
>
> int custId = full.getInt(1);
> String custName = full.getString(2);
> Assert.assertEquals(custId, 456,"Returned row with wrong customer id");
> Assert.assertEquals(custName,"changed","PROCEDURE with UPDATE query didn't invalidate the cache:returned row with wrong customer name");
>
>
> }catch(SQLException se){
> LOG.error("Error during performing sql query on teiid",se);
> Assert.fail("Error during performing sql query on teiid", se);
> }
> }
> static Connection getTeiidConnectionUser1() throws SQLException {
> LOG.info("Getting Teiid connection for user1.");
> return TeiidDriver.getInstance().connect(TEIID_URL_USER1, null);
> }
> static int executeUpdate(Connection con, String sql) throws SQLException{
> LOG.info("Executing update [connection: " + con + "]: " + sql + ".");
> Statement s = con.createStatement();
> return s.executeUpdate(sql);
> }
> {code}
> Server log is in the attachment.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 10 months
[JBoss JIRA] (TEIID-2808) Oversights in parser test unit tests
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2808?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-2808.
---------------------------------
> Oversights in parser test unit tests
> ------------------------------------
>
> Key: TEIID-2808
> URL: https://issues.jboss.org/browse/TEIID-2808
> Project: Teiid
> Issue Type: Bug
> Components: Integration Tests
> Affects Versions: 8.4, 8.6
> Reporter: Paul Richardson
> Assignee: Steven Hawkins
> Priority: Minor
> Attachments: 0001-TEIID-2808-Small-fixes-to-unit-tests-and-accompanyin.patch
>
>
> While integrating the unit tests from TestParser into Designer's teiid runtime client codebase, I found several small issues with the tests. All the tests pass in TestParser under Teiid hence these items have not necessarily been noticed and its a question of whether they should be.
> * testArrayTable
> ** The Constant node class' equals method does not test the 'type' field if the 'value' field is null. This allows the test to pass when the constants in the expected and actual Commands trees have different types. Discussion with [~rareddy] concluded the equals method does this by design.
> ** Suggestion is change the expected Constant to have NullType as its 'type' rather than Object.
> * testBlockExceptionHandling
> ** The Block node class has no equals method hence this test passes even though the 'groupExpression' field is different between expected and actual.
> * testDynamicCommand1
> ** The ElementSymbol node class never considers its 'type' field in its equals method hence the test passes despite an expected type of Integer against an actual type of null.
> ** test has a typo when the expected var 'a1' has its type set twice to String then Integer.
> * testStoredQuery2SanityCheck
> ** Has an extraneous query created and never used
> * testStoredQuerySubqueryMultipleParens
> ** Never executes due to a lack of @Test annotation. Judging by the comment it might be an experiment that has been commented out by removing the annotation. Reinforced by test failing with parsing exception.
> * testStoredQueryWithNoParameter2
> ** The test passes but has different expected and actual GroupSymbols in the From clause since the 'shortname' field is actually "x" rather than the expected "X". The reason is that GroupSymbol equals method does not test the 'shortname' field if the schema is null. This maybe by design?
> ** Suggestion is to at least change the expected value to "X".
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 10 months
[JBoss JIRA] (TEIID-3599) Excel translator and dynamic filenames
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3599?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3599.
---------------------------------
> Excel translator and dynamic filenames
> --------------------------------------
>
> Key: TEIID-3599
> URL: https://issues.jboss.org/browse/TEIID-3599
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors
> Reporter: Ralph Martin Black
> Assignee: Ramesh Reddy
> Priority: Minor
> Labels: Alpha2
> Fix For: 9.0, 8.13.2
>
>
> Hi all,
> All samples I've reached on how to setup a connection to xls files, set up file names as properties in the source model:
> ...
> <property name="importer.ExcelFileName" value="names.xls"/>
> ...
> Is there any way to specify filenames dynamically at run-time?
> Best regards
> MB!
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 10 months