Comments - Timestamps are different

11 years, 3 months ago Tim Rice

MANY THANKS.

Here are the results [root@a2 ]# date Wed Aug 14 10:05:08 CDT 2013 [root@a2 ]# date +%s 1376492708 [root@a2 ]# mysql -h a1 -u root -p** -e "SELECT UNIX_TIMESTAMP(NOW())"; +-----------------------+

UNIX_TIMESTAMP(NOW())

+-----------------------+

1376492708

+-----------------------+ [root@a2 ]# mysql -h a2 -u root -p** -e "SELECT UNIX_TIMESTAMP(NOW())"; +-----------------------+

UNIX_TIMESTAMP(NOW())

+-----------------------+

1376492708

+-----------------------+ [root@a2 ]# mysql -h a3 -u root -p** -e "SELECT UNIX_TIMESTAMP(NOW())"; +-----------------------+

UNIX_TIMESTAMP(NOW())

+-----------------------+

1376492708

+-----------------------+ [root@a2 ]# mysql -h a4 -u root -p** -e "SELECT UNIX_TIMESTAMP(NOW())"; +-----------------------+

UNIX_TIMESTAMP(NOW())

+-----------------------+

1376492708

+-----------------------+

 
11 years, 3 months ago roberto spadim

could you compare the unixtimestamp of your tables?

 
11 years, 3 months ago Tim Rice

OK, I am not sure that I follow. How do I do this? I know how to display now() time in MySQL but I am not sure I understand.

Now I did compare the unixtimestamp already in my initial post. Is this what you want me to do again?

mysql -u root -p** -h a2 -e "select * from safeplan_new1.plan_approval where plan_approval_id=3247" +------------------+----------------+------------------+------------------------+------------------+---------------------+----------------------+

plan_approval_idplan_master_idplan_location_idplan_approval_locationplan_approval_byplan_approved_onplan_approval_status

+------------------+----------------+------------------+------------------------+------------------+---------------------+----------------------+

324729201551332013-07-03 11:13:591

+------------------+----------------+------------------+------------------------+------------------+---------------------+----------------------+

[root@a2 ]# mysql -u root -p** -h a3 -e "select * from safeplan_new1.plan_approval where plan_approval_id=3247" +------------------+----------------+------------------+------------------------+------------------+---------------------+----------------------+

plan_approval_idplan_master_idplan_location_idplan_approval_locationplan_approval_byplan_approved_onplan_approval_status

+------------------+----------------+------------------+------------------------+------------------+---------------------+----------------------+

324729201551332013-07-03 16:13:591

+------------------+----------------+------------------+------------------------+------------------+---------------------+----------------------+

[root@a2 ]# mysql -u root -p** -h a4 -e "select * from safeplan_new1.plan_approval where plan_approval_id=3247" +------------------+----------------+------------------+------------------------+------------------+---------------------+----------------------+

plan_approval_idplan_master_idplan_location_idplan_approval_locationplan_approval_byplan_approved_onplan_approval_status

+------------------+----------------+------------------+------------------------+------------------+---------------------+----------------------+

324729201551332013-07-03 16:13:591

+------------------+----------------+------------------+------------------------+------------------+---------------------+----------------------+

 
11 years, 3 months ago roberto spadim

use to_unixtimestamp() at plan_approved_on column

do you have the insert query? what binlog are you using row/binary/mixed?

 
11 years, 3 months ago Tim Rice

Those are all super questions. I don't know the answer to any of them. We have a developer who wrote this web application via php that does all the inserts. I will ask him if they can get me more info.

What I can tell you is what the schema looks like from a MariaDB perspective:

MariaDB [safeplan_new1]> desc plan_approval; +------------------------+-------------------+------+-----+-------------------+-----------------------------+

FieldTypeNullKeyDefaultExtra

+------------------------+-------------------+------+-----+-------------------+-----------------------------+

plan_approval_idint(11)NOPRINULLauto_increment
plan_master_idint(11)NONULL
plan_location_idint(11)NONULL
plan_approval_locationint(11)NONULL
plan_approval_byint(11)NONULL
plan_approved_ontimestampNOCURRENT_TIMESTAMPon update CURRENT_TIMESTAMP
plan_approval_statusenum('0','1','2')NONULL

+------------------------+-------------------+------+-----+-------------------+-----------------------------+

 
11 years, 3 months ago Tim Rice

To answer your question (sorry that I failed to answer this in the first post), I am using binlog_format=ROW

 
11 years, 3 months ago roberto spadim

ok

run this query in each server

select to_unixtimestamp(plan_approved_on) from safeplan_new1.plan_approval where plan_approval_id=3247

(i don't know if the problem is the on update at slaves, i never tried it)

check if you have diferrent unixtimestamps for servers

after this we could put this history at jira (mariadb bug tracker - https://mariadb.atlassian.net/), if we can't solve the error, i'm a mariadb user =]

propably they will ask about insert queires or binlog file

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.