Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0030525 | Openbravo ERP | A. Platform | public | 2015-08-07 14:30 | 2016-10-14 08:26 |
|
Reporter | AugustoMauch | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR15Q4 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0030525: Provide support in DBSourceManager to define an operator class in index columns |
Description | Defining operator classes [1] in indexes allows to use them in queries involving pattern matching expressions (for instances, select name from c_bpartner where UPPER(name) ilike 'Ali%';)
This is needed in Postgresql, but it is already working in Oracle
[1] http://www.postgresql.org/docs/9.3/static/indexes-opclass.html [^] |
Steps To Reproduce | - |
Proposed Solution | |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0034206 | | acknowledged | caristu | In Oracle comments are not updated properly after adding/deleting the operator class on an existing function based index | related to | feature request | 0030179 | 3.0PR15Q4 | closed | AugustoMauch | DBSourceManager support indexes with functions | related to | defect | 0034236 | | closed | caristu | newIndexesPostAction is executing duplicated actions | related to | design defect | 0034258 | | new | Triage Platform Base | Not possible to apply two indexes on the same column but with different operator class in Oracle | related to | defect | 0034646 | | closed | caristu | Comments should be queried from user tables |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-08-07 14:30 | AugustoMauch | New Issue | |
2015-08-07 14:30 | AugustoMauch | Assigned To | => AugustoMauch |
2015-08-07 14:30 | AugustoMauch | Modules | => Core |
2015-08-07 14:30 | AugustoMauch | Triggers an Emergency Pack | => No |
2015-08-07 14:31 | AugustoMauch | Summary | Provide support in DBSourceManager to define an operator class in column indexes => Provide support in DBSourceManager to define an operator class in index columns |
2015-08-07 14:32 | AugustoMauch | Description Updated | bug_revision_view_page.php?rev_id=9184#r9184 |
2015-08-07 14:33 | AugustoMauch | Relationship added | related to 0030179 |
2015-08-19 08:48 | AugustoMauch | Issue Monitored: alostale | |
2015-08-19 08:49 | AugustoMauch | Review Assigned To | => alostale |
2015-08-19 08:50 | hgbot | Checkin | |
2015-08-19 08:50 | hgbot | Note Added: 0079417 | |
2015-08-19 08:50 | hgbot | Status | new => resolved |
2015-08-19 08:50 | hgbot | Resolution | open => fixed |
2015-08-19 08:50 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/63aa498556707c5b8a2459f7801eb30fcaf9e692 [^] |
2015-08-19 09:14 | hgbot | Checkin | |
2015-08-19 09:14 | hgbot | Note Added: 0079419 | |
2015-08-19 09:16 | hgbot | Checkin | |
2015-08-19 09:16 | hgbot | Note Added: 0079421 | |
2015-08-19 09:16 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/63aa498556707c5b8a2459f7801eb30fcaf9e692 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/a052282baa1a6d30972cf16ca5512ba59dc8ffee [^] |
2015-08-20 23:16 | hudsonbot | Checkin | |
2015-08-20 23:16 | hudsonbot | Note Added: 0079558 | |
2015-08-20 23:16 | hudsonbot | Checkin | |
2015-08-20 23:16 | hudsonbot | Note Added: 0079560 | |
2015-08-24 10:20 | hgbot | Checkin | |
2015-08-24 10:20 | hgbot | Note Added: 0079629 | |
2015-08-24 17:38 | hudsonbot | Checkin | |
2015-08-24 17:38 | hudsonbot | Note Added: 0079644 | |
2015-09-03 10:47 | dmitry_mezentsev | Note Added: 0080035 | |
2015-09-04 11:05 | alostale | Tag Attached: Performance | |
2015-09-04 11:17 | alostale | Note Added: 0080089 | |
2015-09-04 11:17 | alostale | Status | resolved => closed |
2015-09-04 11:17 | alostale | Fixed in Version | => 3.0PR15Q4 |
2016-10-14 08:26 | caristu | Relationship added | related to 0034206 |
2016-10-19 10:28 | caristu | Relationship added | related to 0034236 |
2016-10-20 19:00 | caristu | Relationship added | related to 0034258 |
2016-11-28 12:12 | caristu | Relationship added | related to 0034646 |
Notes |
|
(0079417)
|
hgbot
|
2015-08-19 08:50
|
|
Repository: erp/devel/pi
Changeset: 63aa498556707c5b8a2459f7801eb30fcaf9e692
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Aug 19 08:47:15 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/63aa498556707c5b8a2459f7801eb30fcaf9e692 [^]
Fixes issue 30525: Supports the use of Operator Classes in index columns
The fix is very straightforward in PostgreSQL: if the column of an index defines an operator class, that operator class is included in the XML, and viceversa. This is very easy to do be
cause the info about the operator class used in the index column is stored in the indclass column of the pg_index table.
It gets more complicated for Oracle. Oracle does not have the concept of operator class, so when an index that defines one is imported, there is no standard place where to store it. And
it really needs to be stored, because otherwise when that index is exported from Oracle it would lose the operator class. To solve this, the operator classes used by index columns are
stored as comments in the table that owns the indexes with the following format:
"indexName1.indexColumn1.operatorClass=operatorClass1$indexName2.indexColumn2.operatorClass=operatorClass2$..."
These comments need to be updated each time an index that defines an operator class is added or removed, both when it is done at the same time of the table creation or after it.
The operator classes used in the index columns should not be taken into account when comparing indexes in Oracle. With this we achieve that indexes will not be recreated in oracle if the only change is tha
t an operator class has been added/removed from an index column.
---
M src-db/database/lib/dbsourcemanager.jar
---
|
|
|
(0079419)
|
hgbot
|
2015-08-19 09:14
|
|
|
|
(0079421)
|
hgbot
|
2015-08-19 09:16
|
|
Repository: erp/devel/dbsm-main
Changeset: a052282baa1a6d30972cf16ca5512ba59dc8ffee
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Aug 19 09:11:10 2015 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/a052282baa1a6d30972cf16ca5512ba59dc8ffee [^]
Fixes issue 30525: Merges [idx-operator-class] with dbms main branch
---
M src-test/src/org/openbravo/dbsm/test/model/ModelSuite.java
M src/mapping.xml
M src/org/apache/ddlutils/PlatformInfo.java
M src/org/apache/ddlutils/alteration/ModelComparator.java
M src/org/apache/ddlutils/model/IndexColumn.java
M src/org/apache/ddlutils/platform/SqlBuilder.java
M src/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
M src/org/apache/ddlutils/platform/oracle/OracleModelLoader.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlModelLoader.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlPlatform.java
A src-test/model/indexes/BASIC_INDEX_WITH_OPERATOR_CLASS.xml
A src-test/model/indexes/FUNCTION_INDEX_WITHOUT_OPERATOR_CLASS.xml
A src-test/model/indexes/FUNCTION_INDEX_WITH_OPERATOR_CLASS.xml
A src-test/model/indexes/OTHER_FUNCTION_INDEX_WITH_OPERATOR_CLASS.xml
A src-test/model/recreation/BASE_MODEL_VARCHAR_COL.xml
A src-test/model/recreation/IDX_VARCHAR_COL.xml
A src-test/model/recreation/OP_CLASS_IDX.xml
A src-test/src/org/openbravo/dbsm/test/model/OperatorClassIndexes.java
---
|
|
|
|
|
|
|
|
|
(0079629)
|
hgbot
|
2015-08-24 10:20
|
|
|
|
|
|
|
|
Not closed for 15 days!!! |
|
|
|
reviewed as part of the project |
|