Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035474 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2017-03-09 18:35 | 2017-03-17 09:54 | |||
Reporter | aaroncalero | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR17Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 2686a1fd45b9 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035474: Function based indexes do not support arithmetic operations on columns | |||||||
Description | Currently the dbsourcemanager supports exporting function based indexes. This works fine when the indexed part is just a call to a function (e.g. indexes defined here[1]). However if the index is compound of an arithmetic operation, this requires an extra set of parenthesis when the index is defined, but then at the time of exporting this index, the parentheses are removed. [1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.highvolumesconfig/file/tip/src-db/database/model/modifiedTables/C_BPARTNER.xml [^] | |||||||
Steps To Reproduce | Create the following index: create index EM_OBPOS_ORDLINE_QTYPENDING on c_orderline ((QTYORDERED-QTYDELIVERED)) Try exporting the index. The xml will show the following: + <index name="EM_OBPOS_ORDLINE_QTYPENDING" unique="false"> + <index-column name="functionBasedColumn" functionExpression="QTYORDERED-QTYDELIVERED"/> + </index> (notify that the parentheses are missing). After executing ant update.database, the following warning will be raised: SQL Command failed with: ERROR: syntax error at or near "-" Position: 78 -- END CREATE INDEX EM_OBPOS_ORDLINE_QTYPENDING ON C_ORDERLINE (QTYORDERED-QTYDELIVERED) | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||
|
Notes | |
(0095034) hgbot (developer) 2017-03-15 14:08 |
Repository: erp/devel/pi Changeset: a62a7a94d7eefa6c84ef3fb5eb2748c5172171e7 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Wed Mar 15 14:08:12 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/a62a7a94d7eefa6c84ef3fb5eb2748c5172171e7 [^] fixed bug 35474, fixed issue 35519: function based indexes improvements Improved the way function definitions in indexes are read from DB, now they are read per column, using in PG the index specific function pg_get_indexdef. This allows to: * properly read indexes based on arithmethic expressions ie (col1-col2) * support more than one index column based on function --- M src-db/database/lib/dbsourcemanager.jar --- |
(0095036) hgbot (developer) 2017-03-15 14:09 |
Repository: erp/devel/dbsm-main Changeset: 2686a1fd45b975ea70ca9eb413a38775bff31190 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Wed Mar 15 13:35:00 2017 +0100 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/2686a1fd45b975ea70ca9eb413a38775bff31190 [^] fixed bug 35474, fixed issue 35519: function based indexes improvements Improved the way function definitions in indexes are read from DB, now they are read per column, using in PG the index specific function pg_get_indexdef. This allows to: * properly read indexes based on arithmethic expressions ie (col1-col2) * support more than one index column based on function --- M src-test/src/org/openbravo/dbsm/test/model/FunctionBasedIndexes.java M src/org/apache/ddlutils/platform/SqlBuilder.java M src/org/apache/ddlutils/platform/oracle/OracleModelLoader.java M src/org/apache/ddlutils/platform/postgresql/PostgreSqlModelLoader.java A src-test/model/indexes/FUNCTION_INDEX_MULTI_COL.xml A src-test/model/indexes/FUNCTION_INDEX_OPERATOR.xml --- |
(0095302) hudsonbot (developer) 2017-03-15 20:22 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/54e102bef53e [^] Maturity status: Test |
(0095355) caristu (developer) 2017-03-17 09:54 |
Code reviewed + testing OK. |
Issue History | |||
Date Modified | Username | Field | Change |
2017-03-09 18:35 | aaroncalero | New Issue | |
2017-03-09 18:35 | aaroncalero | Assigned To | => platform |
2017-03-09 18:35 | aaroncalero | Modules | => Core |
2017-03-09 18:35 | aaroncalero | Triggers an Emergency Pack | => No |
2017-03-10 13:47 | alostale | Relationship added | related to 0035467 |
2017-03-10 13:48 | alostale | Relationship added | related to 0030179 |
2017-03-10 13:49 | alostale | Relationship added | related to 0029492 |
2017-03-10 13:50 | alostale | Relationship deleted | related to 0035467 |
2017-03-15 10:53 | alostale | Priority | normal => urgent |
2017-03-15 10:53 | alostale | Status | new => acknowledged |
2017-03-15 10:53 | alostale | Type | feature request => defect |
2017-03-15 10:53 | alostale | Assigned To | platform => alostale |
2017-03-15 10:54 | alostale | Review Assigned To | => caristu |
2017-03-15 14:08 | hgbot | Checkin | |
2017-03-15 14:08 | hgbot | Note Added: 0095034 | |
2017-03-15 14:08 | hgbot | Status | acknowledged => resolved |
2017-03-15 14:08 | hgbot | Resolution | open => fixed |
2017-03-15 14:08 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/a62a7a94d7eefa6c84ef3fb5eb2748c5172171e7 [^] |
2017-03-15 14:09 | hgbot | Checkin | |
2017-03-15 14:09 | hgbot | Note Added: 0095036 | |
2017-03-15 14:09 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/a62a7a94d7eefa6c84ef3fb5eb2748c5172171e7 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/2686a1fd45b975ea70ca9eb413a38775bff31190 [^] |
2017-03-15 20:22 | hudsonbot | Checkin | |
2017-03-15 20:22 | hudsonbot | Note Added: 0095302 | |
2017-03-17 09:54 | caristu | Note Added: 0095355 | |
2017-03-17 09:54 | caristu | Status | resolved => closed |
2017-03-17 09:54 | caristu | Fixed in Version | => 3.0PR17Q2 |
2017-03-17 09:59 | caristu | Relationship added | related to 0035519 |
2017-03-17 10:02 | caristu | Relationship added | related to 0035543 |
Copyright © 2000 - 2009 MantisBT Group |