You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/01/06 09:22:46 UTC

[GitHub] [incubator-shardingsphere] cherrylzhao opened a new pull request #3879: fix proxy hang up while throwing a customize SQLException

cherrylzhao opened a new pull request #3879: fix proxy hang up while throwing a customize SQLException
URL: https://github.com/apache/incubator-shardingsphere/pull/3879
 
 
   After proxy throw a customize SQLException, proxy will hang up with error packet since SQLSate is null

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on a change in pull request #3879: fix proxy hang up while throwing a customize SQLException

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #3879: fix proxy hang up while throwing a customize SQLException
URL: https://github.com/apache/incubator-shardingsphere/pull/3879#discussion_r363290975
 
 

 ##########
 File path: sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/mysql/MySQLErrPacketFactory.java
 ##########
 @@ -48,7 +48,7 @@
     public static MySQLErrPacket newInstance(final int sequenceId, final Exception cause) {
         if (cause instanceof SQLException) {
             SQLException sqlException = (SQLException) cause;
-            return new MySQLErrPacket(sequenceId, sqlException.getErrorCode(), sqlException.getSQLState(), sqlException.getMessage());
+            return new MySQLErrPacket(sequenceId, sqlException.getErrorCode(), null != sqlException.getSQLState() ? sqlException.getSQLState() : "", sqlException.getMessage());
 
 Review comment:
   Please use a SQL State instead of empty string if we can find a suitable one.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls commented on issue #3879: fix proxy hang up while throwing a customize SQLException

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #3879: fix proxy hang up while throwing a customize SQLException
URL: https://github.com/apache/incubator-shardingsphere/pull/3879#issuecomment-571079005
 
 
   ## Pull Request Test Coverage Report for [Build 1272](https://coveralls.io/builds/27931583)
   
   * **1** of **1**   **(100.0%)**  changed or added relevant line in **1** file are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage remained the same at **65.031%**
   
   ---
   
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/27931583/badge)](https://coveralls.io/builds/27931583) |
   | :-- | --: |
   | Change from base [Build 649](https://coveralls.io/builds/27930935): |  0.0% |
   | Covered Lines: | 11385 |
   | Relevant Lines: | 17507 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu merged pull request #3879: fix proxy hang up while throwing a customize SQLException

Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #3879: fix proxy hang up while throwing a customize SQLException
URL: https://github.com/apache/incubator-shardingsphere/pull/3879
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #3879: fix proxy hang up while throwing a customize SQLException

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #3879: fix proxy hang up while throwing a customize SQLException
URL: https://github.com/apache/incubator-shardingsphere/pull/3879#issuecomment-571079005
 
 
   ## Pull Request Test Coverage Report for [Build 1275](https://coveralls.io/builds/27949244)
   
   * **3** of **3**   **(100.0%)**  changed or added relevant lines in **2** files are covered.
   * **51** unchanged lines in **10** files lost coverage.
   * Overall coverage decreased (**-0.06%**) to **64.971%**
   
   ---
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/context/MasterSlaveRuntimeContext.java](https://coveralls.io/builds/27949244/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fcontext%2FMasterSlaveRuntimeContext.java#L47) | 1 | 90.0% |
   | [shardingsphere-underlying/shardingsphere-common/src/main/java/org/apache/shardingsphere/underlying/common/metadata/datasource/DataSourceMetas.java](https://coveralls.io/builds/27949244/source?filename=shardingsphere-underlying%2Fshardingsphere-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Funderlying%2Fcommon%2Fmetadata%2Fdatasource%2FDataSourceMetas.java#L74) | 1 | 95.65% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/context/ShardingRuntimeContext.java](https://coveralls.io/builds/27949244/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fcontext%2FShardingRuntimeContext.java#L52) | 2 | 89.47% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/ShadowStatement.java](https://coveralls.io/builds/27949244/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fstatement%2FShadowStatement.java#L232) | 2 | 67.14% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/connection/ShadowConnection.java](https://coveralls.io/builds/27949244/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fconnection%2FShadowConnection.java#L162) | 3 | 16.67% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/context/ShadowRuntimeContext.java](https://coveralls.io/builds/27949244/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fcontext%2FShadowRuntimeContext.java#L52) | 4 | 80.0% |
   | [sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/schema/LogicSchemas.java](https://coveralls.io/builds/27949244/source?filename=sharding-proxy%2Fsharding-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingproxy%2Fbackend%2Fschema%2FLogicSchemas.java#L101) | 5 | 33.33% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/api/yaml/YamlShadowDataSourceFactory.java](https://coveralls.io/builds/27949244/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fapi%2Fyaml%2FYamlShadowDataSourceFactory.java#L53) | 8 | 0.0% |
   | [encrypt-core/encrypt-core-common/src/main/java/org/apache/shardingsphere/encrypt/metadata/loader/EncryptTableMetaDataLoader.java](https://coveralls.io/builds/27949244/source?filename=encrypt-core%2Fencrypt-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fencrypt%2Fmetadata%2Floader%2FEncryptTableMetaDataLoader.java#L40) | 10 | 0.0% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/ShadowPreparedStatement.java](https://coveralls.io/builds/27949244/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fstatement%2FShadowPreparedStatement.java#L203) | 15 | 48.7% |
   <!-- | **Total:** | **51** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/27949244/badge)](https://coveralls.io/builds/27949244) |
   | :-- | --: |
   | Change from base [Build 649](https://coveralls.io/builds/27930935): |  -0.06% |
   | Covered Lines: | 11364 |
   | Relevant Lines: | 17491 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services