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

and ... or statement running error #2199

Closed
LUAgam opened this issue Oct 22, 2020 · 5 comments
Closed

and ... or statement running error #2199

LUAgam opened this issue Oct 22, 2020 · 5 comments
Assignees
Labels
accidental_bug autotest-added the case has append to autotest
Milestone

Comments

@LUAgam
Copy link
Member

LUAgam commented Oct 22, 2020

  • dble version:2.19.07.0
  • preconditions :
    no
  • configs:

schema.xml



rule.xml



server.xml

only this one table

<table name="model_searchlib" dataNode="dn1,dn2" rule="rule_common_hash"/>

  • steps:
    step1.
CREATE TABLE `model_searchlib` (
  `cc` varchar(255) DEFAULT NULL,
  `aa` varchar(255) DEFAULT NULL,
  `bb` varchar(255) DEFAULT NULL,
  `isshare` int(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
step2.  
select   *  from model_searchlib a
inner join  model_searchlib b on a.cc = b.cc
where  a.aa  ='cn' and b.bb ='jp'
 and (b.isshare=1 or a.isshare=1 )
 LIMIT 0,7
  • expect result:
    1.Normal return result
  • real result:
    1.
ERROR 1003 (HY000): Unknown column 'b.isshare' in 'where clause'
  • supplements:
    1.no
@yanhuqing666
Copy link
Member

looks fixed in new version

@yanhuqing666 yanhuqing666 added this to the 3.21.01.0 milestone Nov 12, 2020
@LUAgam
Copy link
Member Author

LUAgam commented Dec 4, 2020

fixed in new version, associated item #2042

@LUAgam LUAgam closed this as completed Dec 4, 2020
@LUAgam
Copy link
Member Author

LUAgam commented Dec 7, 2020

Misjudgment. The basis for misjudgment is that there are multiple shardingTables under the same schema, which are optimized as er tables at this time. If there is only one shardingTable under a schema, an error will be reported

@LUAgam
Copy link
Member Author

LUAgam commented Jan 12, 2021

influences:
#2073
inner-590

@LUAgam LUAgam assigned quexiuping and unassigned LUAgam Jan 12, 2021
@quexiuping
Copy link
Member

verified on version:5.7.21-dble-9.9.9.9-9b37a546a8e46e362a9b40b127f135625695ab8f-20210308051611

@quexiuping quexiuping added the autotest-added the case has append to autotest label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accidental_bug autotest-added the case has append to autotest
Projects
None yet
Development

No branches or pull requests

3 participants