Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

br cannot restore mysql.user table to v5.0.2 tidb #1237

@cyliu0

Description

@cyliu0

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
  • Start a 5.1.0 tidb cluster and a 5.0.2 tidb cluster.
  • Create a user 'u1'@'%' on 5.1.0 tidb cluster
  • br backup full from 5.1.0 tidb cluster
  • br restore full -f "*.*" to 5.0.2 tidb cluster
  • select * from mysql.user
  1. What did you expect to see?
    User u1 will be restored to 5.0.2 tidb cluster

  2. What did you see instead?
    No user u1

  3. What version of BR and TiDB/TiKV/PD are you using?

[root@node2 ~]# tiup br:v5.1.0-20210615 -V
Starting component `br`: /root/.tiup/components/br/v5.1.0-20210615/br -V
Release Version: v5.1.0-20210615
Git Commit Hash: 14387f934c9fff4a866a70f9c12381126166648f
Git Branch: heads/refs/tags/v5.1.0-20210615
Go Version: go1.16.4
UTC Build Time: 2021-06-15 11:45:07
Race Enabled: false
  1. Operation logs
    • Please upload br.log for BR if possible
[root@node2 ~]# tiup br:v5.1.0-20210615 restore full -s "local:///tmp/br-backup-full-1100" -f "*.*" -u 127.0.0.1:42141
Starting component `br`: /root/.tiup/components/br/v5.1.0-20210615/br restore full -s local:///tmp/br-backup-full-1100 -f *.* -u 127.0.0.1:42141
Detail BR log in /tmp/br.log.2021-06-17T11.04.22+0800
Full restore <----------------------------------------------------------------------------------------------------------------/> 100.00%[2021/06/17 11:04:27.969 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Restore:ErrUnsupportedSysTable]restoring stats via `mysql` schema isn't support yet: the table ID is out-of-date and may corrupt existing statistics"] [table=stats_extended]
Full restore <-----------------------------------------------------------------------------------------------------------------> 100.00%[2021/06/17 11:04:29.010 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Common:ErrUnknown]failed to execute REPLACE INTO `mysql`.`user` SELECT * FROM `__tidb_br_temporary_mysql`.`user`;"] [table=user]
[2021/06/17 11:04:29.010 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Restore:ErrUnsupportedSysTable]restoring stats via `mysql` schema isn't support yet: the table ID is out-of-date and may corrupt existing statistics"] [table=stats_meta]
[2021/06/17 11:04:29.010 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Restore:ErrUnsupportedSysTable]restoring stats via `mysql` schema isn't support yet: the table ID is out-of-date and may corrupt existing statistics"] [table=stats_top_n]
[2021/06/17 11:04:29.017 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Restore:ErrUnsupportedSysTable]restoring unsupported `mysql` schema table"] [table=tidb]
[2021/06/17 11:04:29.035 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Restore:ErrUnsupportedSysTable]restoring stats via `mysql` schema isn't support yet: the table ID is out-of-date and may corrupt existing statistics"] [table=stats_histograms]
[2021/06/17 11:04:29.035 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Restore:ErrUnsupportedSysTable]restoring stats via `mysql` schema isn't support yet: the table ID is out-of-date and may corrupt existing statistics"] [table=stats_buckets]
[2021/06/17 11:04:29.037 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Restore:ErrUnsupportedSysTable]restoring stats via `mysql` schema isn't support yet: the table ID is out-of-date and may corrupt existing statistics"] [table=stats_feedback]
[2021/06/17 11:04:29.037 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Restore:ErrUnsupportedSysTable]restoring stats via `mysql` schema isn't support yet: the table ID is out-of-date and may corrupt existing statistics"] [table=stats_fm_sketch]
[2021/06/17 11:04:29.037 +08:00] [WARN] [systable_restore.go:77] ["error during merging temporary tables into system tables"] [error="[BR:Restore:ErrUnsupportedSysTable]restoring unsupported `mysql` schema table"] [table=GLOBAL_VARIABLES]
[2021/06/17 11:04:29.051 +08:00] [WARN] [systable_restore.go:87] ["error during reconfigurating the system tables"] [database=mysql] [error="restored user info may not take effect, until you should execute `FLUSH PRIVILEGES` manually: [BR:Restore:ErrUnsupportedSysTable]the system table isn't supported for restoring yet"]
Full restore <-----------------------------------------------------------------------------------------------------------------> 100.00%
[2021/06/17 11:04:29.588 +08:00] [INFO] [collector.go:66] ["Full restore success summary"] [total-ranges=26] [ranges-succeed=26] [ranges-failed=0] [restore-checksum=24.329872ms] [split-region=142.683892ms] [restore-ranges=23] [total-take=6.733655168s] ["restore data size(after decompressed)"=177.4kB] [total-kv=1475] [total-kv-size=86.5kB] [average-speed=1.005MB/s]
  • Please upload tidb-lightning.log for TiDB-Lightning if possible
  • Please upload tikv-importer.log from TiKV-Importer if possible
  • Other interesting logs
  1. Configuration of the cluster and the task

    • tidb-lightning.toml for TiDB-Lightning if possible
    • tikv-importer.toml for TiKV-Importer if possible
    • topology.yml if deployed by TiUP
  2. Screenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus if possible

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions