dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40387
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20474: Analytics tables. Combining the drop and rename sql statements into one to avoid gap when no anal...
------------------------------------------------------------
revno: 20474
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-10-02 14:28:46 +0200
message:
Analytics tables. Combining the drop and rename sql statements into one to avoid gap when no analytics table is present.
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java 2015-09-13 17:49:03 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java 2015-10-02 12:28:46 +0000
@@ -205,13 +205,11 @@
final String tempTable = table.getTempTableName();
final String realTable = table.getTableName();
- final String sqlDrop = "drop table " + realTable;
-
- executeSilently( sqlDrop );
-
- final String sqlAlter = "alter table " + tempTable + " rename to " + realTable;
-
- executeSilently( sqlAlter );
+ final String sql =
+ "drop table " + realTable + ";" +
+ "alter table " + tempTable + " rename to " + realTable + ";";
+
+ executeSilently( sql );
}
@Override