Commit 28c784aa authored by Jimmy Yang's avatar Jimmy Yang

In innobase_format_name() we should call innobase_convert_name() with

"!is_index_name" instead of "is_index_name", so the table name in the
error message would not be formated as index name.
parent 8b72b936
...@@ -45,7 +45,7 @@ select z from corrupt_bit_test_ā; ...@@ -45,7 +45,7 @@ select z from corrupt_bit_test_ā;
ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
show warnings; show warnings;
Level Code Message Level Code Message
Warning 179 InnoDB: Index "idxē" for table "test/corrupt_bit_test_@1s" is marked as corrupted Warning 179 InnoDB: Index "idxē" for table "test"."corrupt_bit_test_ā" is marked as corrupted
Error 1034 Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it Error 1034 Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001); insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001);
select * from corrupt_bit_test_ā use index(primary) where a = 10001; select * from corrupt_bit_test_ā use index(primary) where a = 10001;
......
...@@ -2096,7 +2096,9 @@ innobase_format_name( ...@@ -2096,7 +2096,9 @@ innobase_format_name(
const char* bufend; const char* bufend;
bufend = innobase_convert_name(buf, buflen, name, strlen(name), bufend = innobase_convert_name(buf, buflen, name, strlen(name),
NULL, is_index_name); NULL, !is_index_name);
ut_ad((ulint) (bufend - buf) < buflen);
buf[bufend - buf] = '\0'; buf[bufend - buf] = '\0';
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment