diff options
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index fe68d8f47c2..ff6a102fe1f 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1453,11 +1453,13 @@ longlong Item_master_pos_wait::val_int() return 0; } ulong pos = (ulong)args[1]->val_int(); - if ((event_count = glob_mi.wait_for_pos(thd, log_name, pos)) == -1) + LOCK_ACTIVE_MI; + if ((event_count = active_mi->rli.wait_for_pos(thd, log_name, pos)) == -1) { null_value = 1; event_count=0; } + UNLOCK_ACTIVE_MI; return event_count; } |