mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
trunk: Remove error introduced in r87 of branches/5.0, ported in r88:
In row_ins_set_detailed(), truncate the tmpfile by os_file_set_eof(), because trx_set_detailed_error_from_file() does not call ftell() to determine the actual length of the file. This bug resulted in trash being appended to foreign key error messages.
This commit is contained in:
parent
389c33b746
commit
5d0b073d46
1 changed files with 9 additions and 3 deletions
|
@ -591,10 +591,16 @@ row_ins_set_detailed(
|
|||
mutex_enter(&srv_misc_tmpfile_mutex);
|
||||
rewind(srv_misc_tmpfile);
|
||||
|
||||
ut_print_name(srv_misc_tmpfile, trx, foreign->foreign_table_name);
|
||||
dict_print_info_on_foreign_key_in_create_format(srv_misc_tmpfile,
|
||||
if (os_file_set_eof(srv_misc_tmpfile)) {
|
||||
ut_print_name(srv_misc_tmpfile, trx,
|
||||
foreign->foreign_table_name);
|
||||
dict_print_info_on_foreign_key_in_create_format(
|
||||
srv_misc_tmpfile,
|
||||
trx, foreign, FALSE);
|
||||
trx_set_detailed_error_from_file(trx, srv_misc_tmpfile);
|
||||
trx_set_detailed_error_from_file(trx, srv_misc_tmpfile);
|
||||
} else {
|
||||
trx_set_detailed_error(trx, "temp file operation failed");
|
||||
}
|
||||
|
||||
mutex_exit(&srv_misc_tmpfile_mutex);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue