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/7d4e22ec
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7d4e22ec
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7d4e22ec

Branch: refs/heads/ignite-2788
Commit: 7d4e22eca13995b9b953f0fccfbf5335e7390171
Parents: 73649cc
Author: Peter Griffiths <[email protected]>
Authored: Tue Apr 26 09:30:09 2016 +0700
Committer: shtykh_roman <[email protected]>
Committed: Fri May 13 16:11:14 2016 +0900

----------------------------------------------------------------------
 .../tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java    | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7d4e22ec/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

Reply via email to