Skip to content

[Bug]: query mo_tables with rel_id condition will return empty result. #17136

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main, 1.2

Commit ID

8a3f70d

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

mysql> select relname, rel_id from mo_tables order by rel_id limit 5;
+---------------------+--------+
| relname             | rel_id |
+---------------------+--------+
| mo_database         |      1 |
| mo_tables           |      2 |
| mo_columns          |      3 |
| mo_indexes          | 272385 |
| mo_table_partitions | 272386 |
+---------------------+--------+
5 rows in set (0.00 sec)

mysql> select relname, rel_id from mo_tables  where rel_id = 1;
Empty set (0.00 sec)

Expected Behavior

No response

Steps to Reproduce

see above.

Additional information

No response

Activity

  1. added
    kind/bug
    on Jun 25, 2024
  2. self-assigned this
    on Jun 25, 2024
  3. gouhongshen commented on Jun 25, 2024

    @gouhongshen
    ContributorAuthor

    问题的原因是,这个PR修改mo_tables表的 schema 后,expr 推下来的 primary key col 和 partition state 里面的 pk col 不一致,导致 reader 匹配不到正确的值,所以返回了空。之前这三张特殊的表的 pk 没有在 schema 中体现,也不会在 reader里构造 filter,但在其他需要pk 的地方做了特殊处理,使用的联合组键。

    这三张表的改造正在做,我可以先提一个 简单的 workaround,在 reader 那里特殊处理下。

  4. added this to the 1.3.0 milestone on Jul 25, 2024
  5. added
    severity/s0
    on Aug 5, 2024
  6. aptend commented on Aug 13, 2024

    @aptend
    Contributor

    fix pr #17892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions