Bug #67402 mysqlhotcopy log_pos table description specifies invalid width for timestamp col
Submitted: 28 Oct 2012 19:32 Modified: 19 Jun 2014 5:54
Reporter: Elan Ruusamäe (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.5.28 OS:Any
Assigned to: CPU Architecture:Any

[28 Oct 2012 19:32] Elan Ruusamäe
Description:
mysqlhotcopy log_pos table description specifies invalid width for timestamp column:

https://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/scripts/mysqlhotcopy.sh  @3953

How to repeat:
mysql test <<EOF

CREATE TABLE log_pos (
  host            varchar(60) NOT null,
  time_stamp      timestamp(14) NOT NULL,
  log_file        varchar(32) default NULL,
  log_pos         int(11)     default NULL,
  master_host     varchar(60) NULL,
  master_log_file varchar(32) NULL,
  master_log_pos  int NULL,

  PRIMARY KEY  (host) 
);
EOF

this results error in mysql 5.5.27 (at least):

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(14) NOT NULL,
        log_file        varchar(32) default NULL,
        log_pos         int(1' at line 3

Suggested fix:
fix is simple: remove the "timestamp(14)" and replace it with just "timestamp"
[28 Oct 2012 19:38] Elan Ruusamäe
proposed fix as a patch:

http://git.pld-linux.org/?p=packages/mysql.git;a=blob;f=bug-67402.patch;h=18bd2ee426ea88d9...

the same, as raw: 
http://git.pld-linux.org/?p=packages/mysql.git;a=blob_plain;f=bug-67402.patch;h=18bd2ee426...
[13 Nov 2012 19:47] Sveta Smirnova
Thank you for the report.

Verified as described.
[19 Jun 2014 5:54] Erlend Dahl
[16 Jun 2014 2:06] Georgi Kodinov

mysqlhotcopy was deprecated in 5.6 and removed in 5.7, due to it not really
delivering to what it was supposed to do.
Please consider using the innodb incremental backup instead.