Skip to content

SubQuery with ”select *“ may cause connection closed and StackOverflow #624

@yanhuqing666

Description

@yanhuqing666
  • dble version: all

  • preconditions :
    CREATE TABLE sharding_two_node (
    id int(11) NOT NULL,
    c_flag char(255) DEFAULT NULL,
    c_decimal decimal(16,4) DEFAULT NULL,
    PRIMARY KEY (id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

  • configs:

schema.xml

<table name="sharding_two_node" dataNode="dn1,dn2" rule="two_node_hash"/>

rule.xml

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE dble:rule SYSTEM "rule.dtd">
<dble:rule xmlns:dble="http://dble.cloud/">
    <tableRule name="two_node_hash">
        <rule>
            <columns>id</columns>
            <algorithm>two_node_hash</algorithm>
       </rule>
    </tableRule>
    <function name="two_node_hash" class="Hash">
        <property name="partitionCount">2</property>
	<property name="partitionLength">512</property>
    </function>
</dble:rule>

server.xml

-

  • steps:
    step1. select count(*) from sharding_two_node where id = (select * from sharding_two_node where id =1);
  • expect result:
    1.ERROR 1241 (HY000): Operand should contain 1 column(s)
  • real result:
    1.ERROR 2006 (HY000): MySQL server has gone away
    2.dble will in dead loop and dble.log will throw StackOverflowError
  • supplements:
    1.

/label ~BUG

Metadata

Metadata

Assignees

Labels

complex-queryresolveproblem has been fixed by developerverifiedissue's resolve was verified by tester

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions