Loading sql/opt_range.cc +5 −0 Original line number Diff line number Diff line Loading @@ -778,6 +778,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT() DBUG_PRINT("info", ("Freeing separate handler %p (free=%d)", file, free_file)); file->reset(); file->external_lock(current_thd, F_UNLCK); file->close(); } } Loading Loading @@ -929,6 +930,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler) DBUG_RETURN(0); } THD *thd= current_thd; if (!(file= get_new_handler(head, head->s->db_type))) goto failure; DBUG_PRINT("info", ("Allocated new handler %p", file)); Loading @@ -937,11 +939,14 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler) /* Caller will free the memory */ goto failure; } if (file->external_lock(thd, F_RDLCK)) goto failure; if (file->extra(HA_EXTRA_KEYREAD) || file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) || init() || reset()) { file->external_lock(thd, F_UNLCK); file->close(); goto failure; } Loading Loading
sql/opt_range.cc +5 −0 Original line number Diff line number Diff line Loading @@ -778,6 +778,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT() DBUG_PRINT("info", ("Freeing separate handler %p (free=%d)", file, free_file)); file->reset(); file->external_lock(current_thd, F_UNLCK); file->close(); } } Loading Loading @@ -929,6 +930,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler) DBUG_RETURN(0); } THD *thd= current_thd; if (!(file= get_new_handler(head, head->s->db_type))) goto failure; DBUG_PRINT("info", ("Allocated new handler %p", file)); Loading @@ -937,11 +939,14 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler) /* Caller will free the memory */ goto failure; } if (file->external_lock(thd, F_RDLCK)) goto failure; if (file->extra(HA_EXTRA_KEYREAD) || file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) || init() || reset()) { file->external_lock(thd, F_UNLCK); file->close(); goto failure; } Loading