1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Applying InnoDB snapshot, fixes BUG#51356.

Detailed revision comments:

r6790 | jyang | 2010-03-10 13:09:41 +0200 (Wed, 10 Mar 2010) | 7 lines
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
This commit is contained in:
Sergey Vojtovich
2010-04-01 16:14:51 +04:00
parent 5676876884
commit 1fb843587c
3 changed files with 148 additions and 3 deletions

View File

@ -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);
}