Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
38657b25
Commit
38657b25
authored
Aug 11, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: trx_general_rollback_for_mysql(): Remove the redundant
parameter partial. If savept==NULL, partial==FALSE.
parent
5c3850c8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
25 deletions
+23
-25
handler/handler0alter.cc
handler/handler0alter.cc
+1
-1
include/trx0roll.h
include/trx0roll.h
+2
-2
row/row0merge.c
row/row0merge.c
+1
-1
row/row0mysql.c
row/row0mysql.c
+12
-12
trx/trx0roll.c
trx/trx0roll.c
+7
-9
No files found.
handler/handler0alter.cc
View file @
38657b25
...
...
@@ -664,7 +664,7 @@ ha_innobase::add_index(
if
(
UNIV_UNLIKELY
(
error
))
{
err_exit:
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_commit_for_mysql
(
prebuilt
->
trx
);
DBUG_RETURN
(
error
);
...
...
include/trx0roll.h
View file @
38657b25
...
...
@@ -208,9 +208,9 @@ int
trx_general_rollback_for_mysql
(
/*===========================*/
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
partial rollback requested */
partial rollback requested, or NULL for
complete rollback */
/*******************************************************************//**
Rolls back a transaction back to a named savepoint. Modifications after the
savepoint are undone but InnoDB does NOT release the corresponding locks
...
...
row/row0merge.c
View file @
38657b25
...
...
@@ -2129,7 +2129,7 @@ row_merge_rename_tables(
if
(
err
!=
DB_SUCCESS
)
{
err_exit:
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
;
}
...
...
row/row0mysql.c
View file @
38657b25
...
...
@@ -510,7 +510,7 @@ row_mysql_handle_errors(
switch
(
err
)
{
case
DB_LOCK_WAIT_TIMEOUT
:
if
(
row_rollback_on_timeout
)
{
trx_general_rollback_for_mysql
(
trx
,
FALSE
,
NULL
);
trx_general_rollback_for_mysql
(
trx
,
NULL
);
break
;
}
/* fall through */
...
...
@@ -526,7 +526,7 @@ row_mysql_handle_errors(
/* Roll back the latest, possibly incomplete
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 */
break
;
...
...
@@ -548,7 +548,7 @@ row_mysql_handle_errors(
/* Roll back the whole transaction; this resolution was added
to version 3.23.43 */
trx_general_rollback_for_mysql
(
trx
,
FALSE
,
NULL
);
trx_general_rollback_for_mysql
(
trx
,
NULL
);
break
;
case
DB_MUST_GET_MORE_FILE_SPACE
:
...
...
@@ -1885,7 +1885,7 @@ row_create_table_for_mysql(
if
(
UNIV_UNLIKELY
(
err
!=
DB_SUCCESS
))
{
trx
->
error_state
=
DB_SUCCESS
;
trx_general_rollback_for_mysql
(
trx
,
FALSE
,
NULL
);
trx_general_rollback_for_mysql
(
trx
,
NULL
);
}
switch
(
err
)
{
...
...
@@ -2053,7 +2053,7 @@ row_create_index_for_mysql(
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
);
...
...
@@ -2121,7 +2121,7 @@ row_table_add_foreign_constraints(
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
);
...
...
@@ -2488,7 +2488,7 @@ row_discard_tablespace_for_mysql(
if
(
err
!=
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
;
}
else
{
dict_table_change_id_in_cache
(
table
,
new_id
);
...
...
@@ -2497,7 +2497,7 @@ row_discard_tablespace_for_mysql(
if
(
!
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
;
err
=
DB_ERROR
;
...
...
@@ -2949,7 +2949,7 @@ row_truncate_table_for_mysql(
if
(
err
!=
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
;
ut_print_timestamp
(
stderr
);
fputs
(
" InnoDB: Unable to assign a new identifier to table "
,
...
...
@@ -3854,7 +3854,7 @@ row_rename_table_for_mysql(
"InnoDB: succeed.
\n
"
,
stderr
);
}
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
;
}
else
{
/* The following call will also rename the .ibd data file if
...
...
@@ -3863,7 +3863,7 @@ row_rename_table_for_mysql(
if
(
!
dict_table_rename_in_cache
(
table
,
new_name
,
!
new_is_tmp
))
{
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
;
goto
funct_exit
;
}
...
...
@@ -3903,7 +3903,7 @@ row_rename_table_for_mysql(
ut_a
(
dict_table_rename_in_cache
(
table
,
old_name
,
FALSE
));
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/trx0roll.c
View file @
38657b25
...
...
@@ -66,9 +66,9 @@ int
trx_general_rollback_for_mysql
(
/*===========================*/
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
partial rollback requested */
partial rollback requested, or NULL for
complete rollback */
{
mem_heap_t
*
heap
;
que_thr_t
*
thr
;
...
...
@@ -85,9 +85,8 @@ trx_general_rollback_for_mysql(
roll_node
=
roll_node_create
(
heap
);
roll_node
->
partial
=
partial
;
if
(
partial
)
{
if
(
savept
)
{
roll_node
->
partial
=
TRUE
;
roll_node
->
savept
=
*
savept
;
}
...
...
@@ -145,7 +144,7 @@ trx_rollback_for_mysql(
the transaction object does not have an InnoDB session object, and we
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
=
""
;
...
...
@@ -170,8 +169,7 @@ trx_rollback_last_sql_stat_for_mysql(
trx
->
op_info
=
"rollback of SQL statement"
;
err
=
trx_general_rollback_for_mysql
(
trx
,
TRUE
,
&
(
trx
->
last_sql_stat_start
));
err
=
trx_general_rollback_for_mysql
(
trx
,
&
trx
->
last_sql_stat_start
);
/* The following call should not be needed, but we play safe: */
trx_mark_sql_stat_end
(
trx
);
...
...
@@ -282,7 +280,7 @@ trx_rollback_to_savepoint_for_mysql(
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
to roll back if we have to roll back the next SQL statement: */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment