Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.
  • CentOS release 6.3 (Final)
  • x86_64
  • mysql Ver 14.14 Distrib 5.5.31, for Linux (x86_64) using readline 5.1

SHOW SLAVE STATUS\G:

             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1696
                   Last_Error: Error executing row event: 'Failed to read from the .par file'

/var/log/mysqld.log:

130706  2:26:04 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './reportingdb/v3_ban_date.frm'
130706  2:26:04 [ERROR] Slave SQL: Error executing row event: 'Failed to read from the .par file', Error_code: 1696
130706  2:26:04 [Warning] Slave: Failed to read from the .par file Error_code: 1696
130706  2:26:04 [Warning] Slave: Incorrect information in file: './reportingdb/v3_ban_date.frm' Error_code: 1033

v3_ban_date is a partitioned table. The .par file is... empty:

# ls -l v3_ban_date.par
-rw-rw---- 1 mysql mysql 0 Jul  6 01:54 v3_ban_date.par

and this is the .frm format (hexdump -v -C v3_ban_date.frm):

|partition.... PA|
|RTITION BY RANGE|
| (TO_DAYS(dt)).(|
|PARTITION p00 VA|
|LUES LESS THAN (|
|0) ENGINE = Inno|
|DB,. PARTITION p|
|1 VALUES LESS TH|
|AN (734653) ENGI|
|NE = InnoDB,. PA|
|RTITION p02 VALU|
|ES LESS THAN (73|
|4745) ENGINE = I|
|nnoDB,. PARTITIO|
|N p031 VALUES LE|
|SS THAN (734863)|
| ENGINE = InnoDB|
|,. PARTITION p04|
| VALUES LESS THA|
|N (734959) ENGIN|
|E = InnoDB,. PAR|
|TITION p05 VALUE|
|S LESS THAN (735|
|103) ENGINE = In|
|noDB,. PARTITION|
| p06 VALUES LESS|
| THAN (735160) E|
|NGINE = InnoDB,.|
| PARTITION p07 V|
|ALUES LESS THAN |
|(735210) ENGINE |
|= InnoDB,. PARTI|
|TION MERGER_2013|
|324 VALUES LESS |
|THAN (735316) EN|
|GINE = InnoDB,. |
|PARTITION pcurre|
|nt_2013324 VALUE|
|S LESS THAN (735|
|317) ENGINE = In|
|noDB,. PARTITION|
| MERGER_201375 V|
|ALUES LESS THAN |
|(735419) ENGINE |
|= InnoDB,. PARTI|
|TION pcurrent_20|
|1375 VALUES LESS|
| THAN (735420) E|
|NGINE = InnoDB).|

The partition definitions on the first slave looks like this:

00000000  1f 00 00 00 74 00 01 07  0c 00 00 00 0c 0c 0c 0c  |....t...........|
00000010  0c 0c 0c 0c 0c 0c 0c 0c  60 00 00 00 70 30 30 00  |........`...p00.|
00000020  70 31 00 70 30 32 00 70  30 33 31 00 70 30 34 00  |p1.p02.p031.p04.|
00000030  70 30 35 00 70 30 36 00  70 30 37 00 4d 45 52 47  |p05.p06.p07.MERG|
00000040  45 52 5f 32 30 31 33 33  32 34 00 70 63 75 72 72  |ER_2013324.pcurr|
00000050  65 6e 74 5f 32 30 31 33  33 32 34 00 4d 45 52 47  |ent_2013324.MERG|
00000060  45 52 5f 32 30 31 33 38  32 38 00 70 63 75 72 72  |ER_2013828.pcurr|
00000070  65 6e 74 5f 32 30 31 33  38 32 38 00              |ent_2013828.|
0000007c

I've tried to copy this file to the second slave, then used bvi to edit the date to 201375 (corresponding with what is in the .frm file), then tried to start the second slave, but it didn't work.

So the questions are:

  1. How do I know what information is incorrect in the .frm file?
  2. Can I re-create the .par file from the one on the first slave?

PS: I know I can rebuild the second slave but I think this is an interesting challenge.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.