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

Merged
merged 4 commits into from
Jul 15, 2019

Conversation

spongedu
Copy link
Contributor

@spongedu spongedu commented Jul 12, 2019

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

@codecov
Copy link

codecov bot commented Jul 15, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@9b82445). Click here to learn what that means.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11239   +/-   ##
===========================================
  Coverage          ?   81.5579%           
===========================================
  Files             ?        423           
  Lines             ?      90993           
  Branches          ?          0           
===========================================
  Hits              ?      74212           
  Misses            ?      11493           
  Partials          ?       5288

@wshwsh12 wshwsh12 added contribution This PR is from a community contributor. type/compatibility labels Jul 15, 2019
@spongedu
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@wshwsh12 wshwsh12 left a comment

Choose a reason for hiding this comment

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

LGTM

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

@XuHuaiyu XuHuaiyu added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 15, 2019
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

@jackysp
Copy link
Member

jackysp commented Jul 15, 2019

Thanks @spongedu !

@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

It seems that, not for sure, we failed to cherry-pick this commit to release-2.1 release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @wshwsh12 PTAL.

@wshwsh12
Copy link
Contributor

wshwsh12 commented Apr 7, 2020

/run-cherry-picker

@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

cherry pick to release-2.1 in PR #16131

@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

cherry pick to release-3.0 in PR #16132

@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

cherry pick to release-3.1 in PR #16133

sre-bot added a commit that referenced this pull request Apr 14, 2020
sre-bot added a commit that referenced this pull request Apr 14, 2020
sre-bot added a commit that referenced this pull request 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. status/LGT2 Indicates that a PR has LGTM 2. type/compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants