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 #20684

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

songrijie
Copy link
Contributor

What is changed, added or deleted? (Required)

Please refer to pingcap/docs-cn#20139

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.

  • 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)?

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 Apr 1, 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 lance6716 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 Apr 1, 2025
@ti-chi-bot
Copy link
Member

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request includes a compatibility notice for the tidb_remove_orderby_in_subquery system variable. The change involves updating the release notes to reflect a change in the default value of this variable. The pull request description is comprehensive, covering the necessary details and affected versions.

Merge Readiness

The pull request appears to be ready for merging, as it primarily involves documentation updates and includes sufficient information for users to understand the change. I am unable to directly approve the pull request, and users should have others review and approve this code before merging.

Comment on lines 176 to +177

- The default value of [`tidb_remove_orderby_in_subquery`](/system-variables.md#tidb_remove_orderby_in_subquery-new-in-v610) has been changed from `OFF` to `ON` to avoid unnecessary sorting operations. This change may result in a different order of query results. The ISO/IEC SQL standard does not require query results to follow the ORDER BY sorting of subqueries. To strictly guarantee the final result order, sorting should be explicitly included in the outer query. Applications that rely on subquery sorting can set this variable to `OFF`. Clusters upgraded from older versions will retain the previous behavior by default.

Choose a reason for hiding this comment

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

medium

Consider adding a brief explanation of why this change was made. For example, mentioning that it improves performance in certain scenarios might be helpful.

Suggested change
- The default value of [`tidb_remove_orderby_in_subquery`](/system-variables.md#tidb_remove_orderby_in_subquery-new-in-v610) has been changed from `OFF` to `ON` to avoid unnecessary sorting operations. This change may result in a different order of query results. The ISO/IEC SQL standard does not require query results to follow the ORDER BY sorting of subqueries. To strictly guarantee the final result order, sorting should be explicitly included in the outer query. Applications that rely on subquery sorting can set this variable to `OFF`. Clusters upgraded from older versions will retain the previous behavior by default.
- The default value of [`tidb_remove_orderby_in_subquery`](/system-variables.md#tidb_remove_orderby_in_subquery-new-in-v610) has been changed from `OFF` to `ON` to avoid unnecessary sorting operations, which improves query performance in many cases. This change may result in a different order of query results. The ISO/IEC SQL standard does not require query results to follow the ORDER BY sorting of subqueries. To strictly guarantee the final result order, sorting should be explicitly included in the outer query. Applications that rely on subquery sorting can set this variable to `OFF`. Clusters upgraded from older versions will retain the previous behavior by default.

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