Commit c90753e6 authored by Sergei Petrunia's avatar Sergei Petrunia

Follow the upstream MyRocks: provide details in the ER_LOCK_DEADLOCK message

This fixes result mismatches in rocksdb.issue111, rocksdb.hermitage,
rocksdb.rocksdb_locks
parent 123187df
......@@ -3490,10 +3490,17 @@ void handler::print_error(int error, myf errflag)
textno=ER_LOCK_TABLE_FULL;
break;
case HA_ERR_LOCK_DEADLOCK:
textno=ER_LOCK_DEADLOCK;
{
String str, full_err_msg(ER_DEFAULT(ER_LOCK_DEADLOCK), system_charset_info);
/* cannot continue. the statement was already aborted in the engine */
SET_FATAL_ERROR;
break;
get_error_message(error, &str);
full_err_msg.append(str);
my_printf_error(ER_LOCK_DEADLOCK, "%s", errflag, full_err_msg.c_ptr_safe());
DBUG_VOID_RETURN;
}
case HA_ERR_READ_ONLY_TRANSACTION:
textno=ER_READ_ONLY_TRANSACTION;
break;
......
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