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

solve the problem of not finding the same name table #78

Merged
merged 1 commit into from
May 26, 2021
Merged

solve the problem of not finding the same name table #78

merged 1 commit into from
May 26, 2021

Conversation

yibantianxia
Copy link

1:优化对表名称相同情况下的处理,增加一个判断需要的条件
2:对应解决mtr:main.type_decimal, main.func_set, main.implicit_commit

sql/pq_clone.cc Outdated Show resolved Hide resolved
sql/pq_clone.cc Outdated Show resolved Hide resolved
@liuwei-ck liuwei-ck linked an issue May 26, 2021 that may be closed by this pull request
sql/pq_clone.cc Outdated
bool is_same_table(QEP_TAB *src, const char *db, const char *table_name, const char *table_ref_alias) {
if (!strncmp(db, src->db->str, strlen(db)) &&
strlen(src->db->str) == strlen(db) &&
!strncmp(table_name, src->table_name->str, strlen(table_name)) &&
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用strcmp 替代 strncmp 和strlen 。目的是为了比较字符串是否相等,使用strcmp即可

@rejohn rejohn merged commit b36a6e0 into kunpengcompute:olap-kp-dev May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mtr修复
3 participants