From 0299ec29d4af3230741a62d5443c0562269b05b2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 17 Jul 2021 08:57:29 +0200 Subject: cleanup: MY_BITMAP mutex in about a hundred of users of MY_BITMAP, only two were using its built-in mutex, and only one of those two was actually needing it. Remove the mutex from MY_BITMAP, remove all associated conditions and checks in bitmap functions. Use an external LOCK_temp_pool mutex and temp_pool_set_next/temp_pool_clear_bit acccessors. Remove bitmap_init/bitmap_free, always use my_* versions. --- sql/log_event_old.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sql/log_event_old.cc') diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 4e6b9e3f1c8..1990103598e 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -1156,8 +1156,7 @@ Old_rows_log_event::Old_rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid, /* if my_bitmap_init fails, caught in is_valid() */ if (likely(!my_bitmap_init(&m_cols, m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL, - m_width, - false))) + m_width))) { /* Cols can be zero if this is a dummy binrows event */ if (likely(cols != NULL)) @@ -1232,8 +1231,7 @@ Old_rows_log_event::Old_rows_log_event(const uchar *buf, uint event_len, /* if my_bitmap_init fails, caught in is_valid() */ if (likely(!my_bitmap_init(&m_cols, m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL, - m_width, - false))) + m_width))) { DBUG_PRINT("debug", ("Reading from %p", ptr_after_width)); memcpy(m_cols.bitmap, ptr_after_width, (m_width + 7) / 8); -- cgit v1.2.1