The Wayback Machine - https://web.archive.org/web/20201121005450/https://github.com/github/gh-ost/issues/450
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

Issue with DATETIME(6) on MariaDB #450

Closed
aadant opened this issue Jul 19, 2017 · 7 comments
Closed

Issue with DATETIME(6) on MariaDB #450

aadant opened this issue Jul 19, 2017 · 7 comments
Assignees

Comments

@aadant
Copy link

@aadant aadant commented Jul 19, 2017 •

Here are the steps to reproduce :

  1. on the master
create database ghost;
use ghost;
drop table if exists t;
create table t(id bigint, d datetime(6),primary key(id)) engine=InnoDB;
  1. on the test replica

Using gh-ost-binary-linux-20170403125842.tar.gz

touch /tmp/ghost.postpone.t.flag 
./gh-ost \
--max-load=Threads_running=32 \
--critical-load=Threads_running=1000 \
--initially-drop-ghost-table \
--initially-drop-old-table \
--chunk-size=10000 \
--dml-batch-size=100 \
--max-lag-millis=1500 \
--user="" \
--password="" \
--host= \
--database="ghost" \
--table="t" \
--verbose \
--skip-foreign-key-checks \
--alter="engine=InnoDB" \
--switch-to-rbr \
--cut-over=default \
--test-on-replica \
--default-retries=120 \
--panic-flag-file=/tmp/ghost.panic.flag \
--postpone-cut-over-flag-file=/tmp/ghost.postpone.t.flag \
--approve-renamed-columns \
--replica-server-id=83 \
--execute
  1. on the master

insert into t(id,d) values(1,'2017-07-14 00:09:51.073974')
commit;

  1. on the test replica

rm /tmp/ghost.postpone.t.flag

  1. on the test replica database, microseconds are multiplied by 10
MariaDB [ghost]> select * from t;
+----+----------------------------+
| id | d                          |
+----+----------------------------+
|  1 | 2017-07-14 00:09:51.073974 |
+----+----------------------------+
1 row in set (0.02 sec)

MariaDB [ghost]> select * from _t_gho;
+----+----------------------------+
| id | d                          |
+----+----------------------------+
|  1 | 2017-07-14 00:09:51.739740 |
+----+----------------------------+
1 row in set (0.02 sec)

This looks like a major issue with DATETIME(6). The database is MariaDB 10.1.20.
Not sure if it is an issue with Oracle MySQL.

@shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Jul 19, 2017

Thank you, I'll investigate.

@shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Jul 19, 2017

I have a guess as for why this is happening. It's a bit outside my code but I should be able to fix it.

@shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Jul 19, 2017

Reproduced

@shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Jul 19, 2017

#452 fixes the problem. @aadant, can you please test attached binaries?
I will meanwhile send to production testing.

gh-ost-binary-linux-20170719155447.tar.gz
gh-ost-binary-osx-20170719155447.tar.gz

@aadant
Copy link
Author

@aadant aadant commented Jul 19, 2017

@shlomi-noach : thanks, that fixes the issue. I ran a couple of tests and it is OK now.

@aadant aadant closed this Jul 19, 2017
@shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Jul 19, 2017

Thank you. I will publish a release this Thursday or Friday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.