[GitHub] [ignite] Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name
Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name URL: https://github.com/apache/ignite/pull/7521#discussion_r393525524 ## File path: modules/indexing/src/test/java/org/apache/ignite/sqltests/BaseSqlTest.java ## @@ -1249,6 +1255,36 @@ public void testFullOuterDistributedJoinIsNotSupported() { }); } +/** + * Check schema for validation + */ + +@Rule +public ExpectedException expectedEx = ExpectedException.none(); + +@Test +public void testCheckEmptySchema() { + +expectedEx.expect(IgniteSQLException.class); +expectedEx.expectMessage("Failed to set schema for DB connection. " + +"Schema name could not be an empty string" +); + +String sqlQuery = "SELECT * FROM Employee limit 1"; + +testAllNodes(node -> { +executeFrom(sqlQuery, node, ""); +executeFrom(sqlQuery, node, " "); +assertTrue("Check valid schema", +executeFrom(sqlQuery, node, "PUBLIC").values().stream().count() > 0 +); +assertTrue("Check null schema", +executeFrom(sqlQuery, node, null).values().stream().count() > 0 +); +}); + Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name
Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name URL: https://github.com/apache/ignite/pull/7521#discussion_r393525435 ## File path: modules/indexing/src/test/java/org/apache/ignite/sqltests/BaseSqlTest.java ## @@ -1249,6 +1255,36 @@ public void testFullOuterDistributedJoinIsNotSupported() { }); } +/** + * Check schema for validation + */ + +@Rule +public ExpectedException expectedEx = ExpectedException.none(); + +@Test Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name
Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name URL: https://github.com/apache/ignite/pull/7521#discussion_r393525477 ## File path: modules/indexing/src/test/java/org/apache/ignite/sqltests/BaseSqlTest.java ## @@ -1249,6 +1255,36 @@ public void testFullOuterDistributedJoinIsNotSupported() { }); } +/** + * Check schema for validation + */ + +@Rule +public ExpectedException expectedEx = ExpectedException.none(); + +@Test +public void testCheckEmptySchema() { + Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name
Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name URL: https://github.com/apache/ignite/pull/7521#discussion_r393525310 ## File path: modules/indexing/src/test/java/org/apache/ignite/sqltests/BaseSqlTest.java ## @@ -351,6 +353,10 @@ protected Result executeFrom(String qry, Ignite node) { return executeFrom(new SqlFieldsQuery(qry), node); } +protected Result executeFrom(String qry, Ignite node, String schema) { Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name
Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name URL: https://github.com/apache/ignite/pull/7521#discussion_r393525349 ## File path: modules/indexing/src/test/java/org/apache/ignite/sqltests/BaseSqlTest.java ## @@ -1249,6 +1255,36 @@ public void testFullOuterDistributedJoinIsNotSupported() { }); } +/** + * Check schema for validation + */ + Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name
Aleksei-Litsov commented on a change in pull request #7521: IGNITE-8152 Forbid empty sql schema name URL: https://github.com/apache/ignite/pull/7521#discussion_r393525238 ## File path: modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/H2ConnectionWrapper.java ## @@ -73,6 +73,11 @@ public void schema(@Nullable String schema) { public Connection connection(@Nullable String schema) { if (schema != null && !F.eq(this.schema, schema)) { try { + +if(schema != null && schema.trim().isEmpty()){ Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services