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

varchar value should use quotation marks #4951

Open
alex-quan-001 opened this issue Mar 2, 2021 · 5 comments
Open

varchar value should use quotation marks #4951

alex-quan-001 opened this issue Mar 2, 2021 · 5 comments
Assignees

Comments

@alex-quan-001
Copy link

Error Report

Please answer the following questions before submitting your issue. Thanks!

  1. What is the URL/path of the document related to this issue?

https://docs.pingcap.com/tidb/stable/garbage-collection-configuration
tikv_gc_enable
Enables or disables GC
Default: true

  1. How would you like to improve it?
    tikv_gc_enable
    Enables or disables GC
    Default:" true"

all variable value's type is varchar, so it should be include in quotes.

desc mysql.tidb;
+----------------+---------------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------+------+------+---------+-------+
| VARIABLE_NAME | varchar(64) | NO | PRI | NULL | |
| VARIABLE_VALUE | varchar(1024) | YES | | NULL | |
| COMMENT | varchar(1024) | YES | | NULL | |
+----------------+---------------+------+------+---------+-------+

@TomShawn TomShawn self-assigned this Mar 3, 2021
@TomShawn
Copy link
Contributor

TomShawn commented Mar 3, 2021

@alex-quan-001 Do we also need to quote "true" in commands like set config tikv gc.enable-compaction-filter = "true";?

@alex-quan-001
Copy link
Author

I don`t know this usage.
Not even sure if it's used that way. I don't know how it works even when I try it and it doesn't report an error when I set it up incorrectly.
But at least what I see should fit the design, and preferably there should be no implicit conversion of the parameters of the setup class and a strong checksum.
image

@TomShawn
Copy link
Contributor

TomShawn commented Mar 3, 2021

@MyonKeminta Could you please take a look? Thanks!

@morgo
Copy link
Contributor

morgo commented Mar 5, 2021

This is fixed in #4552 where the recommended GC configuration moves to sysvars.

The mysql.tidb interface should be deprecated because it does not permit any validation on the values that are being set. See: pingcap/tidb#20655

With sysvars, there is both validation and type normalization (oN, 1, on, ON --> ON).

@TomShawn
Copy link
Contributor

This is fixed in #4552 where the recommended GC configuration moves to sysvars.

The mysql.tidb interface should be deprecated because it does not permit any validation on the values that are being set. See: pingcap/tidb#20655

With sysvars, there is both validation and type normalization (oN, 1, on, ON --> ON).

@alex-quan-001 Does this answer address your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants