Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfriendly tips for select * from sharding_1_t1 b,sharding_4_t1 c,(select * from sharding_2_t1) a on c.id=b.id and c.id=b.id #1053

Closed
FlyingMao opened this issue Mar 11, 2019 · 1 comment
Assignees
Labels
resolve problem has been fixed by developer sql-coverage
Milestone

Comments

@FlyingMao
Copy link

FlyingMao commented Mar 11, 2019

  • dble version:
    5.6.29-dble-9.9.9.9-3f3f64fa0c2733adccaa52b5bc652e1ea8725b56-20190311022855
  • preconditions :
create table sharding_1_t1(id int,name char);
create table sharding_2_t1(id int,name char);
create table sharding_4_t1(id int,name char);
  • configs:

schema.xml

<schema name="schema1" sqlMaxLimit="100" dataNode="dn5">
        <table name="sharding_1_t1" primaryKey="id" dataNode="dn5" />
	<table name="sharding_2_t1" primaryKey="id" dataNode="dn1,dn2" rule="hash-two" />
        <table name="sharding_4_t1" dataNode="dn1,dn2,dn3,dn4" rule="hash-four" />
</schema>


rule.xml



server.xml



  • steps:
    step1.
mysql> select * from sharding_1_t1 b,sharding_4_t1 c,(select * from sharding_2_t1) a on c.id=b.id and c.id=b.id;
  • expect result:
    1.
mysql> select * from sharding_1_t1 b,sharding_4_t1 c,(select * from sharding_2_t1) a on c.id=b.id and c.id=b.id;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'on c.id=b.id and c.id=b.id' at line 1
  • real result:
    1.
mysql> select * from sharding_1_t1 b,sharding_4_t1 c,(select * from sharding_2_t1) a on c.id=b.id and c.id=b.id;
ERROR 1066 (42000): Not unique table/alias: 'null'

  • supplements:
    1.

/label ~BUG

@FlyingMao FlyingMao added this to the 2.19.03.0 milestone Mar 11, 2019
@FlyingMao FlyingMao changed the title Unfriendly tips for select * from sharding_1_t1 b,sharding_4_t1 c,(select * from sharding_2_t1) a on c.name=b.name and c.id=b.id Unfriendly tips for select * from sharding_1_t1 b,sharding_4_t1 c,(select * from sharding_2_t1) a on c.id=b.id and c.id=b.id Mar 11, 2019
yanhuqing666 added a commit that referenced this issue Mar 13, 2019
yanhuqing666 added a commit that referenced this issue Mar 18, 2019
@yanhuqing666 yanhuqing666 added the resolve problem has been fixed by developer label Mar 18, 2019
@FlyingMao
Copy link
Author

verified version: 5.6.29-dble-9.9.9.9-6d9aec3cbe94d2e217b42646dff266ecb7e5dfdb-20190318061530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolve problem has been fixed by developer sql-coverage
Projects
None yet
Development

No branches or pull requests

2 participants