Commit 77b9b28a authored by Kristian Nielsen's avatar Kristian Nielsen

MDEV-24622: Replication does not support bulk insert into empty table

Remove work-around that disables bulk insert optimization in replication

The root cause of the original problem is now fixed (MDEV-33475). Though the
bulk insert optimization will still be disabled in replication, as it is
only enabled in special circumstances meant for loading a mysqldump.
Signed-off-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
parent 1fb00f37
......@@ -5317,14 +5317,6 @@ extern "C" enum enum_server_command thd_current_command(MYSQL_THD thd)
return thd->get_command();
}
#ifdef HAVE_REPLICATION /* Working around MDEV-24622 */
/** @return whether the current thread is for applying binlog in a replica */
extern "C" int thd_is_slave(const MYSQL_THD thd)
{
return thd && thd->slave_thread;
}
#endif /* HAVE_REPLICATION */
/* Returns high resolution timestamp for the start
of the current query. */
extern "C" unsigned long long thd_start_utime(const MYSQL_THD thd)
......
......@@ -2565,12 +2565,6 @@ row_ins_index_entry_big_rec(
return(error);
}
#ifdef HAVE_REPLICATION /* Working around MDEV-24622 */
extern "C" int thd_is_slave(const MYSQL_THD thd);
#else
# define thd_is_slave(thd) 0
#endif
#if defined __aarch64__&&defined __GNUC__&&__GNUC__==4&&!defined __clang__
/* Avoid GCC 4.8.5 internal compiler error due to srw_mutex::wr_unlock().
We would only need this for row_ins_clust_index_entry_low(),
......@@ -2722,8 +2716,7 @@ row_ins_clust_index_entry_low(
&& !index->table->skip_alter_undo
&& !index->table->n_rec_locks
&& !index->table->is_active_ddl()
&& !index->table->versioned()
&& !thd_is_slave(trx->mysql_thd) /* FIXME: MDEV-24622 */) {
&& !index->table->versioned()) {
DEBUG_SYNC_C("empty_root_page_insert");
if (!index->table->is_temporary()) {
......
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