You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2015/07/21 05:56:10 UTC

[Issue 126416] New: Append table alias name Database Advanced Settings overriden by database metadata from JDBC data source

https://bz.apache.org/ooo/show_bug.cgi?id=126416

          Issue ID: 126416
        Issue Type: DEFECT
           Summary: Append table alias name Database Advanced Settings
                    overriden by database metadata from JDBC data source
           Product: Base
           Version: 4.1.0
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P5
         Component: code
          Assignee: issues@openoffice.apache.org
          Reporter: ianbstuart@gmail.com

Platform:  Windows and Linux Libreoffice 
Versions from 4.0.x to 4.4.4.3 (and OpenOffice 4.1)
Database connection - JDBC
JDBC driver -  Rocket Software U2 JDBC driver - previously IBM U2 JDBC driver
Database server - UniVerse 11.2.4 (Windows, Linux and AIX)

In BASE, the database advanced settings has an option to deselect the automatic
aliasing of a table to itself as well as suppress the use of schema and catalog
names in the formed SQL;

EG SELECT * FROM CM AS CM   is formed as SELECT * FROM CM (i.e without the
alias) if the advanced settings option is unchecked.

However it seems that metadata from the database server is able to override
this setting or, alternatively, BASE detects something in the metadata sent by
the database manager that results in the Alias option being enabled.

The point at which the alias is added is when editing a query in the Designer
View  (not Edit in SQL View).  Once the query is saved and then viewed in the
"Edit in SQL View" editor, the alias is present.  If the query is manually
edited to remove the alias and the changes saved, then the SQL is correctly
executed and the results returned as expected.  However, as soon as the query
is edited again in the Query Designer, the alias is added.

The circumstances around this are that this has occurred since an upgrade of
the Rocket Software UniVerse database manager where the database manager
responds with a "derived" schema name of UVACCT for each table that is present. 

Prior to this, since OpenOffice 2, the same JDBC driver has worked with
OpenOffice and LibreOffice.

The logfiles that were generated from the JDBC driver whilst trying to debug
the problem seem to highlight that the schema name is sent from the latest
version of the database manager whereas previous versions do not have the
schema name:

EG: Part of log file from Version 11.2.4 of UniVerse with "Schema" of UVACCT
which was logged when clicking on Tables to query available tables shows:

015-07-20 21:45:44.128 getString(1) returns ''
2015-07-20 21:45:44.129 getString(2) returns 'UVACCT'
2015-07-20 21:45:44.129 getString(3) returns 'CUSTOMER'
2015-07-20 21:45:44.133 getString(4) returns 'TABLE'
2015-07-20 21:45:44.133 UniJDBCProtocolU2Impl#nextRow:enter
2015-07-20 21:45:44.133 UniJDBCProtocolU2Impl#nextRow:leave-1
2015-07-20 21:45:44.134 mHasNextRow=true,mRowCount=2
2015-07-20 21:45:44.134 getString(1) returns ''
2015-07-20 21:45:44.134 getString(2) returns 'UVACCT'
2015-07-20 21:45:44.135 getString(3) returns 'CUSTOMER_ORDERS'
2015-07-20 21:45:44.135 getString(4) returns 'TABLE'
2015-07-20 21:45:44.135 UniJDBCProtocolU2Impl#nextRow:enter
2015-07-20 21:45:44.135 UniJDBCProtocolU2Impl#nextRow:leave-1
2015-07-20 21:45:44.135 mHasNextRow=true,mRowCount=3
2015-07-20 21:45:44.136 getString(1) returns ''
2015-07-20 21:45:44.136 getString(2) returns 'UVACCT'
2015-07-20 21:45:44.136 getString(3) returns 'PRODUCTS'
2015-07-20 21:45:44.137 getString(4) returns 'TABLE'
2015-07-20 21:45:44.137 UniJDBCProtocolU2Impl#nextRow:enter
2015-07-20 21:45:44.137 UniJDBCProtocolU2Impl#nextRow:leave-1
2015-07-20 21:45:44.137 mHasNextRow=true,mRowCount=4
2015-07-20 21:45:44.137 getString(1) returns ''
2015-07-20 21:45:44.137 getString(2) returns 'UVACCT'
2015-07-20 21:45:44.138 getString(3) returns 'STATES'
2015-07-20 21:45:44.138 getString(4) returns 'TABLE'

Whereas a previous version of UniVerse 11.1.9 does not include the schema name:

2015-07-20 21:42:26.645 getString(1) returns ''
2015-07-20 21:42:26.645 getString(2) returns 'null'
2015-07-20 21:42:26.645 getString(3) returns 'CUSTOMER'
2015-07-20 21:42:26.645 getString(4) returns 'TABLE'
2015-07-20 21:42:26.645 UniJDBCProtocolU2Impl#nextRow:enter
2015-07-20 21:42:26.646 UniJDBCProtocolU2Impl#nextRow:leave-1
2015-07-20 21:42:26.646 mHasNextRow=true,mRowCount=2
2015-07-20 21:42:26.646 getString(1) returns ''
2015-07-20 21:42:26.646 getString(2) returns 'null'
2015-07-20 21:42:26.646 getString(3) returns 'PRODUCTS'
2015-07-20 21:42:26.646 getString(4) returns 'TABLE'
2015-07-20 21:42:26.647 UniJDBCProtocolU2Impl#nextRow:enter
2015-07-20 21:42:26.647 UniJDBCProtocolU2Impl#nextRow:leave-1
2015-07-20 21:42:26.647 mHasNextRow=true,mRowCount=3
2015-07-20 21:42:26.647 getString(1) returns ''
2015-07-20 21:42:26.647 getString(2) returns 'null'
2015-07-20 21:42:26.647 getString(3) returns 'STATES'
2015-07-20 21:42:26.647 getString(4) returns 'TABLE'
2015-07-20 21:42:26.647 UniJDBCProtocolU2Impl#nextRow:enter

I.e 'null' schema
This occurs on both Linux and Windows clients.

It would seem that certain circumstances cause LibreOffice (and OpenOffice 4.1)
to ignore the user setting to turn off aliasing, whereas the option is
essentially there to allow the user to force aliasing off.

Perhaps there should be a further option to "override" any decision that
LibreOffice may prefer with respect to turning on aliasing.

Unfortunately UniVerse does not support aliasing a table name to itself (CM AS
CM) nor to aliasing a table defined as SCHEMA.TABLE TO TABLE (Eg UVACCTS.CM AS
CM) for a number of reasons related to its internal design.  If the alias
supplied was unique to the query and the alias did not by any chance reference
an existing entry in the database master dictionary then aliasing works.

EG UVACCTS.CM AS X_CM_Y or  CM AS X_CM_Y (as long as X_CM_Y is not present in
the MASTER DICTIONARY)

The reason for this is that UniVerse supports both SQL and Non-SQL tables/files
For performance non-SQL files are faster and can be treated as SQL tables;
however they are not part of a "genuine" schema, do not impose SQL rules,
whereas true SQL tables are part of a schema.

Regards

Ian Stuart

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126416] Append table alias name Database Advanced Settings overriden by database metadata from JDBC data source

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126416

Kay <ks...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kschenk@apache.org

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126416] Append table alias name Database Advanced Settings overriden by database metadata from JDBC data source

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126416

--- Comment #2 from ianbstuart@gmail.com ---
Hi,
No I have not tried the ODBC driver.  The workstation where this is run from 
is Linux and the ODBC driver for the UniVerse database is only available for
Windows; hence the use of JDBC with OpenOffice since 2005.

Windows is not an option for the application where this is used although we did
test the JDBC on Windows and can confirm that on both Windows and Linux the
Advanced settings option to suppress alias of table names is ignored when the
meta data from the server provides a "default" schema (even though no such
schema actually exists).

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126416] Append table alias name Database Advanced Settings overriden by database metadata from JDBC data source

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126416

oooforum <oo...@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oooforum@free.fr
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |NOT_AN_ISSUE

--- Comment #1 from oooforum <oo...@free.fr> ---
Did you try the ODBC driver?

Please report back the outcome of your testing, so this Issue may be closed or
progressed as necessary - otherwise the issue may be Resolved as Invalid in the
future.

-- 
You are receiving this mail because:
You are the assignee for the issue.