Join GitHub today
sessionctx: supports `set character_set_results = null` #7353
What have you changed? (mandatory)
When tidb executes "set character_set_results = null", it will delete "character_set_results" variable because we set it to null. (see executor/set.go:79)
This will delete "character_set_results". When we use show variable to show it, executor can not find it.
Originally, variable.SysVars["character_set_results"] is "latin1", so the return value of "show variables where variable_name='character_set_results'" is "latin1". But "character_set_results" in TiDB is always "utf8", set variable can not effect it.
This PR just fix compatibility with mysql when execute "set character_set_results = null".
What is the type of the changes? (mandatory)
How has this PR been tested? (mandatory)
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
Does this PR affect tidb-ansible update? (mandatory)
Does this PR need to be added to the release notes? (mandatory)
Refer to a related PR or issue link (optional)
Benchmark result if necessary (optional)
Add a few positive/negative examples (optional)