Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.13
-
None
-
None
Description
When trying to do:
update tstx set msg = 'bof' where id = 35;
|
on the table:
create table tstx (
|
id int(4) key not null,
|
msg varchar(16))
|
engine=connect table_type=FIX block_size=4;
|
in which no rows have been inserted yet or all rows deleted, results in the message:
|
Got error 122 "Internal (unspecified) error in handler"
|
This occurs despite the handler does not return any error code (it just pushes a warning)
It seems that this occurs in mysql_update in sql_update.cc line 910:
/*
|
Caching the killed status to pass as the arg to query event constuctor;
|
The cached value can not change whereas the killed status can
|
(externally) since this point and change of the latter won't affect
|
binlogging.
|
It's assumed that if an error was set in combination with an effective
|
killed status then the error is due to killing.
|
*/
|
killed_status= thd->killed; // get the status of the volatile
|
// simulated killing after the loop must be ineffective for binlogging
|
DBUG_EXECUTE_IF("simulate_kill_bug27571",
|
{
|
thd->killed= KILL_QUERY;
|
};);
|
error= (killed_status == NOT_KILLED)? error : 1;
|
I haven't the faintest idea of what this code does but in normal cases the error variable remains equal to -1 while in this case it is set to 122 causing the error.