[JBoss JIRA] Created: (TEIID-1759) ODBC protocol should implement DEALLOCATE command
by Van Halbert (JIRA)
ODBC protocol should implement DEALLOCATE command
-------------------------------------------------
Key: TEIID-1759
URL: https://issues.jboss.org/browse/TEIID-1759
Project: Teiid
Issue Type: Bug
Affects Versions: 7.5
Environment: Teiid 7.5.0.Final using
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)
Running inside of JBoss EAP 5.1.1 on Red Hat Enterprise Linux Server release 5.7
problem occurs with perl-DBD-Pg versions 2.15.1-3.el6 and 2.18.0-2.fc15.i686 (and possibly others)
Reporter: Graeme Gillies
Assignee: Steven Hawkins
Hi,
We currently are using the below script to try and connect to our teiid instance and pull out a bunch of data. and we have noticed that the script works fine on Rhel5 (using perl-DBD-Pg-1.49-2.el5_3.1 for example) but does not work on newer OS's like Fedora 15 or Rhel6 (which have perl-DBD-Pg versions 2.15.1-3.el6 and 2.18.0-2.fc15.i686)
{code}
#!/usr/bin/env perl
use strict;
use warnings;
use DBI;
use DBD::Pg;
my $dbh = DBI->connect("dbi:Pg:dbname=EngVDBF;host=vdb.engineering.redhat.com;port=35432", 'teiid', 'teiid', {AutoCommit => 0})
|| die "Could not connect to database: $DBI::errstr";
my $ret = $dbh->selectall_hashref("SELECT MAX(Id) AS max_id FROM Rt4S.Transactions", 'max_id');
my ($result) = keys %$ret;
printf "selectall_hashref max_id = %8d\n", $result;
$ret = $dbh->selectrow_hashref("SELECT MAX(Id) AS max_id FROM Rt4S.Transactions");
printf "selectrow_hashref max_id = %8d\n", $ret->{max_id};
print "done!";
$dbh->disconnect();
{code}
The output we get when the script fails on newer systems is as follows
{noformat}
DBD::Pg::db selectall_hashref failed: ERROR: Parsing error: Encountered "DEALLOCATE" at line 1, column 1.
Was expecting one of:
"alter" ...
"call" ...
"create" ...
"delete" ...
"drop" ...
"exec" ...
"execute" ...
"insert" ...
"select" ...
"table" ...
...
DETAIL: org.teiid.jdbc.TeiidSQLException: Parsing error: Encountered "DEALLOCATE" at line 1, column 1.
Was expecting one of:
"alter" ...
"call" ...
"create" ...
"delete" ...
"drop" ...
"exec" ...
"execute" ...
"insert" ...
"select" ...
"table" ...
...
at ./teiid-fail.pl line 12.
selectall_hashref max_id = 2568235
DBD::Pg::db selectrow_hashref failed: ERROR: Parsing error: Encountered "DEALLOCATE" at line 1, column 1.
Was expecting one of:
"alter" ...
"call" ...
"create" ...
"delete" ...
"drop" ...
"exec" ...
"execute" ...
"insert" ...
"select" ...
"table" ...
...
DETAIL: org.teiid.jdbc.TeiidSQLException: Parsing error: Encountered "DEALLOCATE" at line 1, column 1.
Was expecting one of:
"alter" ...
"call" ...
"create" ...
"delete" ...
"drop" ...
"exec" ...
"execute" ...
"insert" ...
"select" ...
"table" ...
...
at ./teiid-fail.pl line 16.
selectrow_hashref max_id = 2568235
{noformat}
The output we get on RHEL5 is
{noformat}
selectall_hashref max_id = 2568235
selectrow_hashref max_id = 2568235
{noformat}
As you can see the query does run and is displayed correctly, but it looks like the Postgres driver sends a DEALLOCATE command to the server http://www.postgresql.org/docs/8.1/static/sql-deallocate.html which teiid doesn't know what it means so throws the error.
I tried to look in the DBD-Pg docs to see if I can get it to not call DEALLOCATE, but it looks like that might not be possible. Other languages postgres libraries might call the same command anyway.
Is it possible to have the DEALLOCATE statement implemented in teiid (even if it doesn't actually do anything) so that native libraries trying to call it won't throw these errors?
Regards,
Graeme
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Commented: (TEIID-1726) Requesting ability to add/use Oracle hints in EDS
by Alan Fitton (JIRA)
[ https://issues.jboss.org/browse/TEIID-1726?page=com.atlassian.jira.plugin... ]
Alan Fitton commented on TEIID-1726:
------------------------------------
Hi Steven,
Thanks for the refined set of options and apologies for the delay responding.
The first refined option sounds like it is a possible solution, as I think we could simply define different views (maybe over other views if we wanted to offer both with/without hints to clients?). As I mentioned, this service is supposed to offered to other business areas and projects where ideally we don't want them to have knowledge of how to tune a query on our end, so encapsulating hinting inside views which is modelled by us in the designer is desirable.
The multi-hint comment container sounds like the ideal solution, and exactly what we want, although I appreciate this is one of the more difficult approaches.
As for the exposing procedures, this also could be something we would fine very useful. In particular, although I think that may be for a seperate issue, the ability to use Oracle sys ref cursors which are outputted (by an OUT parameter) as some kind of source model in EDS. Having to define a static model for the output would be acceptable here.
A Teiid implementation of ALL_ROWS/LEADING, although it would solve our problem in the short term, would not be preferable to the previous option as we would have to engage with you guys the next time their was a requirement for a particular hint and incur the inevitable lag between that and productisation.
On the subject of the short term, any advice on how we could extend the Oracle translator to push this particular hint through would be appreciated. I have looked at the Oracle translator and written other translators, so a hint (no pun intended) could be enough. I reached the conclusion that the engine doesn't push comment style hints down to translators at all (please correct if I'm mistaken) and my best idea was to implement a dummy pushdown function which was translated to 1 (the number) using a function modifier, and then use its presence and parameters to inject the right Oracle hint (eg WHERE ... OR CUSTOMHINT('x','y')=1 sort of like the SDO_RELATE functions do. I'm sure there's a better way to do this, though.
I think the final option of optimisation profiles could work too, although I agree this could be brittle and as mentioned being able to define hints on views/models themselves would be the ideal.
Given that there's multiple acceptable options you've given on how we can achieve what we want, I think it's best for you to choose what you believe which will be the most suitable, clean, and best for EDS with your familiarity of the engine rather than us choosing one approach.
Thanks.
> Requesting ability to add/use Oracle hints in EDS
> -------------------------------------------------
>
> Key: TEIID-1726
> URL: https://issues.jboss.org/browse/TEIID-1726
> Project: Teiid
> Issue Type: Feature Request
> Components: Server
> Affects Versions: 7.4.1
> Reporter: Debbie Steigner
>
> Requesting the ability to use Oracle hints inside virtual transformations and enduser queries in EDS and Teiid Designer
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Created: (TEIID-1756) NPE using matviews with default profile
by Van Halbert (JIRA)
NPE using matviews with default profile
---------------------------------------
Key: TEIID-1756
URL: https://issues.jboss.org/browse/TEIID-1756
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.4.1
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Priority: Blocker
Fix For: 7.4.1, 7.6
Since we are not explicitly requiring the all profile the code should be safe to use in the default profile.
If distributed caching is not enabled we get the following:
2011-09-14 16:59:33,369 ERROR [org.teiid.PROCESSOR] (Worker3_QueryProcessorQueue45) Unexpected exception for request acP+ZR0GKpav.12
java.lang.NullPointerException
at org.teiid.query.tempdata.TempTableDataManager.touchTable(TempTableDataManager.java:639)
at org.teiid.query.tempdata.TempTableDataManager.handleSystemProcedures(TempTableDataManager.java:341)
at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:194)
at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:176)
at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:358)
at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:156)
at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:251)
at org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:153)
...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Created: (TEIID-1754) FileStore compaction issues
by Van Halbert (JIRA)
FileStore compaction issues
---------------------------
Key: TEIID-1754
URL: https://issues.jboss.org/browse/TEIID-1754
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.1
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Priority: Blocker
Fix For: 7.4.1, 7.6
Compaction does not reset the unused space counter, which means that large files will continually be compacted. Also the compaction copy logic does not copy the correct bytes past the first buffer boundary. Finally the batch cleanup logic is not properly coordinated against a simultaneous compaction.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Created: (TEIID-1748) hasROLE(rolename) function always returns false
by Van Halbert (JIRA)
hasROLE(rolename) function always returns false
-----------------------------------------------
Key: TEIID-1748
URL: https://issues.jboss.org/browse/TEIID-1748
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
12 years, 8 months
[JBoss JIRA] Created: (TEIID-1743) Page ids are not sufficiently unique
by Van Halbert (JIRA)
Page ids are not sufficiently unique
------------------------------------
Key: TEIID-1743
URL: https://issues.jboss.org/browse/TEIID-1743
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.1
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Priority: Blocker
Fix For: 7.6
The pages used for internal matviews / temporary tables currently use a single shared integer for id generation. Conflicts are possible then after 2^32 page allocations that access the buffermanager.
In practice this condition should take a minimum of several weeks to trigger, but more likely it would take months if not years (fewer updates, larger page sizes, less chance of an id conflict, etc.)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months