-
Notifications
You must be signed in to change notification settings - Fork 320
Closed
Labels
complex-queryresolveproblem 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:all **
- preconditions :
CREATE TABLEtest1(
idbigint(11) NOT NULL,
c_charchar(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE test2 (
id bigint(11) NOT NULL,
c_char char(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into test1 values(1,'1');
insert into test1(id) values(2);
insert into test2 values(1,'1');
insert into test2(id) values(2);
- configs:
schema.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE dble:schema SYSTEM "schema.dtd">
<schema name="nosharding_test" sqlMaxLimit="100" dataNode="dn5">
<table name="test1" dataNode="dn5" />
<table name="test2" dataNode="dn5" />
</schema>
rule.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE dble:rule SYSTEM "rule.dtd"><dble:rule xmlns:dble="http://dble.cloud/">
server.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE dble:server SYSTEM "server.dtd">
<dble:server xmlns:dble="http://dble.cloud/">
<system>
...
<property name="useJoinStrategy">false</property>
</system>
...
</dble:server>
- steps:
step1. select * from test1 a inner join test2 b on a.c_char =b.c_char;
step2. select * from test1 a right join test2 b on a.c_char =b.c_char;
step3. select * from test1 a left join test2 b on a.c_char =b.c_char; - expect result:
1.
+----+--------+----+--------+
| id | c_char | id | c_char |
+----+--------+----+--------+
| 1 | 1 | 1 | 1 |
+----+--------+----+--------+
1 row in set (0.05 sec)
+------+--------+----+--------+
| id | c_char | id | c_char |
+------+--------+----+--------+
| 1 | 1 | 1 | 1 |
| NULL | NULL | 2 | NULL |
+------+--------+----+--------+
2 rows in set (0.13 sec)
+----+--------+------+--------+
| id | c_char | id | c_char |
+----+--------+------+--------+
| 1 | 1 | 1 | 1 |
| 2 | NULL | NULL | NULL |
+----+--------+------+--------+
2 rows in set (0.06 sec)
- real result:
Empty set (0.02 sec)
+----+--------+----+--------+
| id | c_char | id | c_char |
+----+--------+----+--------+
| NULL | NULL | 2 | NULL |
| NULL | NULL | 1 | 1 |
+----+--------+----+--------+
2 rows in set (0.01 sec)
+----+--------+----+--------+
| id | c_char | id | c_char |
+----+--------+----+--------+
| 2 | NULL | NULL | NULL |
| 1 | 1 | NULL | NULL |
+----+--------+----+--------+
2 rows in set (0.02 sec)
- supplements:
1.
/label ~BUG
Metadata
Metadata
Assignees
Labels
complex-queryresolveproblem has been fixed by developerproblem has been fixed by developerverifiedissue's resolve was verified by testerissue's resolve was verified by tester