mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 22:12:30 +01:00
branches/zip: row_rename_table_for_mysql(): Change the return type to ulint
and simplify error handling.
This commit is contained in:
parent
b4e60c0544
commit
635d049d13
2 changed files with 6 additions and 8 deletions
|
@ -488,7 +488,7 @@ row_drop_database_for_mysql(
|
|||
/*************************************************************************
|
||||
Renames a table for MySQL. */
|
||||
|
||||
int
|
||||
ulint
|
||||
row_rename_table_for_mysql(
|
||||
/*=======================*/
|
||||
/* out: error code or DB_SUCCESS */
|
||||
|
|
|
@ -3747,7 +3747,7 @@ row_delete_constraint(
|
|||
/*************************************************************************
|
||||
Renames a table for MySQL. */
|
||||
|
||||
int
|
||||
ulint
|
||||
row_rename_table_for_mysql(
|
||||
/*=======================*/
|
||||
/* out: error code or DB_SUCCESS */
|
||||
|
@ -3757,7 +3757,7 @@ row_rename_table_for_mysql(
|
|||
ibool commit) /* in: if TRUE then commit trx */
|
||||
{
|
||||
dict_table_t* table;
|
||||
ulint err;
|
||||
ulint err = DB_ERROR;
|
||||
mem_heap_t* heap = NULL;
|
||||
const char** constraints_to_drop = NULL;
|
||||
ulint n_constraints_to_drop = 0;
|
||||
|
@ -3777,8 +3777,7 @@ row_rename_table_for_mysql(
|
|||
"InnoDB: with raw, and innodb_force_... is removed.\n",
|
||||
stderr);
|
||||
|
||||
trx_commit_for_mysql(trx);
|
||||
return(DB_ERROR);
|
||||
goto funct_exit;
|
||||
} else if (row_mysql_is_system_table(new_name)) {
|
||||
|
||||
fprintf(stderr,
|
||||
|
@ -3788,8 +3787,7 @@ row_rename_table_for_mysql(
|
|||
" of the MyISAM type!\n",
|
||||
new_name);
|
||||
|
||||
trx_commit_for_mysql(trx);
|
||||
return(DB_ERROR);
|
||||
goto funct_exit;
|
||||
}
|
||||
|
||||
trx->op_info = "renaming table";
|
||||
|
@ -4080,7 +4078,7 @@ funct_exit:
|
|||
|
||||
trx->op_info = "";
|
||||
|
||||
return((int) err);
|
||||
return(err);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
|
Loading…
Reference in a new issue