| 883 | typedef bool (tp_foreach_func)(THD *thd, transaction_participant *tp, void *arg); |
| 884 | |
| 885 | static bool tp_foreach(THD *thd, tp_foreach_func *func, void *arg) |
| 886 | { |
| 887 | int j=0, err= 0; |
| 888 | plugin_ref locks[MAX_HA]; |
| 889 | for (uint i= 0; i < MAX_HA; i++) |
| 890 | { |
| 891 | if (st_plugin_int *pi= hton2plugin[i]) |
| 892 | { |
| 893 | locks[j]= plugin_lock(NULL, plugin_int_to_ref(pi)); |
| 894 | if ((err= func(thd, plugin_hton(locks[j++]), arg))) |
| 895 | break; |
| 896 | } |
| 897 | } |
| 898 | plugin_unlock_list(NULL, locks, j); |
| 899 | return err; |
| 900 | } |
| 901 | |
| 902 | |
| 903 | static my_bool dropdb_handlerton(THD *, plugin_ref plugin, void *path) |
no test coverage detected