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 2021/10/22 09:07:53 UTC

[GitHub] [shardingsphere] tuichenchuxin opened a new pull request #13224: Support binlog statement for mysql.

tuichenchuxin opened a new pull request #13224:
URL: https://github.com/apache/shardingsphere/pull/13224


   Fixes #13144.
   
   Changes proposed in this pull request:
   - support binlog statement
   - add test case
   


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu merged pull request #13224: Support binlog statement for mysql.

Posted by GitBox <gi...@apache.org>.
strongduanmu merged pull request #13224:
URL: https://github.com/apache/shardingsphere/pull/13224


   


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-commenter commented on pull request #13224: Support binlog statement for mysql.

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #13224:
URL: https://github.com/apache/shardingsphere/pull/13224#issuecomment-950307508


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13224?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#13224](https://codecov.io/gh/apache/shardingsphere/pull/13224?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (886b2f5) into [master](https://codecov.io/gh/apache/shardingsphere/commit/2dc81c0ae605525f3f5f6029fe72874b9ec63102?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2dc81c0) will **decrease** coverage by `0.24%`.
   > The diff coverage is `55.55%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/13224/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/13224?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #13224      +/-   ##
   ============================================
   - Coverage     63.24%   62.99%   -0.25%     
   - Complexity     1399     1406       +7     
   ============================================
     Files          2557     2564       +7     
     Lines         38119    38422     +303     
     Branches       6542     6597      +55     
   ============================================
   + Hits          24107    24205      +98     
   - Misses        12117    12314     +197     
   - Partials       1895     1903       +8     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/13224?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ized/asserts/statement/dal/DALStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zdGF0ZW1lbnQvZGFsL0RBTFN0YXRlbWVudEFzc2VydC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...statement/dal/impl/MySQLBinlogStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zdGF0ZW1lbnQvZGFsL2ltcGwvTXlTUUxCaW5sb2dTdGF0ZW1lbnRBc3NlcnQuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...or/statement/impl/MySQLDALStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1teXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9teXNxbC92aXNpdG9yL3N0YXRlbWVudC9pbXBsL015U1FMREFMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `59.21% <100.00%> (+0.17%)` | :arrow_up: |
   | [...l/parser/core/database/visitor/SQLVisitorRule.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWVuZ2luZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9jb3JlL2RhdGFiYXNlL3Zpc2l0b3IvU1FMVmlzaXRvclJ1bGUuamF2YQ==) | `100.00% <100.00%> (ø)` | |
   | [...eterized/jaxb/cases/domain/SQLParserTestCases.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vU1FMUGFyc2VyVGVzdENhc2VzLmphdmE=) | `99.69% <100.00%> (+<0.01%)` | :arrow_up: |
   | [.../domain/statement/dal/BinlogStatementTestCase.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc3RhdGVtZW50L2RhbC9CaW5sb2dTdGF0ZW1lbnRUZXN0Q2FzZS5qYXZh) | `100.00% <100.00%> (ø)` | |
   | [...ine/dml/AbstractShadowDMLStatementRouteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhZG93L3NoYXJkaW5nc3BoZXJlLXNoYWRvdy1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFkb3cvcm91dGUvZW5naW5lL2RtbC9BYnN0cmFjdFNoYWRvd0RNTFN0YXRlbWVudFJvdXRlRW5naW5lLmphdmE=) | `46.15% <0.00%> (-18.56%)` | :arrow_down: |
   | [...hecker/AbstractShadowRuleConfigurationChecker.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhZG93L3NoYXJkaW5nc3BoZXJlLXNoYWRvdy1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFkb3cvY2hlY2tlci9BYnN0cmFjdFNoYWRvd1J1bGVDb25maWd1cmF0aW9uQ2hlY2tlci5qYXZh) | `58.13% <0.00%> (-13.87%)` | :arrow_down: |
   | [.../apache/shardingsphere/shadow/rule/ShadowRule.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhZG93L3NoYXJkaW5nc3BoZXJlLXNoYWRvdy1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFkb3cvcnVsZS9TaGFkb3dSdWxlLmphdmE=) | `59.25% <0.00%> (-2.45%)` | :arrow_down: |
   | [...distsql/exception/rule/DuplicateRuleException.java](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9kaXN0c3FsL2V4Y2VwdGlvbi9ydWxlL0R1cGxpY2F0ZVJ1bGVFeGNlcHRpb24uamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | ... and [56 more](https://codecov.io/gh/apache/shardingsphere/pull/13224/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13224?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13224?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2dc81c0...886b2f5](https://codecov.io/gh/apache/shardingsphere/pull/13224?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #13224: Support binlog statement for mysql.

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #13224:
URL: https://github.com/apache/shardingsphere/pull/13224#discussion_r734442956



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/dal/MySQLBinlogStatement.java
##########
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dal;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.dal.BinlogSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.dal.DALStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.MySQLStatement;
+
+/**
+ * MySQL binlog statement.
+ */
+@ToString
+@Setter
+@Getter
+public final class MySQLBinlogStatement extends AbstractSQLStatement implements DALStatement, MySQLStatement {
+    
+    private BinlogSegment binlogSegment;

Review comment:
       @tuichenchuxin Why not put the BinlogSegment field directly into MySQLBinlogSegment?




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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org