Commit 191261da 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 16b41a58
...@@ -6045,9 +6045,11 @@ create_table_def( ...@@ -6045,9 +6045,11 @@ create_table_def(
if (error == DB_DUPLICATE_KEY) { if (error == DB_DUPLICATE_KEY) {
char buf[100]; char buf[100];
innobase_convert_identifier(buf, sizeof buf, char* buf_end = innobase_convert_identifier(
table_name, strlen(table_name), buf, sizeof buf - 1, table_name, strlen(table_name),
trx->mysql_thd, TRUE); trx->mysql_thd, TRUE);
*buf_end = '\0';
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), buf); 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