Commit f3aa7770 authored by unknown's avatar unknown

Don't generate message in send_kill_message() if wrong data. (Caused core dump...

Don't generate message in send_kill_message() if wrong data. (Caused core dump for wrong data in ALTER TABLE on some system)


sql/item_timefunc.cc:
  Removed warning reported by valgrind
sql/sql_error.cc:
  Fixed comment
sql/sql_table.cc:
  Fixed comment
parent 4ade7693
......@@ -2199,7 +2199,7 @@ String *Item_char_typecast::val_str(String *str)
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE,
ER(ER_TRUNCATED_WRONG_VALUE), char_type,
res->c_ptr());
res->c_ptr_safe());
res->length((uint) length);
}
null_value= 0;
......
......@@ -1410,6 +1410,7 @@ class THD :public ilink,
inline void send_kill_message() const
{
int err= killed_errno();
if (err)
my_message(err, ER(err), MYF(0));
}
/* return TRUE if we will abort query if we make a warning now */
......
......@@ -133,7 +133,7 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
thd->spcont= spcont;
thd->no_warnings_for_error= no_warnings_for_error;
/* Store error in error list (as my_message() didn't do it in this case */
/* Store error in error list (as my_message() didn't do it) */
level= MYSQL_ERROR::WARN_LEVEL_ERROR;
}
......
......@@ -3740,9 +3740,11 @@ copy_data_between_tables(TABLE *from,TABLE *to,
goto err;
};
/* Handler must be told explicitly to retrieve all columns, because
/*
Handler must be told explicitly to retrieve all columns, because
this function does not set field->query_id in the columns to the
current query id */
current query id
*/
from->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1,1);
if (ignore ||
......
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