Commit 2f3c7652 authored by jyang's avatar jyang

branches/zip: Fix bug #51356: "many valgrind errors in error messages

with concurrent ddl". Null terminate the name string returned
from innobase_convert_identifier() call when reporting DB_DUPLICATE_KEY
error in create_table_def().
rb://266 approved by Marko
parent 7460fcde
......@@ -6045,9 +6045,11 @@ create_table_def(
if (error == DB_DUPLICATE_KEY) {
char buf[100];
innobase_convert_identifier(buf, sizeof buf,
table_name, strlen(table_name),
trx->mysql_thd, TRUE);
char* buf_end = innobase_convert_identifier(
buf, sizeof buf - 1, table_name, strlen(table_name),
trx->mysql_thd, TRUE);
*buf_end = '\0';
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), buf);
}
......
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