Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: can not execute write statement when ‘tidb_snapshot’ is set
[TiDB Usage Environment] Production Environment
[TiDB Version] v5.1.1
[Encountered Problem] Unable to create table after setting ‘tidb_snapshot’
This operation is an entire process, or if you have other scenarios that can cover this process, it cannot be omitted or skipped.
Lacking historical records, it cannot be used (the required GC time must be fully covered).
You cannot perform write operations after setting @@tidb_snapshot. This is from the 4.0 e-book, right? I think there is an error in the documentation. I suggest using Dumpling to export and then import, as per the official documentation link provided by the expert above.
When tidb_snapshot
is not an empty string, writing is not allowed. The operations you can perform are SELECT INTO OUTFILE
or Dumpling --snapshot
to back up the data, and then use LOAD
or Lightning
to restore it.
Take a look at my error message. The documentation is incorrect, you can verify it.
You can only set a snapshot, then back up the data and reinsert it.
This topic was automatically closed 1 minute after the last reply. No new replies are allowed.