Skip to content

When MultiNodeQueryHandler send multiple sql statements to mysql, if the middle part failed to execute, frontend session will hang #1164

@tankilo

Description

@tankilo
  • dble version:
  • preconditions :
    no
  • configs:

schema.xml

<table name="xa_test" dataNode="dn1,dn2" rule="sharding-by-mod2" primaryKey="ID"/>

rule.xml

<tableRule name="sharding-by-mod2">
       <rule>
           <columns>id</columns>
           <algorithm>hashmod2</algorithm>
       </rule>
</tableRule>
<function name="hashmod2" class="Hash">
       <property name="partitionCount">2</property>
       <property name="partitionLength">1</property>
</function>

server.xml



  • steps:
    step1. edit com.actiontech.dble.backend.mysql.nio.MySQLConnection#synAndDoExecuteMultiNode
    image
    add following code
xaCmd = xaCmd.replace("'", "\\'");
xaCmd = "MOCK ERROR '" + xaCmd + "'";

step2. execute sql

set xa = 1;
delete from xa_test;
  • expect result:

    1. sql execution returns the exepcted syntax error response
  • real result:

    1. cmd hang!!!
      image
  • supplements:
    1.

/label ~BUG

Metadata

Metadata

Assignees

Labels

communityissue from communityresolveproblem has been fixed by developer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions