@@ -1263,23 +1263,16 @@ static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check)
1263
1263
remove_status_vars (show_vars);
1264
1264
}
1265
1265
1266
- if (plugin_type_deinitialize[plugin->plugin ->type ])
1267
- {
1268
- if ((*plugin_type_deinitialize[plugin->plugin ->type ])(plugin))
1269
- {
1270
- sql_print_error (" Plugin '%s' of type %s failed deinitialization" ,
1271
- plugin->name .str , plugin_type_names[plugin->plugin ->type ].str );
1272
- }
1273
- }
1274
- else if (plugin->plugin ->deinit )
1266
+ plugin_type_init deinit= plugin_type_deinitialize[plugin->plugin ->type ];
1267
+ if (!deinit)
1268
+ deinit= (plugin_type_init)(plugin->plugin ->deinit );
1269
+
1270
+ if (deinit && deinit (plugin))
1275
1271
{
1276
- DBUG_PRINT (" info" , (" Deinitializing plugin: '%s'" , plugin->name .str ));
1277
- if (plugin->plugin ->deinit (plugin))
1278
- {
1279
- DBUG_PRINT (" warning" , (" Plugin '%s' deinit function returned error." ,
1280
- plugin->name .str ));
1281
- }
1272
+ sql_print_error (" Plugin '%s' of type %s failed deinitialization" ,
1273
+ plugin->name .str , plugin_type_names[plugin->plugin ->type ].str );
1282
1274
}
1275
+
1283
1276
plugin->state = PLUGIN_IS_UNINITIALIZED;
1284
1277
1285
1278
if (ref_check && plugin->ref_count )
@@ -1341,7 +1334,7 @@ static void reap_plugins(void)
1341
1334
1342
1335
list= reap;
1343
1336
while ((plugin= *(--list)))
1344
- plugin_deinitialize (plugin, true );
1337
+ plugin_deinitialize (plugin, true );
1345
1338
1346
1339
mysql_mutex_lock (&LOCK_plugin);
1347
1340
@@ -2354,7 +2347,7 @@ static bool do_uninstall(THD *thd, TABLE *table, const LEX_CSTRING *name)
2354
2347
of the delete from the plugin table, so that it is not replicated in
2355
2348
row based mode.
2356
2349
*/
2357
- table->file ->row_logging = 0 ; // No logging
2350
+ table->file ->row_logging = 0 ; // No logging
2358
2351
error= table->file ->ha_delete_row (table->record [0 ]);
2359
2352
if (unlikely (error))
2360
2353
{
@@ -4409,7 +4402,7 @@ int thd_setspecific(MYSQL_THD thd, MYSQL_THD_KEY_T key, void *value)
4409
4402
DBUG_ASSERT (key != INVALID_THD_KEY);
4410
4403
if (key == INVALID_THD_KEY || (!thd && !(thd= current_thd)))
4411
4404
return EINVAL;
4412
-
4405
+
4413
4406
memcpy (intern_sys_var_ptr (thd, key, true ), &value, sizeof (void *));
4414
4407
return 0 ;
4415
4408
}
0 commit comments