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

server: return empty org_name for resultField #45146

Merged
merged 1 commit into from Jul 5, 2023

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Jul 4, 2023

What problem does this PR solve?

TiDB should return an empty org_name for an expression.

Issue Number: close #45145

What is changed and how it works?

  1. Remove some useless fields in the ast.ResultField. They are only assigned value but never read (but I'm not sure whether the codes in other repo will read these things)
  2. Add a new field to indicate whether this column should return an empty org_name. I didn't set an "" to the column info directly to avoid some unknown bugs (but I'm not sure whether they exist).

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Release note

Previously, TiDB returns the alias name as the `org_name` in mysql protocol. From now on, TiDB will return empty string as the `org_name` if this field is an expression.

@YangKeao YangKeao requested a review from CbcWestwolf July 4, 2023 08:46
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 4, 2023
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
@ti-chi-bot ti-chi-bot bot added the lgtm label Jul 5, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CbcWestwolf, hawkingrei

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CbcWestwolf,hawkingrei]

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
Copy link

ti-chi-bot bot commented Jul 5, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-07-04 09:11:31.277256272 +0000 UTC m=+108723.210889691: ☑️ agreed by CbcWestwolf.
  • 2023-07-05 03:04:14.205848546 +0000 UTC m=+173086.139481980: ☑️ agreed by hawkingrei.

@ti-chi-bot ti-chi-bot bot merged commit d639cb8 into pingcap:master Jul 5, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiDB should return an empty org_name for expression
3 participants