Skip to content

when complex cross join contained in a xa-transaction, the statement commit can't return #1116

@funnyAnt

Description

@funnyAnt
  • dble version:
    2.19.01.0
  • preconditions :
    no
  • configs:

schema.xml

<schema name="dbtest">
		<table dataNode="dn1,dn2" name="sbtest1" rule="mod2" />
   </schema>

	<dataNode name="dn1" dataHost="localhost1" database="sysbench_0" />
	<dataNode name="dn2" dataHost="localhost1" database="sysbench_1" />

rule.xml

	<tableRule name="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. create jdbc class ,contain the following codes:
    Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection("jdbc:mysql://ip:port/dbtest?user=root&password=123"); Statement stat = conn.createStatement(); stat.execute("begin"); stat.execute("set xa=1"); stat.executeQuery("SELECT * FROM( SELECT 1 FROM sbtest1 T where id in(1,2) ORDER BY id) S"); stat.execute("commit");

    step2. run this jdbc class

  • expect result:

    1. The jdbc program ends normally
  • real result:

    1. stat.execute("commit") can't return
  • supplements:
    1.

/label ~BUG

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions