Repository: ignite Updated Branches: refs/heads/ignite-3035 e1eb931b0 -> 433846a52
IGNITE-3035 Updated the create table query in the TcpDiscoveryJdbcIpFinder class to maintain the original line breaks. - Fixes #660. Signed-off-by: Alexey Kuznetsov <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/433846a5 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/433846a5 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/433846a5 Branch: refs/heads/ignite-3035 Commit: 433846a526ab668b0f04297e69164cbc5aafb076 Parents: e1eb931 Author: Peter Griffiths <[email protected]> Authored: Fri Apr 22 11:13:53 2016 +0700 Committer: Alexey Kuznetsov <[email protected]> Committed: Fri Apr 22 11:13:53 2016 +0700 ---------------------------------------------------------------------- .../tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/433846a5/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java index 9d25931..24802f5 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java @@ -64,22 +64,25 @@ public class TcpDiscoveryJdbcIpFinder extends TcpDiscoveryIpFinderAdapter { public static final String ADDRS_TABLE_NAME = "TBL_ADDRS"; /** Query to get addresses. */ - public static final String GET_ADDRS_QRY = "select hostname, port from tbl_addrs"; + public static final String GET_ADDRS_QRY = "select hostname, port from \"" + ADDRS_TABLE_NAME + + "\""; /** Query to register address. */ - public static final String REG_ADDR_QRY = "insert into tbl_addrs values (?, ?)"; + public static final String REG_ADDR_QRY = "insert into \"" + ADDRS_TABLE_NAME + + "\" values (?, ?)"; /** Query to unregister address. */ - public static final String UNREG_ADDR_QRY = "delete from tbl_addrs where hostname = ? and port = ?"; + public static final String UNREG_ADDR_QRY = "delete from \"" + ADDRS_TABLE_NAME + + "\" where hostname = ? and port = ?"; /** Query to create addresses table. */ public static final String CREATE_ADDRS_TABLE_QRY = - "create table tbl_addrs (" + + "create table \"" + ADDRS_TABLE_NAME + "\" (" + "hostname VARCHAR(1024), " + "port INT)"; /** Query to check database validity. */ - public static final String CHK_QRY = "select count(*) from tbl_addrs"; + public static final String CHK_QRY = "select count(*) from \"" + ADDRS_TABLE_NAME + "\""; /** Grid logger. */ @LoggerResource
