Commit 38657b25 authored by marko's avatar marko

branches/zip: trx_general_rollback_for_mysql(): Remove the redundant

parameter partial. If savept==NULL, partial==FALSE.
parent 5c3850c8
...@@ -664,7 +664,7 @@ ha_innobase::add_index( ...@@ -664,7 +664,7 @@ ha_innobase::add_index(
if (UNIV_UNLIKELY(error)) { if (UNIV_UNLIKELY(error)) {
err_exit: err_exit:
mem_heap_free(heap); mem_heap_free(heap);
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
trx_free_for_mysql(trx); trx_free_for_mysql(trx);
trx_commit_for_mysql(prebuilt->trx); trx_commit_for_mysql(prebuilt->trx);
DBUG_RETURN(error); DBUG_RETURN(error);
......
...@@ -208,9 +208,9 @@ int ...@@ -208,9 +208,9 @@ int
trx_general_rollback_for_mysql( trx_general_rollback_for_mysql(
/*===========================*/ /*===========================*/
trx_t* trx, /*!< in: transaction handle */ trx_t* trx, /*!< in: transaction handle */
ibool partial,/*!< in: TRUE if partial rollback requested */
trx_savept_t* savept);/*!< in: pointer to savepoint undo number, if trx_savept_t* savept);/*!< in: pointer to savepoint undo number, if
partial rollback requested */ partial rollback requested, or NULL for
complete rollback */
/*******************************************************************//** /*******************************************************************//**
Rolls back a transaction back to a named savepoint. Modifications after the Rolls back a transaction back to a named savepoint. Modifications after the
savepoint are undone but InnoDB does NOT release the corresponding locks savepoint are undone but InnoDB does NOT release the corresponding locks
......
...@@ -2129,7 +2129,7 @@ row_merge_rename_tables( ...@@ -2129,7 +2129,7 @@ row_merge_rename_tables(
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
err_exit: err_exit:
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
} }
......
...@@ -510,7 +510,7 @@ handle_new_error: ...@@ -510,7 +510,7 @@ handle_new_error:
switch (err) { switch (err) {
case DB_LOCK_WAIT_TIMEOUT: case DB_LOCK_WAIT_TIMEOUT:
if (row_rollback_on_timeout) { if (row_rollback_on_timeout) {
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
break; break;
} }
/* fall through */ /* fall through */
...@@ -526,7 +526,7 @@ handle_new_error: ...@@ -526,7 +526,7 @@ handle_new_error:
/* Roll back the latest, possibly incomplete /* Roll back the latest, possibly incomplete
insertion or update */ insertion or update */
trx_general_rollback_for_mysql(trx, TRUE, savept); trx_general_rollback_for_mysql(trx, savept);
} }
/* MySQL will roll back the latest SQL statement */ /* MySQL will roll back the latest SQL statement */
break; break;
...@@ -548,7 +548,7 @@ handle_new_error: ...@@ -548,7 +548,7 @@ handle_new_error:
/* Roll back the whole transaction; this resolution was added /* Roll back the whole transaction; this resolution was added
to version 3.23.43 */ to version 3.23.43 */
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
break; break;
case DB_MUST_GET_MORE_FILE_SPACE: case DB_MUST_GET_MORE_FILE_SPACE:
...@@ -1885,7 +1885,7 @@ err_exit: ...@@ -1885,7 +1885,7 @@ err_exit:
if (UNIV_UNLIKELY(err != DB_SUCCESS)) { if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
} }
switch (err) { switch (err) {
...@@ -2053,7 +2053,7 @@ error_handling: ...@@ -2053,7 +2053,7 @@ error_handling:
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
row_drop_table_for_mysql(table_name, trx, FALSE); row_drop_table_for_mysql(table_name, trx, FALSE);
...@@ -2121,7 +2121,7 @@ row_table_add_foreign_constraints( ...@@ -2121,7 +2121,7 @@ row_table_add_foreign_constraints(
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
row_drop_table_for_mysql(name, trx, FALSE); row_drop_table_for_mysql(name, trx, FALSE);
...@@ -2488,7 +2488,7 @@ row_discard_tablespace_for_mysql( ...@@ -2488,7 +2488,7 @@ row_discard_tablespace_for_mysql(
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
} else { } else {
dict_table_change_id_in_cache(table, new_id); dict_table_change_id_in_cache(table, new_id);
...@@ -2497,7 +2497,7 @@ row_discard_tablespace_for_mysql( ...@@ -2497,7 +2497,7 @@ row_discard_tablespace_for_mysql(
if (!success) { if (!success) {
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
err = DB_ERROR; err = DB_ERROR;
...@@ -2949,7 +2949,7 @@ next_rec: ...@@ -2949,7 +2949,7 @@ next_rec:
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
fputs(" InnoDB: Unable to assign a new identifier to table ", fputs(" InnoDB: Unable to assign a new identifier to table ",
...@@ -3854,7 +3854,7 @@ end: ...@@ -3854,7 +3854,7 @@ end:
"InnoDB: succeed.\n", stderr); "InnoDB: succeed.\n", stderr);
} }
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
} else { } else {
/* The following call will also rename the .ibd data file if /* The following call will also rename the .ibd data file if
...@@ -3863,7 +3863,7 @@ end: ...@@ -3863,7 +3863,7 @@ end:
if (!dict_table_rename_in_cache(table, new_name, if (!dict_table_rename_in_cache(table, new_name,
!new_is_tmp)) { !new_is_tmp)) {
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
goto funct_exit; goto funct_exit;
} }
...@@ -3903,7 +3903,7 @@ end: ...@@ -3903,7 +3903,7 @@ end:
ut_a(dict_table_rename_in_cache(table, ut_a(dict_table_rename_in_cache(table,
old_name, FALSE)); old_name, FALSE));
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, NULL);
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
} }
} }
......
...@@ -66,9 +66,9 @@ int ...@@ -66,9 +66,9 @@ int
trx_general_rollback_for_mysql( trx_general_rollback_for_mysql(
/*===========================*/ /*===========================*/
trx_t* trx, /*!< in: transaction handle */ trx_t* trx, /*!< in: transaction handle */
ibool partial,/*!< in: TRUE if partial rollback requested */
trx_savept_t* savept) /*!< in: pointer to savepoint undo number, if trx_savept_t* savept) /*!< in: pointer to savepoint undo number, if
partial rollback requested */ partial rollback requested, or NULL for
complete rollback */
{ {
mem_heap_t* heap; mem_heap_t* heap;
que_thr_t* thr; que_thr_t* thr;
...@@ -85,9 +85,8 @@ trx_general_rollback_for_mysql( ...@@ -85,9 +85,8 @@ trx_general_rollback_for_mysql(
roll_node = roll_node_create(heap); roll_node = roll_node_create(heap);
roll_node->partial = partial; if (savept) {
roll_node->partial = TRUE;
if (partial) {
roll_node->savept = *savept; roll_node->savept = *savept;
} }
...@@ -145,7 +144,7 @@ trx_rollback_for_mysql( ...@@ -145,7 +144,7 @@ trx_rollback_for_mysql(
the transaction object does not have an InnoDB session object, and we the transaction object does not have an InnoDB session object, and we
set a dummy session that we use for all MySQL transactions. */ set a dummy session that we use for all MySQL transactions. */
err = trx_general_rollback_for_mysql(trx, FALSE, NULL); err = trx_general_rollback_for_mysql(trx, NULL);
trx->op_info = ""; trx->op_info = "";
...@@ -170,8 +169,7 @@ trx_rollback_last_sql_stat_for_mysql( ...@@ -170,8 +169,7 @@ trx_rollback_last_sql_stat_for_mysql(
trx->op_info = "rollback of SQL statement"; trx->op_info = "rollback of SQL statement";
err = trx_general_rollback_for_mysql(trx, TRUE, err = trx_general_rollback_for_mysql(trx, &trx->last_sql_stat_start);
&(trx->last_sql_stat_start));
/* The following call should not be needed, but we play safe: */ /* The following call should not be needed, but we play safe: */
trx_mark_sql_stat_end(trx); trx_mark_sql_stat_end(trx);
...@@ -282,7 +280,7 @@ trx_rollback_to_savepoint_for_mysql( ...@@ -282,7 +280,7 @@ trx_rollback_to_savepoint_for_mysql(
trx->op_info = "rollback to a savepoint"; trx->op_info = "rollback to a savepoint";
err = trx_general_rollback_for_mysql(trx, TRUE, &(savep->savept)); err = trx_general_rollback_for_mysql(trx, &savep->savept);
/* Store the current undo_no of the transaction so that we know where /* Store the current undo_no of the transaction so that we know where
to roll back if we have to roll back the next SQL statement: */ to roll back if we have to roll back the next SQL statement: */
......
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