Hi, Sergey! On May 13, Sergey Vojtovich wrote: > > > > But if you'll require thd_killed() always to take THD as an argument, > > then other plugins (that work strictly within plugin api limits) > > won't be able to check killed flag in places where THD isn't available. > > May be it's not a problem, though, I don't know. > I can suggest 3 alternatives: > - add thd_killed_current() (now or on demand?) > - add current_thd() to API (now or on demand?) > - keep if (!thd), even though it makes mostly useless branch per row > > Which one do you like most?
"on demand" one. Let's go with your patch. But add a comment (near DBUG_ASSERT(thd) or in the function comment) that if we'll get a use case where a plugin needs to call thd_killed and where it has no thd available, we can either add thd_killed_current() or current_thd() or do if (!thd). Regards, Sergei _______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp

