trx0trx.h, trx0trx.c, ha_innodb.cc:

  Remove code never actually used in IGNORE; InnoDB just rolls back the latest row insert or update on a duplicate key error and leaves it for MySQL to decide whether to ignore the error
parent 5e8f76c4
...@@ -418,10 +418,6 @@ struct trx_struct{ ...@@ -418,10 +418,6 @@ struct trx_struct{
lock_t* auto_inc_lock; /* possible auto-inc lock reserved by lock_t* auto_inc_lock; /* possible auto-inc lock reserved by
the transaction; note that it is also the transaction; note that it is also
in the lock list trx_locks */ in the lock list trx_locks */
ibool ignore_duplicates_in_insert;
/* in an insert roll back only insert
of the latest row in case
of a duplicate key error */
UT_LIST_NODE_T(trx_t) UT_LIST_NODE_T(trx_t)
trx_list; /* list of transactions */ trx_list; /* list of transactions */
UT_LIST_NODE_T(trx_t) UT_LIST_NODE_T(trx_t)
......
...@@ -102,8 +102,6 @@ trx_create( ...@@ -102,8 +102,6 @@ trx_create(
trx->mysql_master_log_file_name = (char*) ""; trx->mysql_master_log_file_name = (char*) "";
trx->mysql_master_log_pos = 0; trx->mysql_master_log_pos = 0;
trx->ignore_duplicates_in_insert = FALSE;
mutex_create(&(trx->undo_mutex)); mutex_create(&(trx->undo_mutex));
mutex_set_level(&(trx->undo_mutex), SYNC_TRX_UNDO); mutex_set_level(&(trx->undo_mutex), SYNC_TRX_UNDO);
......
...@@ -1911,13 +1911,6 @@ ha_innobase::write_row( ...@@ -1911,13 +1911,6 @@ ha_innobase::write_row(
build_template(prebuilt, NULL, table, ROW_MYSQL_WHOLE_ROW); build_template(prebuilt, NULL, table, ROW_MYSQL_WHOLE_ROW);
} }
if (user_thd->lex.sql_command == SQLCOM_INSERT
&& user_thd->lex.duplicates == DUP_IGNORE) {
prebuilt->trx->ignore_duplicates_in_insert = TRUE;
} else {
prebuilt->trx->ignore_duplicates_in_insert = FALSE;
}
srv_conc_enter_innodb(prebuilt->trx); srv_conc_enter_innodb(prebuilt->trx);
error = row_insert_for_mysql((byte*) record, prebuilt); error = row_insert_for_mysql((byte*) record, prebuilt);
...@@ -1958,8 +1951,6 @@ ha_innobase::write_row( ...@@ -1958,8 +1951,6 @@ ha_innobase::write_row(
} }
} }
prebuilt->trx->ignore_duplicates_in_insert = FALSE;
error = convert_error_code_to_mysql(error, user_thd); error = convert_error_code_to_mysql(error, user_thd);
/* Tell InnoDB server that there might be work for /* Tell InnoDB server that there might be work for
......
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