[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database

2021-05-07 Thread GitBox


ThanoshanMV commented on a change in pull request #10253:
URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627979217



##
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##
@@ -1421,3 +1421,258 @@ leadCdbUriClause
 propertyClause
 : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName
 ;
+
+alterSystem
+: ALTER SYSTEM alterSystemOption
+;
+
+alterSystemOption
+: archiveLogClause
+| checkpointClause
+| checkDatafilesClause
+| distributedRecovClauses
+| flushClause
+| endSessionClauses
+| alterSystemSwitchLogfileClause
+| suspendResumeClause
+| quiesceClauses
+| rollingMigrationClauses
+| rollingPatchClauses
+| alterSystemSecuriyClauses

Review comment:
   Hi @Liangda-w, I'll fix that. 




-- 
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




[GitHub] [shardingsphere] leonbond commented on issue #7128: shardingsphere sharding-jdbc 数据库表存在某些字段名查询异常

2021-05-07 Thread GitBox


leonbond commented on issue #7128:
URL: https://github.com/apache/shardingsphere/issues/7128#issuecomment-834101208


   已经解决了?怎么解决的?


-- 
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




[GitHub] [shardingsphere] RookieMember commented on issue #10258: Broadcast table SQL write "select * from t" does not work properly

2021-05-07 Thread GitBox


RookieMember commented on issue #10258:
URL: 
https://github.com/apache/shardingsphere/issues/10258#issuecomment-834104325


   > I can't reproduce it. Can you push the demo on github?
   
   demo 
GitHub:https://github.com/RookieMember/shardingsphere-demo/tree/master/shardingjdbc-demo
   
   
https://github.com/RookieMember/shardingsphere-demo/blob/master/shardingjdbc-demo/src/main/java/com/wkp/shardingjdbc/controller/AddressController.java#selectAll
  ```
   @GetMapping("/select_all_address")
   public List selectAll() throws SQLException {
   return addressServiceImpl.selectAll();
   }
   ```
   I used mybatis's XML and annotation methods to test, and the results are the 
same. There is a problem when using "select * from t_address".
   
   
   


-- 
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




[GitHub] [shardingsphere] totalo opened a new pull request #10264: Fixed spell error

2021-05-07 Thread GitBox


totalo opened a new pull request #10264:
URL: https://github.com/apache/shardingsphere/pull/10264


   Fixed spell error
   


-- 
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




[GitHub] [shardingsphere] terrymanu opened a new pull request #10266: Update javadoc for MySQLServerErrorCode

2021-05-07 Thread GitBox


terrymanu opened a new pull request #10266:
URL: https://github.com/apache/shardingsphere/pull/10266


   


-- 
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




[GitHub] [shardingsphere] avalon5666 commented on issue #10258: Broadcast table SQL write "select * from t" does not work properly

2021-05-07 Thread GitBox


avalon5666 commented on issue #10258:
URL: 
https://github.com/apache/shardingsphere/issues/10258#issuecomment-834140200


   Try compile from master bracnh, Fix at #9076


-- 
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




[shardingsphere] branch master updated: Fixed spell error (#10264)

2021-05-07 Thread zhangliang
This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
 new 29f6389  Fixed spell error (#10264)
29f6389 is described below

commit 29f63898374d057361884a7c81d5f092dd0aee92
Author: totalo <486515...@qq.com>
AuthorDate: Fri May 7 03:17:13 2021 -0500

Fixed spell error (#10264)

* fix spell error

* spell error
---
 .../shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java | 2 +-
 .../db/protocol/mysql/constant/MySQLServerErrorCodeTest.java| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
index 13ff010..a1af5d2 100644
--- 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
+++ 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
@@ -56,7 +56,7 @@ public enum MySQLServerErrorCode implements SQLErrorCode {
 
 ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE(3176, "HY000", 
 "Please do not modify the %s table with an XA transaction. This is 
an internal system table used to store GTIDs for committed transactions. " 
-+ "Although modifying it can lead to an inconsistent GTID 
state, if neccessary you can modify it with a non-XA transaction.");
++ "Although modifying it can lead to an inconsistent GTID 
state, if necessary you can modify it with a non-XA transaction.");
 
 private final int errorCode;
 
diff --git 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCodeTest.java
 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCodeTest.java
index 9f66c24..305caed 100644
--- 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCodeTest.java
+++ 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCodeTest.java
@@ -44,6 +44,6 @@ public final class MySQLServerErrorCodeTest {
 
assertThat(MySQLServerErrorCode.ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE.getSqlState(),
 is("HY000"));
 
assertThat(MySQLServerErrorCode.ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE.getErrorMessage(),
 is("Please do not modify the %s table with an XA transaction. "
 + "This is an internal system table used to store GTIDs for 
committed transactions. "
-+ "Although modifying it can lead to an inconsistent GTID 
state, if neccessary you can modify it with a non-XA transaction."));
++ "Although modifying it can lead to an inconsistent GTID 
state, if necessary you can modify it with a non-XA transaction."));
 }
 }


[GitHub] [shardingsphere] terrymanu merged pull request #10264: Fixed spell error

2021-05-07 Thread GitBox


terrymanu merged pull request #10264:
URL: https://github.com/apache/shardingsphere/pull/10264


   


-- 
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




[shardingsphere] branch master updated: Update javadoc for MySQLServerErrorCode (#10266)

2021-05-07 Thread panjuan
This is an automated email from the ASF dual-hosted git repository.

panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
 new 781de70  Update javadoc for MySQLServerErrorCode (#10266)
781de70 is described below

commit 781de70c6bad5ec2a06f756c00b583e7180b8392
Author: Liang Zhang 
AuthorDate: Fri May 7 16:24:43 2021 +0800

Update javadoc for MySQLServerErrorCode (#10266)
---
 .../db/protocol/mysql/constant/MySQLServerErrorCode.java| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
index a1af5d2..f6c3a71 100644
--- 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
+++ 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
@@ -24,14 +24,14 @@ import 
org.apache.shardingsphere.db.protocol.error.SQLErrorCode;
 /**
  * Server error code for MySQL.
  * 
- * @see https://dev.mysql.com/doc/refman/5.7/en/server-error-reference.html;>Server
 Error Message Reference
+ * @see https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html;>Server
 Error Message Reference
  */
 @RequiredArgsConstructor
 @Getter
 public enum MySQLServerErrorCode implements SQLErrorCode {
-
+
 ER_DBACCESS_DENIED_ERROR(1044, "42000", "Access denied for user '%s'@'%s' 
to database '%s'"),
-
+
 ER_ACCESS_DENIED_ERROR(1045, "28000", "Access denied for user '%s'@'%s' 
(using password: %s)"),
 
 ER_NO_DB_ERROR(1046, "3D000", "No database selected"),


[GitHub] [shardingsphere] tristaZero merged pull request #10266: Update javadoc for MySQLServerErrorCode

2021-05-07 Thread GitBox


tristaZero merged pull request #10266:
URL: https://github.com/apache/shardingsphere/pull/10266


   


-- 
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




[GitHub] [shardingsphere] terrymanu opened a new pull request #10265: Support show engine and show charset to adapt MySQLWorkbench 8.x

2021-05-07 Thread GitBox


terrymanu opened a new pull request #10265:
URL: https://github.com/apache/shardingsphere/pull/10265


   


-- 
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




[GitHub] [shardingsphere] leonbond commented on issue #10259: Antlr ParseTree error when database field is "POINT"

2021-05-07 Thread GitBox


leonbond commented on issue #10259:
URL: 
https://github.com/apache/shardingsphere/issues/10259#issuecomment-834117318


   @Liangda-w Still thank you!


-- 
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




[GitHub] [shardingsphere] menghaoranss merged pull request #10265: Support show engine and show charset to adapt MySQLWorkbench 8.x

2021-05-07 Thread GitBox


menghaoranss merged pull request #10265:
URL: https://github.com/apache/shardingsphere/pull/10265


   


-- 
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




[shardingsphere] branch master updated (788fbb1 -> 00c64f3)

2021-05-07 Thread menghaoran
This is an automated email from the ASF dual-hosted git repository.

menghaoran pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git.


from 788fbb1  Remove gen codes (#10262)
 add 00c64f3  Support show engine and show charset to adapt MySQLWorkbench 
8.x (#10265)

No new revisions were added by this update.

Summary of changes:
 .../src/main/antlr4/imports/mysql/DALStatement.g4  |  5 +
 .../impl/MySQLDALStatementSQLVisitor.java  | 22 --
 2 files changed, 25 insertions(+), 2 deletions(-)


[GitHub] [shardingsphere] TeslaCN opened a new pull request #10267: Fix PostgreSQL Proxy CommandCompletion may be duplicate

2021-05-07 Thread GitBox


TeslaCN opened a new pull request #10267:
URL: https://github.com/apache/shardingsphere/pull/10267


   


-- 
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




[shardingsphere] branch master updated: Fix PostgreSQL Proxy CommandCompletion may be duplicate (#10267)

2021-05-07 Thread zhangliang
This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
 new bc11440  Fix PostgreSQL Proxy CommandCompletion may be duplicate 
(#10267)
bc11440 is described below

commit bc11440eb61a8a4c7a7bfb7fb46234015a3d30c1
Author: 吴伟杰 
AuthorDate: Fri May 7 16:39:30 2021 +0800

Fix PostgreSQL Proxy CommandCompletion may be duplicate (#10267)
---
 .../frontend/postgresql/command/PostgreSQLCommandExecuteEngine.java   | 4 +++-
 .../command/query/binary/bind/PostgreSQLComBindExecutor.java  | 4 +---
 .../postgresql/command/query/text/PostgreSQLComQueryExecutor.java | 4 +---
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/PostgreSQLCommandExecuteEngine.java
 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/PostgreSQLCommandExecuteEngine.java
index 53e89e6..d3661c7 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/PostgreSQLCommandExecuteEngine.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/PostgreSQLCommandExecuteEngine.java
@@ -104,7 +104,9 @@ public final class PostgreSQLCommandExecuteEngine 
implements CommandExecuteEngin
 count = 0;
 }
 }
-context.write(new PostgreSQLCommandCompletePacket());
+if (ResponseType.QUERY == queryCommandExecutor.getResponseType()) {
+context.write(new PostgreSQLCommandCompletePacket());
+}
 if (queryCommandExecutor instanceof PostgreSQLComQueryExecutor) {
 context.write(new PostgreSQLReadyForQueryPacket(true));
 }
diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/bind/PostgreSQLComBindExecutor.java
 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/bind/PostgreSQLComBindExecutor.java
index e47af2b..d12baa9 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/bind/PostgreSQLComBindExecutor.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/bind/PostgreSQLComBindExecutor.java
@@ -98,12 +98,10 @@ public final class PostgreSQLComBindExecutor implements 
QueryCommandExecutor {
 
 private Optional createQueryPacket(final 
QueryResponseHeader queryResponseHeader) {
 Collection columnDescriptions = 
createColumnDescriptions(queryResponseHeader);
-if (columnDescriptions.isEmpty()) {
-responseType = ResponseType.QUERY;
-}
 if (columnDescriptions.isEmpty() || packet.isBinaryRowData()) {
 return Optional.empty();
 }
+responseType = ResponseType.QUERY;
 return Optional.of(new 
PostgreSQLRowDescriptionPacket(columnDescriptions.size(), columnDescriptions));
 }
 
diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/text/PostgreSQLComQueryExecutor.java
 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/text/PostgreSQLComQueryExecutor.java
index d85e0b5..0381af1 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/text/PostgreSQLComQueryExecutor.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/text/PostgreSQLComQueryExecutor.java
@@ -72,11 +72,9 @@ public final class PostgreSQLComQueryExecutor implements 
QueryCommandExecutor {
 private Optional createQueryPacket(final 
QueryResponseHeader queryResponseHeader) {
 Collection columnDescriptions = 

[GitHub] [shardingsphere] tristaZero merged pull request #10270: support postgresql pattern matching operator parse

2021-05-07 Thread GitBox


tristaZero merged pull request #10270:
URL: https://github.com/apache/shardingsphere/pull/10270


   


-- 
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




[GitHub] [shardingsphere] tristaZero opened a new pull request #10268: Add checking

2021-05-07 Thread GitBox


tristaZero opened a new pull request #10268:
URL: https://github.com/apache/shardingsphere/pull/10268


   


-- 
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




[GitHub] [shardingsphere] avalon5666 merged pull request #10269: Revise #10264

2021-05-07 Thread GitBox


avalon5666 merged pull request #10269:
URL: https://github.com/apache/shardingsphere/pull/10269


   


-- 
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




[GitHub] [shardingsphere] leonbond closed issue #10225: Sharding-jdbc insert NullPointerException

2021-05-07 Thread GitBox


leonbond closed issue #10225:
URL: https://github.com/apache/shardingsphere/issues/10225


   


-- 
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




[shardingsphere] branch master updated: Revise #10264 (#10269)

2021-05-07 Thread ouyangwen
This is an automated email from the ASF dual-hosted git repository.

ouyangwen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
 new 5de13aa  Revise #10264 (#10269)
5de13aa is described below

commit 5de13aa0b4d99baba1af0cf4ef2ca822ce005367
Author: 吴伟杰 
AuthorDate: Fri May 7 17:36:08 2021 +0800

Revise #10264 (#10269)
---
 .../proxy/frontend/mysql/err/MySQLErrPacketFactoryTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactoryTest.java
 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactoryTest.java
index 6fca1f8..70a8079 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactoryTest.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/err/MySQLErrPacketFactoryTest.java
@@ -101,7 +101,7 @@ public final class MySQLErrPacketFactoryTest {
 assertThat(actual.getSqlState(), is("HY000"));
 assertThat(actual.getErrorMessage(), is("Please do not modify the 
unknown_table table with an XA transaction. "
 + "This is an internal system table used to store GTIDs for 
committed transactions. "
-+ "Although modifying it can lead to an inconsistent GTID 
state, if neccessary you can modify it with a non-XA transaction."));
++ "Although modifying it can lead to an inconsistent GTID 
state, if necessary you can modify it with a non-XA transaction."));
 }
 
 @Test


[GitHub] [shardingsphere] terrymanu merged pull request #10267: Fix PostgreSQL Proxy CommandCompletion may be duplicate

2021-05-07 Thread GitBox


terrymanu merged pull request #10267:
URL: https://github.com/apache/shardingsphere/pull/10267


   


-- 
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




[GitHub] [shardingsphere] TeslaCN opened a new pull request #10269: Revise #10264

2021-05-07 Thread GitBox


TeslaCN opened a new pull request #10269:
URL: https://github.com/apache/shardingsphere/pull/10269


   


-- 
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




[shardingsphere] branch master updated: support postgresql pattern matching operator parse (#10270)

2021-05-07 Thread panjuan
This is an automated email from the ASF dual-hosted git repository.

panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
 new cc353e8  support postgresql pattern matching operator parse (#10270)
cc353e8 is described below

commit cc353e87f4e88124b3272ba1a0ae6c89c82797f3
Author: Zhengqiang Duan 
AuthorDate: Fri May 7 19:37:41 2021 +0800

support postgresql pattern matching operator parse (#10270)

* support postgresql pattern matching operator parse

* fix test case exception
---
 .../statement/impl/OracleStatementSQLVisitor.java  |   3 +-
 .../src/main/antlr4/imports/postgresql/BaseRule.g4 |  32 +++---
 .../src/main/antlr4/imports/postgresql/Symbol.g4   |   2 +
 .../impl/PostgreSQLStatementSQLVisitor.java|  74 ++
 .../impl/SQLServerStatementSQLVisitor.java |   3 +-
 .../src/main/resources/case/dml/select.xml | 109 +
 .../main/resources/sql/supported/dml/select.xml|   5 +-
 7 files changed, 103 insertions(+), 125 deletions(-)

diff --git 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleStatementSQLVisitor.java
 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleStatementSQLVisitor.java
index 9095244..f86cfdd 100644
--- 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleStatementSQLVisitor.java
+++ 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleStatementSQLVisitor.java
@@ -466,7 +466,8 @@ public abstract class OracleStatementSQLVisitor extends 
OracleStatementBaseVisit
 @Override
 public final ASTNode visitRegularFunction(final RegularFunctionContext 
ctx) {
 calculateParameterCount(ctx.expr());
-return new ExpressionProjectionSegment(ctx.getStart().getStartIndex(), 
ctx.getStop().getStopIndex(), ctx.getText());
+String text = ctx.start.getInputStream().getText(new 
Interval(ctx.start.getStartIndex(), ctx.stop.getStopIndex()));
+return new ExpressionProjectionSegment(ctx.getStart().getStartIndex(), 
ctx.getStop().getStopIndex(), text);
 }
 
 @Override
diff --git 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
index 681d561..2bf7428 100644
--- 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
+++ 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
@@ -504,6 +504,22 @@ comparisonOperator
 : EQ_ | GTE_ | GT_ | LTE_ | LT_ | NEQ_
 ;
 
+patternMatchingOperator
+: LIKE
+| TILDE_TILDE_
+| NOT LIKE
+| NOT_TILDE_TILDE_
+| ILIKE
+| ILIKE_
+| NOT ILIKE
+| NOT_ILIKE_
+| SIMILAR TO
+| NOT SIMILAR TO
+| TILDE_
+| NOT_ TILDE_
+| TILDE_ ASTERISK_
+| NOT_ TILDE_ ASTERISK_
+;
 
 cursorName
 : name
@@ -527,18 +543,8 @@ aExpr
 | aExpr qualOp
 | aExpr comparisonOperator aExpr
 | NOT aExpr
-| aExpr LIKE aExpr
-| aExpr LIKE aExpr ESCAPE aExpr
-| aExpr NOT LIKE aExpr
-| aExpr NOT LIKE aExpr ESCAPE aExpr
-| aExpr TILDE_ aExpr
-| aExpr TILDE_ aExpr ESCAPE aExpr
-| aExpr NOT_ TILDE_ aExpr
-| aExpr NOT_ TILDE_ aExpr ESCAPE aExpr
-| aExpr SIMILAR TO aExpr
-| aExpr SIMILAR TO aExpr ESCAPE aExpr
-| aExpr NOT SIMILAR TO aExpr
-| aExpr NOT SIMILAR TO aExpr ESCAPE aExpr
+| aExpr patternMatchingOperator aExpr
+| aExpr patternMatchingOperator aExpr ESCAPE aExpr
 | aExpr IS NULL
 | aExpr ISNULL
 | aExpr IS NOT NULL
@@ -658,8 +664,6 @@ columnref
 
 qualOp
 : jsonOperator
-| TILDE_TILDE_
-| NOT_TILDE_TILDE_
 | OPERATOR LP_ anyOperator RP_
 ;
 
diff --git 
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/Symbol.g4
 
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/Symbol.g4
index 7935e13..6d03f5e 100644
--- 

[GitHub] [shardingsphere] strongduanmu opened a new pull request #10270: support postgresql pattern matching operator parse

2021-05-07 Thread GitBox


strongduanmu opened a new pull request #10270:
URL: https://github.com/apache/shardingsphere/pull/10270


   Ref #10089.
   
   Changes proposed in this pull request:
   
   - support postgresql pattern matching operator parse


-- 
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




[GitHub] [shardingsphere] tristaZero opened a new issue #10271: PostgreSQL `SHOW xxx` syntax conflicting with DistSQL

2021-05-07 Thread GitBox


tristaZero opened a new issue #10271:
URL: https://github.com/apache/shardingsphere/issues/10271


   As you know, ShardingSphere defines 
[DistSQL](https://shardingsphere.apache.org/document/current/cn/features/dist-sql/)
 for distributed metadata queries. 
   
   There is an issue that `SHOW xxx` DistSQL has conflicts with PostgreSQL 
standard SQL syntax.
   
   ### How to reproduce?
   - Start Proxy using PostgreSQL
   - Execute DistSQL `show REPLICA_QUERY rule from schem_name`
   
   ### Expected and actual results
   **Expected** 
   `ShardingSphereSQLParserEngine` return `ShowRuleStatement`.
   **Actual**
   `ShardingSphereSQLParserEngine` return `PostgreSQLShowStatement`.
   
   ### Some hints for solution
   - Please check the definition of `show` in 
`shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DALStatement.g4`
 is aligned with PostgreSQL or not
   - Consider working on its definition to avoid the visitor entering into 
`show colId` branch
   
   **Note**
   I am unsure these hints can help us fix this conflict, but it is worth more 
investigation since this method is the cheapest for pushing the development of 
the DistSQL feature. If you have any progress, please contact me.
   


-- 
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




[GitHub] [shardingsphere] bkiers edited a comment on issue #10259: Antlr ParseTree error when database field is "POINT"

2021-05-07 Thread GitBox


bkiers edited a comment on issue #10259:
URL: 
https://github.com/apache/shardingsphere/issues/10259#issuecomment-834428853


   > are you trying with the latest version?
   
   The latest version in Maven Central is 4.1.1. And in 4.1.1 this _is_ a bug.
   
   Related SO question: 
https://stackoverflow.com/questions/67415281/antlr-no-viable-alternative-at-input-when-the-keyword-is-point


-- 
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




[GitHub] [shardingsphere] TeslaCN merged pull request #10272: Update javadoc of MySQLCommandPacketType

2021-05-07 Thread GitBox


TeslaCN merged pull request #10272:
URL: https://github.com/apache/shardingsphere/pull/10272


   


-- 
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




[GitHub] [shardingsphere] terrymanu opened a new pull request #10272: Update javadoc of MySQLCommandPacketType

2021-05-07 Thread GitBox


terrymanu opened a new pull request #10272:
URL: https://github.com/apache/shardingsphere/pull/10272


   


-- 
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




[GitHub] [shardingsphere] bkiers commented on issue #10259: Antlr ParseTree error when database field is "POINT"

2021-05-07 Thread GitBox


bkiers commented on issue #10259:
URL: 
https://github.com/apache/shardingsphere/issues/10259#issuecomment-834428853


   > are you trying with the latest version?
   
   The latest version in Maven Central is 4.1.1. And in 4.1.1 this _is_ a bug.


-- 
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




[GitHub] [shardingsphere] terrymanu opened a new issue #10275: Can not load schema and tables from MySQL Workbench

2021-05-07 Thread GitBox


terrymanu opened a new issue #10275:
URL: https://github.com/apache/shardingsphere/issues/10275


   When using MySQL Workbench to connect proxy, the schema and tables can not 
show in schema view.
   The exception is occur: `Error Code: 0 MySQL_ResultSet::getString: invalid 
value of 'columnIndex'`
   
   Version of MySQL Workbench: 8.0.24
   Version of MySQL Cli: 8.0.23


-- 
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




[GitHub] [shardingsphere] XUZHOUWANG opened a new issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


XUZHOUWANG opened a new issue #10274:
URL: https://github.com/apache/shardingsphere/issues/10274


   **table:**
   
   @TableName("t_user")
   @Data
   public class User implements Serializable {
   
   @TableId(type = IdType.INPUT)
   private Long id;
   private String name;
   private Date gmtCreate;
   private Date gmtModified;
   private String phone;
   private Integer isDeleted;
   
   }
   
   **config**
   
sharding:
 tables:
   t_user:
 actual-data-nodes: skshardingjdbc.t_user_$->{0..1}
 logicTable: t_user
 tableStrategy:
   inline:
 shardingColumn: id
 algorithmExpression: t_user_$->{id % 2}
 keyGenerator:
   type: UUID
   column: id
   
   **error** 
   
   ### SQL: INSERT INTO t_user  ( id, name, gmt_create, gmt_modified, phone )  
VALUES  ( ?, ?, ?, ?, ? )
   ### Cause: java.lang.IllegalArgumentException: Sharding value must 
implements Comparable.
at 
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at 
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
at 
org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
... 37 more


-- 
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




[GitHub] [shardingsphere] TeslaCN opened a new issue #10273: FATAL occurred while sysbenching PostgreSQL Proxy

2021-05-07 Thread GitBox


TeslaCN opened a new issue #10273:
URL: https://github.com/apache/shardingsphere/issues/10273


   ## Feature Request
   
   
   ### Describe the feature you would like.
   
   Handle Transaction Failed.
   
   ### Is your feature request related to a problem?
   
   I was testing PostgreSQL Proxy with sysbench. FATAL occurred and the JDBC 
connection became unavailable because transaction failed and `autosave` was the 
default value `never`.
   ```bash
   sysbench oltp_write_only   --db-driver=pgsql --pgsql-host=${PROXY_HOST} 
--pgsql-port=${PROXY_PORT} --pgsql-user=root --pgsql-password='root' 
--pgsql-db=sbtest --tables=2 --table-size=1 --report-interval=5  --time=30 
--threads=8 --max-requests=0 --percentile=99  --range_selects=off 
--rand-type=uniform --auto_inc=off run | tee oltp_write_only.master.txt
   ```
   
   ### sysbench log
   ```
   sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
   
   Running the test with following options:
   Number of threads: 8
   Report intermediate results every 5 second(s)
   Initializing random number generator from current time
   
   
   Initializing worker threads...
   
   Threads started!
   
   FATAL: PQexecPrepared() failed: 7 current transaction is aborted, commands 
ignored until end of transaction block
   FATAL: `thread_run' function failed: 
/usr/share/sysbench/oltp_common.lua:405: SQL error, errno = 0, state = '25P02': 
current transaction is aborted, commands ignored until end of transaction block
   FATAL: PQexecPrepared() failed: 7 current transaction is aborted, commands 
ignored until end of transaction block
   FATAL: `thread_run' function failed: 
/usr/share/sysbench/oltp_common.lua:405: SQL error, errno = 0, state = '25P02': 
current transaction is aborted, commands ignored until end of transaction block
   FATAL: PQexecPrepared() failed: 7 current transaction is aborted, commands 
ignored until end of transaction block
   FATAL: `thread_run' function failed: 
/usr/share/sysbench/oltp_common.lua:405: SQL error, errno = 0, state = '25P02': 
current transaction is aborted, commands ignored until end of transaction block
   FATAL: PQexecPrepared() failed: 7 current transaction is aborted, commands 
ignored until end of transaction block
   FATAL: `thread_run' function failed: 
/usr/share/sysbench/oltp_common.lua:405: SQL error, errno = 0, state = '25P02': 
current transaction is aborted, commands ignored until end of transaction block
   FATAL: PQexecPrepared() failed: 7 current transaction is aborted, commands 
ignored until end of transaction block
   FATAL: `thread_run' function failed: 
/usr/share/sysbench/oltp_common.lua:405: SQL error, errno = 0, state = '25P02': 
current transaction is aborted, commands ignored until end of transaction block
   FATAL: PQexecPrepared() failed: 7 current transaction is aborted, commands 
ignored until end of transaction block
   FATAL: `thread_run' function failed: 
/usr/share/sysbench/oltp_common.lua:405: SQL error, errno = 0, state = '25P02': 
current transaction is aborted, commands ignored until end of transaction block
   FATAL: PQexecPrepared() failed: 7 current transaction is aborted, commands 
ignored until end of transaction block
   FATAL: `thread_run' function failed: 
/usr/share/sysbench/oltp_common.lua:405: SQL error, errno = 0, state = '25P02': 
current transaction is aborted, commands ignored until end of transaction block
   FATAL: PQexecPrepared() failed: 7 current transaction is aborted, commands 
ignored until end of transaction block
   FATAL: `thread_run' function failed: 
/usr/share/sysbench/oltp_common.lua:405: SQL error, errno = 0, state = '25P02': 
current transaction is aborted, commands ignored until end of transaction block
   ```
   
   
   ### Proxy Log
   ```
   [ERROR] 23:46:44.910 [pool-19-thread-1] o.a.s.p.f.c.CommandExecutorTask - 
Exception occur: 
   org.postgresql.util.PSQLException: ERROR: current transaction is aborted, 
commands ignored until end of transaction block
at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at 
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
at 
org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:132)
at 
com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at 
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at 

[shardingsphere] branch master updated: Update javadoc of MySQLCommandPacketType (#10272)

2021-05-07 Thread wuweijie
This is an automated email from the ASF dual-hosted git repository.

wuweijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
 new d506c23  Update javadoc of MySQLCommandPacketType (#10272)
d506c23 is described below

commit d506c23dc7ce89bd8dcac4495842a587ade0ab5c
Author: Liang Zhang 
AuthorDate: Fri May 7 22:05:45 2021 +0800

Update javadoc of MySQLCommandPacketType (#10272)
---
 .../mysql/packet/command/MySQLCommandPacketType.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/MySQLCommandPacketType.java
 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/MySQLCommandPacketType.java
index 129d6eb..f91b196 100644
--- 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/MySQLCommandPacketType.java
+++ 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/MySQLCommandPacketType.java
@@ -55,28 +55,28 @@ public enum MySQLCommandPacketType implements 
CommandPacketType {
 /**
  * COM_QUERY.
  * 
- * @see https://dev.mysql.com/doc/internals/en/com-sleep.html#packet-COM_QUERY;>COM_QUERY
+ * @see https://dev.mysql.com/doc/internals/en/com-query.html;>COM_QUERY
  */
 COM_QUERY(0x03),
 
 /**
  * COM_FIELD_LIST.
  * 
- * @see https://dev.mysql.com/doc/internals/en/com-sleep.html#packet-COM_FIELD_LIST;>COM_FIELD_LIST
+ * @see https://dev.mysql.com/doc/internals/en/com-field-list.html;>COM_FIELD_LIST
  */
 COM_FIELD_LIST(0x04),
 
 /**
  * COM_CREATE_DB.
  * 
- * @see https://dev.mysql.com/doc/internals/en/com-sleep.html#packet-COM_CREATE_DB;>COM_CREATE_DB
+ * @see https://dev.mysql.com/doc/internals/en/com-create-db.html;>COM_CREATE_DB
  */
 COM_CREATE_DB(0x05),
 
 /**
  * COM_DROP_DB.
  * 
- * @see https://dev.mysql.com/doc/internals/en/com-create-db.html;>COM_DROP_DB
+ * @see https://dev.mysql.com/doc/internals/en/com-drop-db.html;>COM_DROP_DB
  */
 COM_DROP_DB(0x06),
 
@@ -97,7 +97,7 @@ public enum MySQLCommandPacketType implements 
CommandPacketType {
 /**
  * COM_STATISTICS.
  * 
- * @see https://dev.mysql.com/doc/internals/en/com-statistics.html#packet-COM_STATISTICS;>COM_STATISTICS
+ * @see https://dev.mysql.com/doc/internals/en/com-statistics.html;>COM_STATISTICS
  */
 COM_STATISTICS(0x09),
 
@@ -146,21 +146,21 @@ public enum MySQLCommandPacketType implements 
CommandPacketType {
 /**
  * COM_DELAYED_INSERT.
  * 
- * @see https://dev.mysql.com/doc/internals/en/com-time.html;>COM_DELAYED_INSERT
+ * @see https://dev.mysql.com/doc/internals/en/com-delayed-insert.html;>COM_DELAYED_INSERT
  */
 COM_DELAYED_INSERT(0x10),
 
 /**
  * COM_CHANGE_USER.
  * 
- * @see https://dev.mysql.com/doc/internals/en/com-sleep.html#packet-COM_CHANGE_USER;>COM_CHANGE_USER
+ * @see https://dev.mysql.com/doc/internals/en/com-change-user.html;>COM_CHANGE_USER
  */
 COM_CHANGE_USER(0x11),
 
 /**
  * COM_BINLOG_DUMP.
  * 
- * @see https://dev.mysql.com/doc/internals/en/com-change-user.html;>COM_BINLOG_DUMP
+ * @see https://dev.mysql.com/doc/internals/en/com-binlog-dump.html;>COM_BINLOG_DUMP
  */
 COM_BINLOG_DUMP(0x12),
 


[GitHub] [shardingsphere] tuohai666 opened a new issue #4358: Different MySQLColumnDefinition41Packet values for parameters between MySQL Connector/J and MySQL C API

2021-05-07 Thread GitBox


tuohai666 opened a new issue #4358:
URL: https://github.com/apache/shardingsphere/issues/4358


   Parameter type of char in MySQLColumnDefinition41Packet handled differently 
between MySQL Connector/J and MySQL C API.
   Connector/J accepts MYSQL_TYPE_VARCHAR, MYSQL_TYPE_VAR_STRING and 
MYSQL_TYPE_STRING.
   While C API checks strictly and only accept MYSQL_TYPE_VAR_STRING and 
MYSQL_TYPE_STRING, because column type will be stored in struct MYSQL_STMT 
(fields.type) but MYSQL_TYPE_VARCHAR is not allowed to bind result.
   
   For other filelds we follow MySQL Server's behavior:
   ```
   - Database: ""
   - Table: ""
   - Original Table: ""
   - Name: "?"
   - Original Name: ""
   - Length: 0
   ```


-- 
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




[GitHub] [shardingsphere] menghaoranss merged pull request #10276: Complete missing protocol impl for MySQLColumnDefinition41Packet with COM_FIELD_LIST command

2021-05-07 Thread GitBox


menghaoranss merged pull request #10276:
URL: https://github.com/apache/shardingsphere/pull/10276


   


-- 
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




[shardingsphere-benchmark] branch master updated: update benchmark result

2021-05-07 Thread zhangyonglun
This is an automated email from the ASF dual-hosted git repository.

zhangyonglun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-benchmark.git


The following commit(s) were added to refs/heads/master by this push:
 new 831e2a9  update benchmark result
831e2a9 is described below

commit 831e2a9c1581e14d3e7231f1fc0fbb13b172d4e3
Author: tuohai666 
AuthorDate: Sat May 8 08:00:24 2021 +0800

update benchmark result
---
 .../report/shardingsphere-benchmark-avg.xls| Bin 114688 -> 114688 bytes
 .../resources/report/shardingsphere-benchmark.xls  | Bin 88064 -> 88576 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git 
a/shardingsphere-benchmark/src/main/resources/report/shardingsphere-benchmark-avg.xls
 
b/shardingsphere-benchmark/src/main/resources/report/shardingsphere-benchmark-avg.xls
index 3851420..3f17bc1 100755
Binary files 
a/shardingsphere-benchmark/src/main/resources/report/shardingsphere-benchmark-avg.xls
 and 
b/shardingsphere-benchmark/src/main/resources/report/shardingsphere-benchmark-avg.xls
 differ
diff --git 
a/shardingsphere-benchmark/src/main/resources/report/shardingsphere-benchmark.xls
 
b/shardingsphere-benchmark/src/main/resources/report/shardingsphere-benchmark.xls
index e6eaa1d..a9df068 100755
Binary files 
a/shardingsphere-benchmark/src/main/resources/report/shardingsphere-benchmark.xls
 and 
b/shardingsphere-benchmark/src/main/resources/report/shardingsphere-benchmark.xls
 differ


[GitHub] [shardingsphere] strongduanmu merged pull request #10268: Add checking

2021-05-07 Thread GitBox


strongduanmu merged pull request #10268:
URL: https://github.com/apache/shardingsphere/pull/10268


   


-- 
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




[GitHub] [shardingsphere] XUZHOUWANG commented on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


XUZHOUWANG commented on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-834987969


   > 1. Use "@TableId(type = IdType.AUTO)"
   > 2. id's type in class not match uuid
   
   no,I want to create the id by shardingsphere; the definition of  User is 
okay.


-- 
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




[GitHub] [shardingsphere] LikeElephantintheforest commented on issue #10278: SELECT LAST_INSERT_ID() expect return the self-growth primary key

2021-05-07 Thread GitBox


LikeElephantintheforest commented on issue #10278:
URL: 
https://github.com/apache/shardingsphere/issues/10278#issuecomment-835013990


   sharding.jdbc.config.sharding.master-slave-rules.ms0.master-data-source-name 
= 
   
   value is not empty , i replaced them for ask question;


-- 
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




[GitHub] [shardingsphere] avalon5666 closed issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


avalon5666 closed issue #10274:
URL: https://github.com/apache/shardingsphere/issues/10274


   


-- 
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




[GitHub] [shardingsphere] wang7621422811 opened a new issue #10279: Using asynchronous processing for routing errors

2021-05-07 Thread GitBox


wang7621422811 opened a new issue #10279:
URL: https://github.com/apache/shardingsphere/issues/10279


   I'm using the JDK `CompletableFuture.supplyAsync()`,Occasionally, however, 
routing fails
   ```
   Caused by: java.sql.SQLSyntaxErrorException: Table 'It should be 
"shsc_wms_wgb." Now it is "shsc_wms_wsh."w_outbound_master' doesn't exist
at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at 
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at 
com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:970)
at 
com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1020)
at 
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
at 
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
at 
org.apache.shardingsphere.shardingjdbc.executor.PreparedStatementExecutor.getQueryResult(PreparedStatementExecutor.java:109)
at 
org.apache.shardingsphere.shardingjdbc.executor.PreparedStatementExecutor.access$200(PreparedStatementExecutor.java:45)
at 
org.apache.shardingsphere.shardingjdbc.executor.PreparedStatementExecutor$2.executeSQL(PreparedStatementExecutor.java:101)
at 
org.apache.shardingsphere.shardingjdbc.executor.PreparedStatementExecutor$2.executeSQL(PreparedStatementExecutor.java:97)
at 
org.apache.shardingsphere.sharding.execute.sql.execute.SQLExecuteCallback.execute0(SQLExecuteCallback.java:82)
at 
org.apache.shardingsphere.sharding.execute.sql.execute.SQLExecuteCallback.execute(SQLExecuteCallback.java:58)
at 
org.apache.shardingsphere.underlying.executor.engine.ExecutorEngine.syncExecute(ExecutorEngine.java:97)
at 
org.apache.shardingsphere.underlying.executor.engine.ExecutorEngine.parallelExecute(ExecutorEngine.java:93)
at 
org.apache.shardingsphere.underlying.executor.engine.ExecutorEngine.execute(ExecutorEngine.java:76)
at 
org.apache.shardingsphere.sharding.execute.sql.execute.SQLExecuteTemplate.execute(SQLExecuteTemplate.java:68)
at 
org.apache.shardingsphere.sharding.execute.sql.execute.SQLExecuteTemplate.execute(SQLExecuteTemplate.java:51)
at 
org.apache.shardingsphere.shardingjdbc.executor.AbstractStatementExecutor.executeCallback(AbstractStatementExecutor.java:129)
at 
org.apache.shardingsphere.shardingjdbc.executor.PreparedStatementExecutor.executeQuery(PreparedStatementExecutor.java:104)
at 
org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.executeQuery(ShardingPreparedStatement.java:118)
at sun.reflect.GeneratedMethodAccessor409.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:56)
at com.sun.proxy.$Proxy317.executeQuery(Unknown Source)
at 
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor.queryTotal(PaginationInterceptor.java:199)
   ```
   this select sql
   ```sql
   SELECT COUNT(1) FROM ( SELECT detail.item_id, detail.item_code, 
detail.item_name, MASTER.company_id, MASTER.company_name, MASTER.company_code, 
sum(expand.base_planned_qty) AS base_planned_qty, sum(expand.base_picked_qty) 
AS base_picked_qty, sum(expand.base_diffied_qty) AS base_diffied_qty FROM 
w_outbound_master MASTER LEFT JOIN w_outbound_detail detail ON MASTER.id = 
detail.outbound_id AND detail.warehouse_code = MASTER.warehouse_code LEFT JOIN 
w_outbound_detail_expand expand ON detail.id = expand.outbound_detail_id AND 
detail.warehouse_code = expand.warehouse_code LEFT JOIN w_wave_detail wd ON 
wd.outbound_master_id = MASTER.id AND wd.warehouse_code = MASTER.warehouse_code 
LEFT JOIN w_wave_master wm ON wm.id = wd.wave_id AND wm.warehouse_code = 
wd.warehouse_code LEFT JOIN w_customers customers ON MASTER.customer_id = 
customers.id AND MASTER.warehouse_code = customers.warehouse_code LEFT JOIN 
w_customer_collection collection ON collection.id = customers.collection_id AND 
collection
 .warehouse_code = customers.warehouse_code LEFT JOIN w_item_master item ON 
item.id = detail.item_id AND item.warehouse_code = detail.warehouse_code LEFT 
JOIN w_warm_layer layer ON layer.id = item.temp_id AND layer.warehouse_code = 
item.warehouse_code LEFT JOIN w_zone zone ON zone.temp_id = layer.id AND 
zone.warehouse_code = layer.warehouse_code LEFT JOIN w_work_area area ON 
area.zone_id = zone.id AND area.warehouse_code = zone.warehouse_code WHERE 
MASTER.warehouse_code = ? AND wm.is_allocated = 1 AND area.STATUS = 1 AND 
area.id = ? AND detail.item_type = 'BEEF' 

[GitHub] [shardingsphere] codecov-commenter edited a comment on pull request #10277: fix PG show syntax conflicting with DistSQL

2021-05-07 Thread GitBox


codecov-commenter edited a comment on pull request #10277:
URL: https://github.com/apache/shardingsphere/pull/10277#issuecomment-835034551


   # 
[Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#10277](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (cab69e9) into 
[master](https://codecov.io/gh/apache/shardingsphere/commit/ef43076049305f2815df51777ad34d36c5583e28?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (ef43076) will **increase** coverage by `0.07%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head cab69e9 differs from pull request most recent 
head 7fd5adc. Consider uploading reports for the commit 7fd5adc to get more 
accurate results
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/shardingsphere/pull/10277/graphs/tree.svg?width=650=150=pr=ZvlXpWa7so_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff  @@
   ## master   #10277  +/-   ##
   
   + Coverage 67.86%   67.94%   +0.07% 
 Complexity  683  683  
   
 Files  1706 1706  
 Lines 2928929289  
 Branches   5268 5268  
   
   + Hits  1987819900  +22 
   + Misses 7871 7848  -23 
   - Partials   1540 1541   +1 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | 
[...ing/core/job/task/incremental/IncrementalTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10277/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbmNyZW1lbnRhbC9JbmNyZW1lbnRhbFRhc2suamF2YQ==)
 | `75.00% <0.00%> (+2.08%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...scaling/core/job/task/inventory/InventoryTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10277/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbnZlbnRvcnkvSW52ZW50b3J5VGFzay5qYXZh)
 | `75.55% <0.00%> (+6.66%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...re/scaling/core/executor/engine/ExecuteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10277/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9leGVjdXRvci9lbmdpbmUvRXhlY3V0ZUVuZ2luZS5qYXZh)
 | `100.00% <0.00%> (+11.11%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...sphere/scaling/core/job/schedule/JobScheduler.java](https://codecov.io/gh/apache/shardingsphere/pull/10277/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2Ivc2NoZWR1bGUvSm9iU2NoZWR1bGVyLmphdmE=)
 | `51.85% <0.00%> (+29.62%)` | `0.00% <0.00%> (ø%)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Last 

[GitHub] [shardingsphere] codecov-commenter commented on pull request #10281: Fixes disable data nodes

2021-05-07 Thread GitBox


codecov-commenter commented on pull request #10281:
URL: https://github.com/apache/shardingsphere/pull/10281#issuecomment-835108012


   # 
[Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10281?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#10281](https://codecov.io/gh/apache/shardingsphere/pull/10281?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (89e1cfc) into 
[master](https://codecov.io/gh/apache/shardingsphere/commit/ef43076049305f2815df51777ad34d36c5583e28?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (ef43076) will **increase** coverage by `0.07%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/shardingsphere/pull/10281/graphs/tree.svg?width=650=150=pr=ZvlXpWa7so_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/10281?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff  @@
   ## master   #10281  +/-   ##
   
   + Coverage 67.86%   67.94%   +0.07% 
 Complexity  683  683  
   
 Files  1706 1706  
 Lines 2928929289  
 Branches   5268 5268  
   
   + Hits  1987819900  +22 
   + Misses 7871 7848  -23 
   - Partials   1540 1541   +1 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/shardingsphere/pull/10281?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | 
[...e/governance/core/registry/RegistryCenterNode.java](https://codecov.io/gh/apache/shardingsphere/pull/10281/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9SZWdpc3RyeUNlbnRlck5vZGUuamF2YQ==)
 | `80.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | 
[...ing/core/job/task/incremental/IncrementalTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10281/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbmNyZW1lbnRhbC9JbmNyZW1lbnRhbFRhc2suamF2YQ==)
 | `75.00% <0.00%> (+2.08%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...scaling/core/job/task/inventory/InventoryTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10281/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbnZlbnRvcnkvSW52ZW50b3J5VGFzay5qYXZh)
 | `75.55% <0.00%> (+6.66%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...re/scaling/core/executor/engine/ExecuteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10281/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9leGVjdXRvci9lbmdpbmUvRXhlY3V0ZUVuZ2luZS5qYXZh)
 | `100.00% <0.00%> (+11.11%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...sphere/scaling/core/job/schedule/JobScheduler.java](https://codecov.io/gh/apache/shardingsphere/pull/10281/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2Ivc2NoZWR1bGUvSm9iU2NoZWR1bGVyLmphdmE=)
 | `51.85% <0.00%> (+29.62%)` | `0.00% <0.00%> (ø%)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10281?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn 

[GitHub] [shardingsphere] avalon5666 commented on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


avalon5666 commented on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-834965315


   1. Use "@TableId(type = IdType.AUTO)"
   2. id's type in class not match uuid


-- 
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




[GitHub] [shardingsphere] strongduanmu opened a new pull request #10277: fix PG show syntax conflicting with DistSQL

2021-05-07 Thread GitBox


strongduanmu opened a new pull request #10277:
URL: https://github.com/apache/shardingsphere/pull/10277


   Fixes #10271.
   
   Changes proposed in this pull request:
   - fix PG show syntax conflicting with an explicit `EOF`
   


-- 
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




[GitHub] [shardingsphere] XUZHOUWANG commented on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


XUZHOUWANG commented on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-834987100


   https://blog.csdn.net/qiaoqiyu6416/article/details/107044664/


-- 
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




[GitHub] [shardingsphere] XUZHOUWANG commented on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


XUZHOUWANG commented on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-834999874


   > Follow step 1 ~ 2
   
   it‘s okay. but i want to the value of the   primary key  created by the 
snowflake set by the sharding configuration. while step 1~2,the id is created 
by the mybatis-plus framework.


-- 
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




[GitHub] [shardingsphere] avalon5666 commented on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


avalon5666 commented on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-835003426


   "IdType.AUTO" is created by the database,it will create by shardingsphere 
database middleware


-- 
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




[GitHub] [shardingsphere] codecov-commenter commented on pull request #10277: fix PG show syntax conflicting with DistSQL

2021-05-07 Thread GitBox


codecov-commenter commented on pull request #10277:
URL: https://github.com/apache/shardingsphere/pull/10277#issuecomment-835034551


   # 
[Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#10277](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6860202) into 
[master](https://codecov.io/gh/apache/shardingsphere/commit/ef43076049305f2815df51777ad34d36c5583e28?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (ef43076) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/shardingsphere/pull/10277/graphs/tree.svg?width=650=150=pr=ZvlXpWa7so_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff@@
   ## master   #10277   +/-   ##
   =
 Coverage 67.86%   67.86%   
 Complexity  683  683   
   =
 Files  1706 1706   
 Lines 2928929289   
 Branches   5268 5268   
   =
 Hits  1987819878   
 Misses 7871 7871   
 Partials   1540 1540   
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Last update 
[ef43076...6860202](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=lastupdated_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Read the [comment 
docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
   


-- 
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




[GitHub] [shardingsphere] wenjixi opened a new issue #10280: why proxy not support ddl sql in xa transaction

2021-05-07 Thread GitBox


wenjixi opened a new issue #10280:
URL: https://github.com/apache/shardingsphere/issues/10280


   ```java
   coordinator.database.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine
   
  @Override
   public void checkExecutePrerequisites(final ExecutionContext 
executionContext) {
   if 
(isExecuteDDLInXATransaction(executionContext.getSqlStatementContext().getSqlStatement()))
 {
   throw new 
TableModifyInTransactionException(getTableName(executionContext.getSqlStatementContext()));
   }
   }
   
private boolean isExecuteDDLInXATransaction(final SQLStatement 
sqlStatement) {
   TransactionStatus transactionStatus = 
backendConnection.getTransactionStatus();
   return TransactionType.XA == transactionStatus.getTransactionType()
   && sqlStatement instanceof DDLStatement
   && transactionStatus.isInTransaction();
   }
   ```
   when i use ,it throw exception
   
   ```java
   coordinator.database.exception.TableModifyInTransactionException
at 
coordinator.database.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.checkExecutePrerequisites(JDBCExecuteEngine.java:79)
at 
coordinator.database.communication.jdbc.JDBCDatabaseCommunicationEngine.doExecute(JDBCDatabaseCommunicationEngine.java:96)
at 
coordinator.database.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:74)
at 
coordinator.database.text.query.QueryBackendHandler.execute(QueryBackendHandler.java:54)
at 
coordinator.provider.postgresql.command.query.text.PostgreSQLComQueryExecutor.execute(PostgreSQLComQueryExecutor.java:73)
at 
coordinator.provider.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:108)
at 
coordinator.provider.command.CommandExecutorTask.run(CommandExecutorTask.java:76)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
   ```
   ```
   
   


-- 
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




[GitHub] [shardingsphere] menghaoranss opened a new pull request #10281: Fixes disable data nodes

2021-05-07 Thread GitBox


menghaoranss opened a new pull request #10281:
URL: https://github.com/apache/shardingsphere/pull/10281


   
   


-- 
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




[shardingsphere] branch master updated: Add checking (#10268)

2021-05-07 Thread duanzhengqiang
This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
 new ef43076  Add checking (#10268)
ef43076 is described below

commit ef43076049305f2815df51777ad34d36c5583e28
Author: Juan Pan(Trista) 
AuthorDate: Sat May 8 09:12:35 2021 +0800

Add checking (#10268)
---
 .../authority/provider/natived/builder/StoragePrivilegeBuilder.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/shardingsphere-infra/shardingsphere-infra-authority/shardingsphere-infra-authority-common/src/main/java/org/apache/shardingsphere/authority/provider/natived/builder/StoragePrivilegeBuilder.java
 
b/shardingsphere-infra/shardingsphere-infra-authority/shardingsphere-infra-authority-common/src/main/java/org/apache/shardingsphere/authority/provider/natived/builder/StoragePrivilegeBuilder.java
index 7854874..91d2c7f 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-authority/shardingsphere-infra-authority-common/src/main/java/org/apache/shardingsphere/authority/provider/natived/builder/StoragePrivilegeBuilder.java
+++ 
b/shardingsphere-infra/shardingsphere-infra-authority/shardingsphere-infra-authority-common/src/main/java/org/apache/shardingsphere/authority/provider/natived/builder/StoragePrivilegeBuilder.java
@@ -117,8 +117,10 @@ public final class StoragePrivilegeBuilder {
 private static void save(final DataSource dataSource, final 
Collection users, final StoragePrivilegeHandler handler) {
 try {
 Collection noneExisted = handler.diff(users, 
dataSource);
-handler.create(noneExisted, dataSource);
-handler.grantAll(noneExisted, dataSource);
+if (!noneExisted.isEmpty()) {
+handler.create(noneExisted, dataSource);
+handler.grantAll(noneExisted, dataSource);
+}
 } catch (final SQLException ex) {
 throw new ShardingSphereException(ex);
 }


[GitHub] [shardingsphere] avalon5666 commented on issue #10263: getting org.antlr.v4.runtime.tree.ErrorNodeImpl cannot be cast to org.antlr.v4.runtime.ParserRuleContext

2021-05-07 Thread GitBox


avalon5666 commented on issue #10263:
URL: 
https://github.com/apache/shardingsphere/issues/10263#issuecomment-834951827


   Pls try newest version.


-- 
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




[GitHub] [shardingsphere] avalon5666 removed a comment on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


avalon5666 removed a comment on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-834962325


   Use "@TableId(type = IdType.AUTO)"


-- 
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




[GitHub] [shardingsphere] avalon5666 commented on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


avalon5666 commented on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-834962325


   Use "@TableId(type = IdType.AUTO)"


-- 
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




[GitHub] [shardingsphere] avalon5666 commented on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


avalon5666 commented on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-834990739


   Follow step 1 ~ 2


-- 
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




[GitHub] [shardingsphere] strongduanmu commented on issue #10271: PostgreSQL `SHOW xxx` syntax conflicting with DistSQL

2021-05-07 Thread GitBox


strongduanmu commented on issue #10271:
URL: 
https://github.com/apache/shardingsphere/issues/10271#issuecomment-834997974


   @tristaZero I tested PG `show statement` parsing, and found that antlr can 
match invalid content by default, which caused the `show statement` in distsql 
to fail to be executed. By specifying a explicit `EOF` lexical symbol, we can 
force to match all inputs, and invalid content will cause exceptions. 
   
   Before adding `EOF`:
   
![image](https://user-images.githubusercontent.com/10829171/117523407-fefaf600-afea-11eb-8307-06cd83223cf0.png)
   
   After adding `EOF`:
   
![image](https://user-images.githubusercontent.com/10829171/117523479-1c2fc480-afeb-11eb-8a7d-f9d69243ffc7.png)
   


-- 
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




[GitHub] [shardingsphere] avalon5666 commented on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


avalon5666 commented on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-835001605


   How to confirm the id is created by the mybatis-plus framework?


-- 
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




[GitHub] [shardingsphere] avalon5666 edited a comment on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


avalon5666 edited a comment on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-835003426


   "IdType.AUTO" is created by the database,it will create by shardingsphere 
database middleware,mybatis-plus do nothing.


-- 
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




[GitHub] [shardingsphere] XUZHOUWANG commented on issue #10274: The primary key is sharding column created the key value by the GeneratedKey config 。 is it okay?

2021-05-07 Thread GitBox


XUZHOUWANG commented on issue #10274:
URL: 
https://github.com/apache/shardingsphere/issues/10274#issuecomment-835009849


   > "IdType.AUTO" is created by the database,it will create by shardingsphere 
database middleware,mybatis-plus do nothing.
   
   it's okay. I try it. it's fine. I know the "IdType.ASSIGN_ID" procedure. But 
I don't really try the "IdType.AUTO". thank you


-- 
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




[GitHub] [shardingsphere] LikeElephantintheforest opened a new issue #10278: SELECT LAST_INSERT_ID() expect return the self-growth primary key

2021-05-07 Thread GitBox


LikeElephantintheforest opened a new issue #10278:
URL: https://github.com/apache/shardingsphere/issues/10278


   ## Question
   
   At mybatis mapper.xml , I using following code to expect return the 
self-growth primary key and then hope the model have id value.
   
   ```sql
   
 SELECT LAST_INSERT_ID()
   
   ```
   > but it given me null .
   
   in my sharding conf , I setting master-slave like this :
   
   sharding.jdbc.config.sharding.master-slave-rules.ms0.master-data-source-name 
= 
   sharding.jdbc.config.sharding.master-slave-rules.ms0.slave-data-source-names 
= 
   sharding.jdbc.config.sharding.master-slave-rules.ms1.master-data-source-name 
= 
   sharding.jdbc.config.sharding.master-slave-rules.ms1.slave-data-source-names 
= 
   sharding.jdbc.config.sharding.master-slave-rules.ms2.master-data-source-name 
= 
   sharding.jdbc.config.sharding.master-slave-rules.ms2.slave-data-source-names 
=
   sharding.jdbc.config.sharding.master-slave-rules.ms3.master-data-source-name 
= 
   sharding.jdbc.config.sharding.master-slave-rules.ms3.slave-data-source-names 
= 
   sharding.jdbc.config.sharding.master-slave-rules.ms4.master-data-source-name 
= 
   sharding.jdbc.config.sharding.master-slave-rules.ms4.slave-data-source-names 
= 
   // ignore other settings 
   
   when i remove  master - slave conf ,  i unexpectedly get the self-growth 
primary key , i don't konw why  
   
   look other about  'SELECT LAST_INSERT_ID()' issures , talks shading not 
support this way , but it cant explain why did i remove master - slave conf ,it 
can be works .
   
   sorry for my bad English , thanks ,谢谢。
   
   current talk version like :
   
![image](https://user-images.githubusercontent.com/28836829/117523291-9f9ce600-afea-11eb-82e5-7bceaff7c720.png)
   
   
   
   


-- 
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




[GitHub] [shardingsphere] codecov-commenter edited a comment on pull request #10277: fix PG show syntax conflicting with DistSQL

2021-05-07 Thread GitBox


codecov-commenter edited a comment on pull request #10277:
URL: https://github.com/apache/shardingsphere/pull/10277#issuecomment-835034551


   # 
[Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#10277](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (7fd5adc) into 
[master](https://codecov.io/gh/apache/shardingsphere/commit/ef43076049305f2815df51777ad34d36c5583e28?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (ef43076) will **increase** coverage by `0.07%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/shardingsphere/pull/10277/graphs/tree.svg?width=650=150=pr=ZvlXpWa7so_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff  @@
   ## master   #10277  +/-   ##
   
   + Coverage 67.86%   67.94%   +0.07% 
 Complexity  683  683  
   
 Files  1706 1706  
 Lines 2928929289  
 Branches   5268 5268  
   
   + Hits  1987819900  +22 
   + Misses 7871 7848  -23 
   - Partials   1540 1541   +1 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | 
[...ing/core/job/task/incremental/IncrementalTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10277/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbmNyZW1lbnRhbC9JbmNyZW1lbnRhbFRhc2suamF2YQ==)
 | `75.00% <0.00%> (+2.08%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...scaling/core/job/task/inventory/InventoryTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10277/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbnZlbnRvcnkvSW52ZW50b3J5VGFzay5qYXZh)
 | `75.55% <0.00%> (+6.66%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...re/scaling/core/executor/engine/ExecuteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10277/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9leGVjdXRvci9lbmdpbmUvRXhlY3V0ZUVuZ2luZS5qYXZh)
 | `100.00% <0.00%> (+11.11%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...sphere/scaling/core/job/schedule/JobScheduler.java](https://codecov.io/gh/apache/shardingsphere/pull/10277/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2Ivc2NoZWR1bGUvSm9iU2NoZWR1bGVyLmphdmE=)
 | `51.85% <0.00%> (+29.62%)` | `0.00% <0.00%> (ø%)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10277?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Last update 

[GitHub] [shardingsphere-ui] lovlyhao opened a new issue #86: {"success":false,"errorCode":400,"errorMsg":"rule configuration is invalid.","model":null}

2021-05-07 Thread GitBox


lovlyhao opened a new issue #86:
URL: https://github.com/apache/shardingsphere-ui/issues/86


   
![image](https://user-images.githubusercontent.com/30038949/117528251-d6332a80-b003-11eb-87c7-0cf17e25c951.png)
   
![image](https://user-images.githubusercontent.com/30038949/117528253-db907500-b003-11eb-978e-59a290b6f875.png)
   去掉复杂分配就可以保存成功 ?


-- 
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




[GitHub] [shardingsphere] terrymanu opened a new pull request #10276: Complete missing protocol impl for MySQLColumnDefinition41Packet with COM_FIELD_LIST command

2021-05-07 Thread GitBox


terrymanu opened a new pull request #10276:
URL: https://github.com/apache/shardingsphere/pull/10276


   The protocol impl is missing if using COM_FIELD_LIST command.
   
   please check: 
https://dev.mysql.com/doc/internals/en/com-query-response.html#packet-Protocol::ColumnDefinition41
   
   ```
 if command was COM_FIELD_LIST {
   lenenc_int length of default-values
   string[$len]   default values
 }
   ```


-- 
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




[shardingsphere] branch master updated: Complete missing protocol impl for MySQLColumnDefinition41Packet with COM_FIELD_LIST command (#10276)

2021-05-07 Thread menghaoran
This is an automated email from the ASF dual-hosted git repository.

menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
 new 639e346  Complete missing protocol impl for 
MySQLColumnDefinition41Packet with COM_FIELD_LIST command (#10276)
639e346 is described below

commit 639e346f26593553f9455a19903c821e1acb3dab
Author: Liang Zhang 
AuthorDate: Sat May 8 00:45:34 2021 +0800

Complete missing protocol impl for MySQLColumnDefinition41Packet with 
COM_FIELD_LIST command (#10276)
---
 .../command/query/MySQLColumnDefinition41Packet.java   | 18 ++
 .../binary/prepare/MySQLComStmtPrepareExecutor.java|  4 ++--
 .../command/query/builder/ResponsePacketBuilder.java   |  2 +-
 .../fieldlist/MySQLComFieldListPacketExecutor.java |  2 +-
 4 files changed, 18 insertions(+), 8 deletions(-)

diff --git 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/MySQLColumnDefinition41Packet.java
 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/MySQLColumnDefinition41Packet.java
index 53259f1..e46fa80 100644
--- 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/MySQLColumnDefinition41Packet.java
+++ 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/MySQLColumnDefinition41Packet.java
@@ -62,10 +62,12 @@ public final class MySQLColumnDefinition41Packet implements 
MySQLPacket {
 
 private final int decimals;
 
+private final boolean containDefaultValues;
+
 public MySQLColumnDefinition41Packet(final int sequenceId, final 
ResultSetMetaData resultSetMetaData, final int columnIndex) throws SQLException 
{
 this(sequenceId, resultSetMetaData.getSchemaName(columnIndex), 
resultSetMetaData.getTableName(columnIndex), 
resultSetMetaData.getTableName(columnIndex), 
 resultSetMetaData.getColumnLabel(columnIndex), 
resultSetMetaData.getColumnName(columnIndex), 
resultSetMetaData.getColumnDisplaySize(columnIndex), 
-
MySQLBinaryColumnType.valueOfJDBCType(resultSetMetaData.getColumnType(columnIndex)),
 resultSetMetaData.getScale(columnIndex));
+
MySQLBinaryColumnType.valueOfJDBCType(resultSetMetaData.getColumnType(columnIndex)),
 resultSetMetaData.getScale(columnIndex), false);
 }
 
 /*
@@ -74,12 +76,14 @@ public final class MySQLColumnDefinition41Packet implements 
MySQLPacket {
  * @see https://github.com/apache/shardingsphere/issues/4358;>
  */
 public MySQLColumnDefinition41Packet(final int sequenceId, final String 
schema, final String table, final String orgTable,
- final String name, final String 
orgName, final int columnLength, final MySQLBinaryColumnType columnType, final 
int decimals) {
-this(sequenceId, 0, schema, table, orgTable, name, orgName, 
columnLength, columnType, decimals);
+ final String name, final String 
orgName, final int columnLength, final MySQLBinaryColumnType columnType, 
+ final int decimals, final boolean 
containDefaultValues) {
+this(sequenceId, 0, schema, table, orgTable, name, orgName, 
columnLength, columnType, decimals, containDefaultValues);
 }
 
 public MySQLColumnDefinition41Packet(final int sequenceId, final int 
flags, final String schema, final String table, final String orgTable,
- final String name, final String 
orgName, final int columnLength, final MySQLBinaryColumnType columnType, final 
int decimals) {
+ final String name, final String 
orgName, final int columnLength, final MySQLBinaryColumnType columnType, 
+ final int decimals, final boolean 
containDefaultValues) {
 this.sequenceId = sequenceId;
 characterSet = MySQLServerInfo.CHARSET;
 this.flags = flags;
@@ -91,6 +95,7 @@ public final class MySQLColumnDefinition41Packet implements 
MySQLPacket {
 this.columnLength = columnLength;
 this.columnType = columnType;
 this.decimals = decimals;
+this.containDefaultValues = containDefaultValues;
 }
 
 public MySQLColumnDefinition41Packet(final MySQLPacketPayload payload) {
@@ -108,6 +113,7 @@ public final class MySQLColumnDefinition41Packet implements 
MySQLPacket {
 flags = payload.readInt2();
 decimals = payload.readInt1();
 payload.skipReserved(2);
+containDefaultValues = false;
 }
 
 @Override

[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database

2021-05-07 Thread GitBox


ThanoshanMV commented on a change in pull request #10253:
URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r628421537



##
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##
@@ -1421,3 +1421,258 @@ leadCdbUriClause
 propertyClause
 : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName
 ;
+
+alterSystem
+: ALTER SYSTEM alterSystemOption
+;
+
+alterSystemOption
+: archiveLogClause
+| checkpointClause
+| checkDatafilesClause
+| distributedRecovClauses
+| flushClause
+| endSessionClauses
+| switchLogfileClause
+| suspendResumeClause
+| quiesceClauses
+| rollingMigrationClauses
+| rollingPatchClauses
+| alterSystemSecuriyClauses
+| affinityClauses
+| shutdownDispatcherClause
+| registerClause
+| setClause
+| resetClause
+| relocateClientClause
+| cancelSqlClause
+| flushPasswordfileMetadataCacheClause
+;
+
+archiveLogClause
+: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | 
currentClause | groupClause | logfileClause | nextClause | allClause) 
toLocationClause?
+;
+
+checkpointClause
+: CHECKPOINT (GLOBAL | LOCAL)?
+;
+
+checkDatafilesClause
+: CHECK DATAFILES (GLOBAL | LOCAL)?
+;
+
+distributedRecovClauses
+: (ENABLE | DISABLE) DISTRIBUTED RECOVERY
+;
+
+flushClause
+: FLUSH flushClauseOption
+;
+
+endSessionClauses
+: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)?
+;
+
+switchLogfileClause
+: SWITCH LOGFILE
+;
+
+suspendResumeClause
+: SUSPEND | RESUME
+;
+
+quiesceClauses
+: QUIESCE RESTRICTED | UNQUIESCE
+;
+
+rollingMigrationClauses
+: startRollingMigrationClause | stopRollingMigrationClause
+;
+
+rollingPatchClauses
+: startRollingPatchClause | stopRollingPatchClause
+;
+
+alterSystemSecuriyClauses
+: restrictedSessionClause | setEncryptionWalletOpenClause | 
setEncryptionWalletCloseClause | setEncryptionKeyClause
+;
+
+affinityClauses
+: enableAffinityClause | disableAffinityClause
+;
+
+shutdownDispatcherClause
+: SHUTDOWN IMMEDIATE? dispatcherName
+;
+
+registerClause
+: REGISTER
+;
+
+setClause
+: SET alterSystemSetClause+
+;
+
+resetClause
+: RESET alterSystemResetClause+
+;
+
+relocateClientClause
+: RELOCATE CLIENT clientId
+;
+
+cancelSqlClause
+: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_
+;
+
+flushPasswordfileMetadataCacheClause
+: FLUSH PASSWORDFILE_METADATA_CACHE
+;
+
+instanceClause
+: INSTANCE instanceName
+;
+
+sequenceClause
+: SEQUENCE numberLiterals

Review comment:
   I added the `INTEGER_` rule but the parse tree matches with `NUMBER_` 
   
![changeClause](https://user-images.githubusercontent.com/48581379/117492679-929ed900-af8f-11eb-9b5a-b655ca1645d3.png)
   
   
   Build fails as well
   
![BuildFails](https://user-images.githubusercontent.com/48581379/117489741-9c264200-af8b-11eb-8046-a956c411f304.png)
   
   Then I tried to change rules for `NUMBER_`, it doesn't work too.
   
![changeIntegerAndNumberRules](https://user-images.githubusercontent.com/48581379/117491974-99791c00-af8e-11eb-88cc-dc0a4c14926e.png)
   




-- 
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