Commit b931d4f9 authored by jyang's avatar jyang

branches/5.1: Fix bug #49238: Creating/Dropping a temporary table

while at 1023 transactions will cause assert. Handle possible
DB_TOO_MANY_CONCURRENT_TRXS when deleting metadata in
row_drop_table_for_mysql().

rb://220, approved by Marko
parent 40c676dc
......@@ -3245,19 +3245,13 @@ row_drop_table_for_mysql(
"END;\n"
, FALSE, trx);
if (err != DB_SUCCESS) {
ut_a(err == DB_OUT_OF_FILE_SPACE);
err = DB_MUST_GET_MORE_FILE_SPACE;
row_mysql_handle_errors(&err, trx, NULL, NULL);
ut_error;
} else {
switch (err) {
ibool is_path;
const char* name_or_path;
mem_heap_t* heap;
case DB_SUCCESS:
heap = mem_heap_create(200);
/* Clone the name, in case it has been allocated
......@@ -3322,7 +3316,27 @@ row_drop_table_for_mysql(
}
mem_heap_free(heap);
break;
case DB_TOO_MANY_CONCURRENT_TRXS:
/* Cannot even find a free slot for the
the undo log. We can directly exit here
and return the DB_TOO_MANY_CONCURRENT_TRXS
error. */
break;
case DB_OUT_OF_FILE_SPACE:
err = DB_MUST_GET_MORE_FILE_SPACE;
row_mysql_handle_errors(&err, trx, NULL, NULL);
/* Fall through to raise error */
default:
/* No other possible error returns */
ut_error;
}
funct_exit:
trx_commit_for_mysql(trx);
......
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