Issues with Upgrading from Versions Below 6.0 to Versions Above 6.0

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 6.0以下升级到6.0以上版本问题

| username: Kongdom

[TiDB Usage Environment] Production Environment
[TiDB Version] v6.5.5
[Reproduction Path] Upgrade
[Encountered Problem: Phenomenon and Impact]

The old cluster was upgraded from 5.1.0 to 6.5.5, and the new cluster was newly deployed with v6.5.5.
During backup and restore, an error new_collations_enabled_on_first_bootstrap mismatch occurred. This error is understood as the default value being changed in 6.0, with the new cluster’s default value being true.
However, checking the system parameters of the old cluster, it is also true.


This parameter has not been changed, and normally the old cluster should be false. Moreover, this parameter only takes effect during initialization.

So the question is, is the old cluster actually true or false now?

| username: 大飞哥online | Original post link

When upgrading a TiDB cluster from a version prior to 4.0 to version 4.0 or higher, since the cluster has already been initialized, this parameter will be treated as false regardless of its configuration.

| username: 大飞哥online | Original post link

SELECT * FROM mysql.tidb WHERE VARIABLE_NAME = 'new_collation_enabled';

Check it out or verify it directly.

| username: 像风一样的男子 | Original post link

Yes, the document is written like this.

| username: Kongdom | Original post link

:thinking: But I upgraded from 5.1 to 6.5.

| username: Kongdom | Original post link

But I am using version v6.5.5.

| username: Kongdom | Original post link

What I understand now is that the parameter was forcibly changed to true, but it did not take effect.

| username: TiDBer_小阿飞 | Original post link

Do you mean that during the upgrade, this parameter automatically changed from false to true? Originally, in version 5.5, the default value of this parameter was false?

| username: Jolyne | Original post link

I saw this on the official website. Now that the configuration is the same, can adding a parameter restore it?

| username: 大飞哥online | Original post link

Yes, although it was changed, it didn’t take effect. This only takes effect during initialization.

| username: Kongdom | Original post link

Yes, it automatically changed to true. According to the documentation, it defaults to true in version 6.5, but I feel that even if it defaults to true, it shouldn’t be changed to true.

| username: 像风一样的男子 | Original post link

Parameters that cannot be changed are redundant and should not be queryable by design.

| username: Kongdom | Original post link

:thinking: Makes sense, I’ll go make a suggestion.

| username: 大飞哥online | Original post link

Sure, this way it won’t be misleading, haha.

| username: Kongdom | Original post link

:handshake: :handshake: :handshake:

| username: Kongdom | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.