mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge into latest 5.2.
This commit is contained in:
@ -4199,22 +4199,22 @@ retry:
|
||||
entry->file->implicit_emptied= 0;
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
char *query, *end;
|
||||
uint query_buf_size= 20 + share->db.length + share->table_name.length +1;
|
||||
if ((query= (char*) my_malloc(query_buf_size,MYF(MY_WME))))
|
||||
char query_buf[2*FN_REFLEN + 21];
|
||||
String query(query_buf, sizeof(query_buf), system_charset_info);
|
||||
query.length(0);
|
||||
if (query.ptr())
|
||||
{
|
||||
/* this DELETE FROM is needed even with row-based binlogging */
|
||||
end = strxmov(strmov(query, "DELETE FROM `"),
|
||||
share->db.str,"`.`",share->table_name.str,"`", NullS);
|
||||
query.append("DELETE FROM ");
|
||||
append_identifier(thd, &query, share->db.str, share->db.length);
|
||||
query.append(".");
|
||||
append_identifier(thd, &query, share->table_name.str,
|
||||
share->table_name.length);
|
||||
int errcode= query_error_code(thd, TRUE);
|
||||
if (thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
query, (ulong)(end-query),
|
||||
query.ptr(), query.length(),
|
||||
FALSE, FALSE, errcode))
|
||||
{
|
||||
my_free(query, MYF(0));
|
||||
goto err;
|
||||
}
|
||||
my_free(query, MYF(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4224,7 +4224,7 @@ retry:
|
||||
because of MYF(MY_WME) in my_malloc() above).
|
||||
*/
|
||||
sql_print_error("When opening HEAP table, could not allocate memory "
|
||||
"to write 'DELETE FROM `%s`.`%s`' to the binary log",
|
||||
"to write 'DELETE FROM %`s.%`s' to the binary log",
|
||||
table_list->db, table_list->table_name);
|
||||
delete entry->triggers;
|
||||
closefrm(entry, 0);
|
||||
|
Reference in New Issue
Block a user