diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-07-22 18:36:05 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2014-07-23 05:32:13 +0000 |
commit | 0d5d8c22f7be41d408d8ee4012ef1a6f4368423e (patch) | |
tree | 821699b294fd268b8b390a780da045b94d9f297d | |
parent | 41fde63b3ec4da0a4a6636105dd7b65fdfc7ad44 (diff) |
Resolves fdo#81213: Wrong table-clause generated by reportbuilder
Oracle doesn't accept "AS" for making an alias from a table
See https://bugs.freedesktop.org/show_bug.cgi?id=81213#c2
https://bugs.freedesktop.org/show_bug.cgi?id=81213#c4
https://bugs.freedesktop.org/show_bug.cgi?id=81213#c5
for more information
(thank you Lionel)
Cherry-picked from 568778874429595855b435792e5ebecd52956dae
Change-Id: I33c86d78b2590116d4af46ffd3e54c3c791268ea
Reviewed-on: https://gerrit.libreoffice.org/10469
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
8 files changed, 9 insertions, 9 deletions
diff --git a/connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu index 34e85f4c40cf..210a9b7e9bb6 100644 --- a/connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu +++ b/connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu @@ -50,7 +50,7 @@ </node> <node oor:name="UseKeywordAsBeforeAlias" oor:op="replace"> <prop oor:name="Value" oor:type="xs:boolean"> - <value>true</value> + <value>false</value> </prop> </node> <node oor:name="UseBracketedOuterJoinSyntax" oor:op="replace"> diff --git a/connectivity/registry/jdbc/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/jdbc/org/openoffice/Office/DataAccess/Drivers.xcu index f462444854d2..dc8b3177d439 100644 --- a/connectivity/registry/jdbc/org/openoffice/Office/DataAccess/Drivers.xcu +++ b/connectivity/registry/jdbc/org/openoffice/Office/DataAccess/Drivers.xcu @@ -75,7 +75,7 @@ </node> <node oor:name="UseKeywordAsBeforeAlias" oor:op="replace"> <prop oor:name="Value" oor:type="xs:boolean"> - <value>true</value> + <value>false</value> </prop> </node> <node oor:name="UseBracketedOuterJoinSyntax" oor:op="replace"> diff --git a/connectivity/registry/odbc/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/odbc/org/openoffice/Office/DataAccess/Drivers.xcu index e660674787ce..8711eda250af 100644 --- a/connectivity/registry/odbc/org/openoffice/Office/DataAccess/Drivers.xcu +++ b/connectivity/registry/odbc/org/openoffice/Office/DataAccess/Drivers.xcu @@ -80,7 +80,7 @@ </node> <node oor:name="UseKeywordAsBeforeAlias" oor:op="replace"> <prop oor:name="Value" oor:type="xs:boolean"> - <value>true</value> + <value>false</value> </prop> </node> <node oor:name="UseBracketedOuterJoinSyntax" oor:op="replace"> diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index 75fcc66b925f..73246c2e6131 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -291,7 +291,7 @@ namespace dbtools bool DatabaseMetaData::generateASBeforeCorrelationName() const { - bool doGenerate( true ); + bool doGenerate( false ); Any setting; if ( lcl_getConnectionSetting( "GenerateASBeforeCorrelationName", *m_pImpl, setting ) ) OSL_VERIFY( setting >>= doGenerate ); diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index b9ea306555a9..a22df42d4887 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -192,7 +192,7 @@ Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const OUString("GenerateASBeforeCorrelationName") ,OUString("Generate AS before table correlation names.") ,sal_False - ,OUString( "true" ) + ,OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( diff --git a/connectivity/source/drivers/odbc/ODriver.cxx b/connectivity/source/drivers/odbc/ODriver.cxx index b6ead37a90e1..eb690a03e870 100644 --- a/connectivity/source/drivers/odbc/ODriver.cxx +++ b/connectivity/source/drivers/odbc/ODriver.cxx @@ -178,7 +178,7 @@ Sequence< DriverPropertyInfo > SAL_CALL ODBCDriver::getPropertyInfo( const OUStr OUString("GenerateASBeforeCorrelationName") ,OUString("Generate AS before table correlation names.") ,sal_False - ,OUString( "true" ) + ,OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 07331079b3ab..05dcd2f06d37 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -1055,7 +1055,7 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings() // known SDB level settings AsciiPropertyValue( "NoNameLengthLimit", makeAny( false ) ), AsciiPropertyValue( "AppendTableAliasName", makeAny( false ) ), - AsciiPropertyValue( "GenerateASBeforeCorrelationName", makeAny( true ) ), + AsciiPropertyValue( "GenerateASBeforeCorrelationName", makeAny( false ) ), AsciiPropertyValue( "ColumnAliasInOrderBy", makeAny( true ) ), AsciiPropertyValue( "EnableSQL92Check", makeAny( false ) ), AsciiPropertyValue( "BooleanComparisonMode", makeAny( BooleanComparisonMode::EQUAL_INTEGER ) ), diff --git a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java index 86ba838e4fd3..936c0db33c4b 100644 --- a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java +++ b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java @@ -556,13 +556,13 @@ public class SDBCReportDataFactory implements DataSourceFactory final Boolean escape = (Boolean) prop.getPropertyValue(ESCAPEPROCESSING); rowSetProp.setPropertyValue(ESCAPEPROCESSING, escape); final String queryCommand = (String) prop.getPropertyValue(UNO_COMMAND); - statement = "SELECT * FROM (" + queryCommand + ") AS \"__LibreOffice_report_result\""; + statement = "SELECT * FROM (" + queryCommand + ") \"__LibreOffice_report_result\""; } } else { - statement = "SELECT * FROM (" + command + ") AS \"__LibreOffice_report_result\""; + statement = "SELECT * FROM (" + command + ") \"__LibreOffice_report_result\""; } } rowSetProp.setPropertyValue(UNO_COMMAND, statement); |