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

include compatibility notice for tidb_remove_orderby_in_subquery #20139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

songrijie
Copy link
Contributor

What is changed, added or deleted? (Required)

I got inquiries from customers. The change of default value for tidb_remove_orderby_in_subquery (v7.2.0) would cause disordered outputs. Even though this is expected, we'd better include a notice in release notes.

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Copy link

ti-chi-bot bot commented Mar 31, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign icemap for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 31, 2025
@songrijie songrijie requested review from qw4990 and hfxsd March 31, 2025 15:42
@qiancai
Copy link
Collaborator

qiancai commented Apr 3, 2025

/bot-review

@@ -174,6 +174,8 @@ TiDB 版本:7.2.0

- TiCDC 在处理 Update 事件时,如果事件的主键或者非空唯一索引的列值发生改变,则会将该条事件拆分为 Delete 和 Insert 两条事件。更多信息,请参考[用户文档](/ticdc/ticdc-split-update-behavior.md#含有单条-update-变更的事务拆分)。

- [`tidb_remove_orderby_in_subquery`](/system-variables.md#tidb_remove_orderby_in_subquery-从-v610-版本开始引入) 的默认值从 `OFF` 改为 `ON`,避免不必要的排序操作。这可能造成 SQL 输出不同的查询顺序。ISO/IEC SQL 标准并不要求查询结果遵循子查询 ORDER BY 排序,在外层查询中显式增加排序才能严格保证最终结果的顺序。依赖子查询排序的应用可以将此变量修改为 `OFF`,从旧版本升级的集群默认不会修改这个行为。
Copy link

Choose a reason for hiding this comment

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

该说明过于技术化且冗长,建议拆分为更易理解的短句,并明确说明升级影响和解决方案。

Suggested change
- [`tidb_remove_orderby_in_subquery`](/system-variables.md#tidb_remove_orderby_in_subquery-从-v610-版本开始引入) 的默认值从 `OFF` 改为 `ON`,避免不必要的排序操作。这可能造成 SQL 输出不同的查询顺序。ISO/IEC SQL 标准并不要求查询结果遵循子查询 ORDER BY 排序,在外层查询中显式增加排序才能严格保证最终结果的顺序。依赖子查询排序的应用可以将此变量修改为 `OFF`,从旧版本升级的集群默认不会修改这个行为
- [`tidb_remove_orderby_in_subquery`](/system-variables.md#tidb_remove_orderby_in_subquery-从-v610-版本开始引入) 的默认值从 `OFF` 改为 `ON` 以优化性能。此变更可能导致查询结果顺序与之前版本不同。根据 SQL 标准,子查询中的 ORDER BY 不保证最终结果顺序,如需严格排序应在外层查询添加 ORDER BY。升级集群不会自动修改此变量值,如需保持原行为请手动设置为 `OFF`

Copy link

github-actions bot commented Apr 3, 2025

✅ AI review completed, 1 comments generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants