[ERROR] Cannot find index <col> in InnoDB index translation table. | [Warning] InnoDB could not find index <col> key no <nr> for table tmp/#sql<id> through its index translation table

Bug #1233431 reported by Roel Van de Paar
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Undecided
Unassigned
5.5
Fix Released
High
Laurynas Biveinis
5.6
Fix Released
High
Laurynas Biveinis
5.7
Fix Released
High
Laurynas Biveinis

Bug Description

Testcase:

DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE innodb_default(
c36 TEXT, c46 DATE, c32 BLOB, c3 char, c24 INT unsigned not null,
c195 INT, c0 char, c44 TEXT, c40 TEXT, c48 DATE, c27 BLOB, c38 TEXT,
c4 char, c21 INT not null, c5 char, c39 TEXT, c198 INT unsigned,
c8 char, c19 char, c53 DATE not null, c190 INT, c6 char, c9 INT,
c193 INT unsigned, c35 BLOB not null, c192 INT unsigned, c28 BLOB,
c34 BLOB not null, c25 INT unsigned not null, c196 INT, c42 TEXT,
c52 DATE not null, c37 TEXT, c191 INT, c33 BLOB not null, c30 BLOB,
c7 char, c20 INT unsigned, c26 INT unsigned not null, c47 DATE,
c2 char, c199 INT unsigned, c51 DATE not null, c194 INT unsigned,
c29 BLOB, c49 DATE, c41 TEXT, c31 BLOB, c22 INT not null, c45 DATE,
c50 DATE, c43 TEXT, c23 INT not null, c197 INT, unique(c52),
key(c197)) ENGINE=innodb ROW_FORMAT=default;
INSERT INTO innodb_default VALUES
(0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,6,0,0,0,0,0,0,0,0,0,1,0,0,0,0,5,0,0,1,0,0,0,1,0,0,0,0,1,0,0,-107);
SET SESSION EXPAND_FAST_INDEX_CREATION=ON;
CREATE TEMPORARY TABLE t LIKE innodb_default;
INSERT INTO t SELECT * FROM innodb_default;
ALTER TABLE t RENAME innodb_default;
REPLACE INTO innodb_default (c192) VALUES (0);

Results in:

2013-09-30 15:55:49 32238 [ERROR] Cannot find index c52 in InnoDB index translation table.
2013-09-30 15:55:49 32238 [Warning] InnoDB could not find index c52 key no 0 for table tmp/#sql7dee_1_1 through its index translation table

Revision history for this message
Roel Van de Paar (roel11) wrote :

mysql> REPLACE INTO innodb_default (c192) VALUES (0);
Query OK, 2 rows affected, 12 warnings (0.00 sec)

mysql> show warnings;
+---------+------+------------------------------------------+
| Level | Code | Message |
+---------+------+------------------------------------------+
| Warning | 1364 | Field 'c24' doesn't have a default value |
| Warning | 1364 | Field 'c21' doesn't have a default value |
| Warning | 1364 | Field 'c53' doesn't have a default value |
| Warning | 1364 | Field 'c35' doesn't have a default value |
| Warning | 1364 | Field 'c34' doesn't have a default value |
| Warning | 1364 | Field 'c25' doesn't have a default value |
| Warning | 1364 | Field 'c52' doesn't have a default value |
| Warning | 1364 | Field 'c33' doesn't have a default value |
| Warning | 1364 | Field 'c26' doesn't have a default value |
| Warning | 1364 | Field 'c51' doesn't have a default value |
| Warning | 1364 | Field 'c22' doesn't have a default value |
| Warning | 1364 | Field 'c23' doesn't have a default value |
+---------+------+------------------------------------------+
12 rows in set (0.00 sec)

description: updated
description: updated
Revision history for this message
Roel Van de Paar (roel11) wrote :

- Though MS 5.6.12 gives the same warnings, the error log does not show the issue.
- No special/feature mysqld options are necessary for PS to reproduce this
- PS 5.5 gives the warning, but not the error:

InnoDB: DEBUG: update_statistics for test/innodb_default.
InnoDB: DEBUG: update_statistics for test/innodb_default.
InnoDB: DEBUG: update_statistics for tmp/#sql3ed2_1_0.
InnoDB: DEBUG: update_statistics for tmp/#sql3ed2_1_0.
InnoDB: DEBUG: update_statistics for tmp/#sql3ed2_1_1.
InnoDB: DEBUG: update_statistics for tmp/#sql3ed2_1_1.
InnoDB: DEBUG: update_statistics for tmp/#sql3ed2_1_1.
InnoDB: DEBUG: update_statistics for tmp/#sql3ed2_1_1.
131001 9:02:04 [Warning] InnoDB could not find index c52 key no 0 for table tmp/#sql3ed2_1_1 through its index translation table

Revision history for this message
Roel Van de Paar (roel11) wrote :

Marking as 5.5 affected, even though 5.6 is differently/more? affected then 5.5 as it ERRORs also. Marked 5.5 as critical also as it may be data corruption? (or is it just a bad index?). Note that this issue is also seen with some regularity, so the testcase above is likely not the only one.

Revision history for this message
Roel Van de Paar (roel11) wrote :

(Dotted line to bug 1226538?)

Revision history for this message
Roel Van de Paar (roel11) wrote :

Issue here is presumably in FAST_INDEX_CREATION

tags: added: fic
tags: removed: 56qual
Revision history for this message
Roel Van de Paar (roel11) wrote :

See also bug 858945

This is still visible in Percona-Server-5.6.17-rel65.0-604.Linux.x86_64-debug

Revision history for this message
Alexey Kopytov (akopytov) wrote :

This has nothing to do neither with fast index creation nor with expand_fast_index_creation.

tags: removed: fic
Revision history for this message
Jervin R (revin) wrote :

Seems this can lead to a crash too:

150503 12:02:12 [Warning] InnoDB could not find index t1_idx1 key no 0
for table tmp/#sql7328_49b2_2 through its index translation table
16:02:14 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Please help us make Percona Server better by reporting any
bugs at http://bugs.percona.com/

key_buffer_size=1073741824
read_buffer_size=131072
max_used_connections=22
max_threads=514
thread_count=19
connection_count=19
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 5331428 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x2ac340015bf0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 2ac337e0b098 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x35)[0x7cae05]
/usr/sbin/mysqld(handle_fatal_signal+0x4b4)[0x69ff34]
/lib64/libpthread.so.0[0x2abd248b2ca0]
/usr/sbin/mysqld[0x91be28]
/usr/sbin/mysqld[0x806b96]
/usr/sbin/mysqld[0x7ed321]
/usr/sbin/mysqld(_ZN7handler12ha_write_rowEPh+0x5c)[0x6a51fc]
/usr/sbin/mysqld(_Z12write_recordP3THDP5TABLEP12st_copy_info+0x6f)[0x5803df]
/usr/sbin/mysqld(_ZN13select_insert9send_dataER4ListI4ItemE+0xab)[0x580c9b]
/usr/sbin/mysqld[0x5bc5e4]
/usr/sbin/mysqld[0x5b6371]
/usr/sbin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x86)[0x5bb136]
/usr/sbin/mysqld[0x5b6371]
/usr/sbin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x86)[0x5bb136]
/usr/sbin/mysqld[0x5bf177]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0xc81)[0x5d6961]
/usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_
orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x12c)[0x5d
815c]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x1cd)[0x5d8c0d]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x41e9)[0x5995e9]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x33b)[0x59a37b]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1dae)[0x59c
9fe]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x13f)[0x63ca3f]
/usr/sbin/mysqld(handle_one_connection+0x51)[0x63cb21]
/lib64/libpthread.so.0[0x2abd248aa83d]
/lib64/libc.so.6(clone+0x6d)[0x2abd25efdfcd]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (35aee8a0): INSERT INTO <temptable> (...) SELECT ... FROM t1, t2 WHERE ...
Connection ID (thread ID): 18866
Status: NOT_KILLED

tags: added: i53749
tags: added: expand-fast-index-creation
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-728

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.