Component, Plugin, and Loadable Function Statements different from the user ID of the  mysqld  process,  REPAIR TABLE  generates a "cannot change ownership of the file" error unless  mysqld  is started by the  root  user. REPAIR TABLE  upgrades a table if it contains old temporal columns in pre-5.6.4 format ( TIME , DATETIME , and  TIMESTAMP  columns without support for fractional seconds precision) and the avoid_temporal_upgrade  system variable is disabled. If  avoid_temporal_upgrade  is enabled, REPAIR TABLE  ignores the old temporal columns present in the table and does not upgrade them. To upgrade tables that contain such temporal columns, disable  avoid_temporal_upgrade  before executing  REPAIR TABLE . You may be able to increase  REPAIR TABLE  performance by setting certain system variables. See Section 8.6.3, “Optimizing REPAIR TABLE Statements” . This statement loads the loadable function named  function_name . ( CREATE FUNCTION  is also used to created stored functions; see Section 13.1.17, “CREATE PROCEDURE and CREATE FUNCTION Statements” .) A loadable function is a way to extend MySQL with a new function that works like a native (built-in) MySQL function such as  ABS()  or  CONCAT() . See Adding a Loadable Function. function_name  is the name that should be used in SQL statements to invoke the function. The  RETURNS clause indicates the type of the function’s return value.  DECIMAL  is a legal value after  RETURNS , but currently  DECIMAL  functions return string values and should be written like  STRING  functions. The  AGGREGATE  keyword, if given, signifies that the function is an aggregate (group) function. An aggregate function works exactly like a native MySQL aggregate function such as  SUM()  or  COUNT() . shared_library_name  is the base name of the shared library file containing the code that implements the function. The file must be located in the plugin directory. This directory is given by the value of the plugin_dir  system variable. For more information, see Section 5.7.1, “Installing and Uninstalling Loadable Functions” . CREATE FUNCTION  requires the  INSERT  privilege for the  mysql  system schema because it adds a row to the  mysql.func  system table to register the function. CREATE FUNCTION  also adds the function to the Performance Schema  user_defined_functions table that provides runtime information about installed loadable functions. See Section 27.12.21.8, “The user_defined_functions Table” . Like the  mysql.func  system table, the Performance Schema user_defined_functions  table lists loadable functions installed using  CREATE FUNCTION . Unlike the  mysql.func  table, the  user_defined_functions Note 2900 13.7.4.1 CREATE FUNCTION Statement for Loadable Functions 13.7.4 Component, Plugin, and Loadable Function Statements CREATE [AGGREGATE] FUNCTION  function_name RETURNS {STRING|INTEGER|REAL|DECIMAL} SONAME  shared_library_name Table Repair Considerations