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
This commit is contained in:
parent
4ade769345
commit
f3aa7770b6
@ -2199,7 +2199,7 @@ String *Item_char_typecast::val_str(String *str)
|
|||||||
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
ER_TRUNCATED_WRONG_VALUE,
|
ER_TRUNCATED_WRONG_VALUE,
|
||||||
ER(ER_TRUNCATED_WRONG_VALUE), char_type,
|
ER(ER_TRUNCATED_WRONG_VALUE), char_type,
|
||||||
res->c_ptr());
|
res->c_ptr_safe());
|
||||||
res->length((uint) length);
|
res->length((uint) length);
|
||||||
}
|
}
|
||||||
null_value= 0;
|
null_value= 0;
|
||||||
|
@ -1410,7 +1410,8 @@ public:
|
|||||||
inline void send_kill_message() const
|
inline void send_kill_message() const
|
||||||
{
|
{
|
||||||
int err= killed_errno();
|
int err= killed_errno();
|
||||||
my_message(err, ER(err), MYF(0));
|
if (err)
|
||||||
|
my_message(err, ER(err), MYF(0));
|
||||||
}
|
}
|
||||||
/* return TRUE if we will abort query if we make a warning now */
|
/* return TRUE if we will abort query if we make a warning now */
|
||||||
inline bool really_abort_on_warning()
|
inline bool really_abort_on_warning()
|
||||||
|
@ -133,7 +133,7 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
|
|||||||
|
|
||||||
thd->spcont= spcont;
|
thd->spcont= spcont;
|
||||||
thd->no_warnings_for_error= no_warnings_for_error;
|
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;
|
level= MYSQL_ERROR::WARN_LEVEL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3740,9 +3740,11 @@ copy_data_between_tables(TABLE *from,TABLE *to,
|
|||||||
goto err;
|
goto err;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Handler must be told explicitly to retrieve all columns, because
|
/*
|
||||||
this function does not set field->query_id in the columns to the
|
Handler must be told explicitly to retrieve all columns, because
|
||||||
current query id */
|
this function does not set field->query_id in the columns to the
|
||||||
|
current query id
|
||||||
|
*/
|
||||||
from->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
|
from->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
|
||||||
init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1,1);
|
init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1,1);
|
||||||
if (ignore ||
|
if (ignore ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user