-
Notifications
You must be signed in to change notification settings - Fork 320
Closed
Labels
non-sharding-tableresolveproblem has been fixed by developerproblem has been fixed by developerverifiedissue's resolve was verified by testerissue's resolve was verified by tester
Milestone
Description
- dble version:5.6.29-dble-9.9.9.9-3bd8798-20180907034656
- preconditions :
drop table if exists test_global;
drop table if exists a_order_no_shard;
CREATE TABLE test_global(`id` int(10) unsigned NOT NULL,`t_id` int(10) unsigned NOT NULL DEFAULT '0',`name` char(120) NOT NULL DEFAULT '',`pad` int(11) NOT NULL,PRIMARY KEY (`id`),KEY `k_1` (`t_id`))DEFAULT CHARSET=UTF8;
CREATE TABLE a_order_no_shard(`id` int(10) unsigned NOT NULL,`o_id` int(10) unsigned NOT NULL DEFAULT '0',`name` char(120) NOT NULL DEFAULT '',`pad` int(11) NOT NULL,PRIMARY KEY (`id`),KEY `k_1` (`o_id`))DEFAULT CHARSET=UTF8;
insert into test_global values(1,1,'test中id为1',1),(2,2,'test_2',2),(3,3,'test中id为3',4),(4,4,'$test$4',3),(5,5,'test...5',1),(6,6,'test6',6);
insert into a_order_no_shard values(1,1,'order中id为1',1),(2,2,'test_2',2),(3,3,'order中id为3',3),(4,4,'$order$4',4),(5,5,'order...5',1);
- configs:
schema.xml
<schema name="mytest" sqlMaxLimit="100" dataNode="dn5">
<table name="test_global" dataNode="dn1,dn2,dn3,dn4" type="global"/>
</schema>
<dataNode name="dn1" dataHost="172.100.9.5" database="db1" />
<dataNode name="dn2" dataHost="172.100.9.6" database="db1" />
<dataNode name="dn3" dataHost="172.100.9.5" database="db2" />
<dataNode name="dn4" dataHost="172.100.9.6" database="db2" />
<dataNode name="dn5" dataHost="172.100.9.5" database="db3" />
<dataHost name="172.100.9.5" maxCon="1000" minCon="10" balance="0" switchType="1" slaveThreshold="100">
<heartbeat>select user()</heartbeat>
<writeHost host="hostM1" url="172.100.9.5:3306" user="test"
password="111111">
</writeHost>
</dataHost>
<dataHost name="172.100.9.6" maxCon="1000" minCon="10" balance="0" switchType="1" slaveThreshold="100">
<heartbeat>select user()</heartbeat>
<writeHost host="hostM2" url="172.100.9.6:3306" user="test"
password="111111">
</writeHost>
</dataHost>
related sql list:
select id,pad from test_global where pad=(select min(id) from a_order_no_shard);
select id,t_id,name,pad from test_global where pad<(select pad from a_order_no_shard where id=3);
select id,t_id,name,pad from test_global having pad<(select pad from a_order_no_shard where id=3);
select id,name,(select count(*) from a_order_no_shard) count from test_global;
select id,t_id,name,pad from test_global where pad like (select pad from a_order_no_shard where id=3);
select count(*) from (select * from test_global where pad=(select pad from a_order_no_shard where id=1)) a;
select id,t_id,name,pad from test_global where 'test_2'=(select name from a_order_no_shard where id=2);
select id,t_id,name,pad from test_global where 5=(select count(*) from a_order_no_shard);
select id,t_id,name,pad from test_global where 'test_2' like(select name from a_order_no_shard where id=2);
- steps:
1 execute sql in docker dble: -- hang
mysql> select id,pad from test_global where pad=(select min(id) from a_order_no_shard);
2.execute the same sql in dble outside of docker:
MySQL [testdb]> select id,pad from test_global where pad=(select min(id) from a_order_no_shard);
+----+-----+
| id | pad |
+----+-----+
| 1 | 1 |
| 5 | 1 |
+----+-----+
2 rows in set (0.01 sec)
- expect result:
- sql inside docker should execute successful
- real result:
1.sql inside docker hang
/label ~BUG
Metadata
Metadata
Assignees
Labels
non-sharding-tableresolveproblem has been fixed by developerproblem has been fixed by developerverifiedissue's resolve was verified by testerissue's resolve was verified by tester