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

mydumper:24017 #10565

Closed
simpson9527 opened this issue May 22, 2019 · 6 comments
Closed

mydumper:24017 #10565

simpson9527 opened this issue May 22, 2019 · 6 comments
Assignees
Labels
type/question The issue belongs to a question.

Comments

@simpson9527
Copy link

** (mydumper:24017): CRITICAL **: 14:35:54.810: Couldn't acquire global lock, snapshots will not be consistent: FLUSH TABLES WITH READ LOCK is not supported. Please use @@tidb_snapshot

mydumper cmd is:mydumper -h 127.0.0.1 -P 4000 -u root -t 8 -F 64 -B database -c -o /data

@morgo morgo self-assigned this May 22, 2019
@morgo
Copy link
Contributor

morgo commented May 22, 2019

This error message is generated because mydumper attempted to execute FLUSH TABLES WITH READ LOCK on a TiDB server (the command is not supported).

Please use the mydumper bundled with TiDB tools. Support for TiDB has merged into upstream mydumper, and will be available starting with the next release.

@morgo morgo added the type/question The issue belongs to a question. label May 22, 2019
@simpson9527
Copy link
Author

ok,i will try again

@morgo
Copy link
Contributor

morgo commented May 26, 2019

@simpson9527 Just checking in. How did it go? :-)

@simpson9527
Copy link
Author

i had some problems when i use mydumper backup mysql data,shall we make some changes for mydumper.
here is the situation: when i dump a table,the column default value is illegality,for example,the datatype date's default value is '1970-00:00 00:00:00' in mysql,but which is illegality in tidb.shall we automatic transfer the default value from mysql to tidb when dump tables.

@morgo
Copy link
Contributor

morgo commented May 27, 2019

i had some problems when i use mydumper backup mysql data,shall we make some changes for mydumper.
here is the situation: when i dump a table,the column default value is illegality,for example,the datatype date's default value is '1970-00:00 00:00:00' in mysql,but which is illegality in tidb.shall we automatic transfer the default value from mysql to tidb when dump tables.

It is now illegal by default in MySQL as well. TiDB actually behaves the same - you can remove the sql_modes NO_ZERO_IN_DATE (and probably NO_ZERO_DATE) from TiDB's configuration to make it behave the old way:

SET GLOBAL sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

@ghost
Copy link

ghost commented Jul 22, 2020

I am going to close this issue as stale. Please feel free to re-open if you have additional questions. Thanks!

@ghost ghost closed this as completed Jul 22, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question The issue belongs to a question.
Projects
None yet
Development

No branches or pull requests

2 participants