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

executor,sessionctx: refine output format for tidb-specific variables of boolean type (#11239) #16131

Merged
merged 2 commits into from
Apr 14, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Apr 7, 2020

cherry-pick #11239 to release-2.1


What problem does this PR solve?

Currently, the result of selecting tidb-specific variables of boolean type is not well formatted. I think we'd better make it same style with MySQL. For example:

tidb> set @@tidb_batch_delete='On';
Query OK, 0 rows affected (0.00 sec)

tidb> select @@tidb_batch_delete;
+---------------------+
| @@tidb_batch_delete |
+---------------------+
| On                  |
+---------------------+
1 row in set (0.00 sec)

tidb> set @@tidb_enable_streaming='OfF'
    -> ;
Query OK, 0 rows affected (0.00 sec)

tidb> select @@tidb_enable_streaming;
+-------------------------+
| @@tidb_enable_streaming |
+-------------------------+
| OfF                     |
+-------------------------+
1 row in set (0.00 sec)

tidb> set @@tidb_disable_txn_auto_retry=on;
Query OK, 0 rows affected (0.00 sec)

tidb> select @@tidb_disable_txn_auto_retry;
+-------------------------------+
| @@tidb_disable_txn_auto_retry |
+-------------------------------+
| ON                            |
+-------------------------------+
1 row in set (0.00 sec)

tidb> set @@tidb_batch_insert=0;
Query OK, 0 rows affected (0.00 sec)

tidb> select @@tidb_batch_insert;
+---------------------+
| @@tidb_batch_insert |
+---------------------+
| 0                   |
+---------------------+
1 row in set (0.00 sec)

What is changed and how it works?

Check List

Tests

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

Code changes

N / A

Side effects

N / A

Related changes

N / A

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 7, 2020

/run-all-tests

@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented Apr 9, 2020

@wshwsh12 Please resolve the conlicts

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 13, 2020
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 14, 2020
@zz-jason zz-jason added the status/can-merge Indicates a PR has been approved by a committer. label Apr 14, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 14, 2020

Your auto merge job has been accepted, waiting for 16307

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 14, 2020

/run-all-tests

@sre-bot sre-bot merged commit f894cfe into pingcap:release-2.1 Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/compatibility type/2.1-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants