Skip to content

Commit

Permalink
Follow-up to MDEV-11487: Remove InnoDB internal temporary tables
Browse files Browse the repository at this point in the history
row_update_for_mysql(): Remove the wrapper function and
rename the function from row_update_for_mysql_using_upd_graph().
Remove the unused parameter mysql_rec.
  • Loading branch information
dr-m committed Aug 8, 2017
1 parent c3f9fde commit ffa3789
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 26 deletions.
4 changes: 2 additions & 2 deletions storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9417,7 +9417,7 @@ ha_innobase::update_row(

innobase_srv_conc_enter_innodb(m_prebuilt);

error = row_update_for_mysql((byte*) old_row, m_prebuilt);
error = row_update_for_mysql(m_prebuilt);

if (error == DB_SUCCESS && autoinc) {
/* A value for an AUTO_INCREMENT column
Expand Down Expand Up @@ -9532,7 +9532,7 @@ ha_innobase::delete_row(

innobase_srv_conc_enter_innodb(m_prebuilt);

error = row_update_for_mysql((byte*) record, m_prebuilt);
error = row_update_for_mysql(m_prebuilt);

innobase_srv_conc_exit_innodb(m_prebuilt);

Expand Down
5 changes: 1 addition & 4 deletions storage/innobase/include/row0mysql.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,10 @@ row_table_got_default_clust_index(
const dict_table_t* table); /*!< in: table */

/** Does an update or delete of a row for MySQL.
@param[in] mysql_rec row in the MySQL format
@param[in,out] prebuilt prebuilt struct in MySQL handle
@return error code or DB_SUCCESS */
dberr_t
row_update_for_mysql(
const byte* mysql_rec,
row_prebuilt_t* prebuilt)
row_update_for_mysql(row_prebuilt_t* prebuilt)
MY_ATTRIBUTE((warn_unused_result));

/** This can only be used when srv_locks_unsafe_for_binlog is TRUE or this
Expand Down
23 changes: 3 additions & 20 deletions storage/innobase/row/row0mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1811,14 +1811,10 @@ class ib_dec_counter {


/** Does an update or delete of a row for MySQL.
@param[in] mysql_rec row in the MySQL format
@param[in,out] prebuilt prebuilt struct in MySQL handle
@return error code or DB_SUCCESS */
static
dberr_t
row_update_for_mysql_using_upd_graph(
const byte* mysql_rec,
row_prebuilt_t* prebuilt)
row_update_for_mysql(row_prebuilt_t* prebuilt)
{
trx_savept_t savept;
dberr_t err;
Expand All @@ -1834,13 +1830,13 @@ row_update_for_mysql_using_upd_graph(
upd_cascade_t* processed_cascades;
bool got_s_lock = false;

DBUG_ENTER("row_update_for_mysql_using_upd_graph");
DBUG_ENTER("row_update_for_mysql");

ut_ad(trx);
ut_a(prebuilt->magic_n == ROW_PREBUILT_ALLOCATED);
ut_a(prebuilt->magic_n2 == ROW_PREBUILT_ALLOCATED);
ut_a(prebuilt->template_type == ROW_MYSQL_WHOLE_ROW);
ut_ad(table->stat_initialized);
UT_NOT_USED(mysql_rec);

if (!table->is_readable()) {
return(row_mysql_get_table_status(table, trx, true));
Expand Down Expand Up @@ -2157,19 +2153,6 @@ row_update_for_mysql_using_upd_graph(
DBUG_RETURN(err);
}

/** Does an update or delete of a row for MySQL.
@param[in] mysql_rec row in the MySQL format
@param[in,out] prebuilt prebuilt struct in MySQL handle
@return error code or DB_SUCCESS */
dberr_t
row_update_for_mysql(
const byte* mysql_rec,
row_prebuilt_t* prebuilt)
{
ut_a(prebuilt->template_type == ROW_MYSQL_WHOLE_ROW);
return(row_update_for_mysql_using_upd_graph(mysql_rec, prebuilt));
}

/** This can only be used when srv_locks_unsafe_for_binlog is TRUE or this
session is using a READ COMMITTED or READ UNCOMMITTED isolation level.
Before calling this function row_search_for_mysql() must have
Expand Down

0 comments on commit ffa3789

Please sign in to comment.