Commit 717ad60f authored by sunny's avatar sunny

branches/5.1: We need to send the messages to the client because

handler::get_auto_increment() doesn't allow a way to return the
specific error for why it failed.

rb://18
parent 78e58791
......@@ -7477,16 +7477,24 @@ ha_innobase::innobase_get_auto_increment(
} else {
*value = autoinc;
}
/* We need to print this message here because the
/* We need to send the messages to the client because
handler::get_auto_increment() doesn't allow a way
to return the specific error for why it failed. */
} else if (error == DB_DEADLOCK) {
sql_print_warning(
"Deadlock in "
THD* thd = ha_thd();
push_warning(
thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
ER_LOCK_DEADLOCK,
"InnoDB: Deadlock in "
"innobase_get_auto_increment()");
} else if (error == DB_LOCK_WAIT_TIMEOUT) {
sql_print_warning(
"Lock wait timeout in "
THD* thd = ha_thd();
push_warning(
thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
ER_LOCK_WAIT_TIMEOUT,
"InnoDB: Lock wait timeout in "
"innobase_get_auto_increment()");
} else {
......@@ -7495,7 +7503,6 @@ ha_innobase::innobase_get_auto_increment(
"innobase_get_auto_increment()",
error);
}
} while (*value == 0 && error == DB_SUCCESS);
return(error);
......
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