[Err] 1318 - Incorrect number of arguments for FUNCTION XXX.xxx; expected 0, got 1
Cause of error
An error is reported when calling a MySQL custom function. The reason is that an unknown variable is used in the custom function in the database, but it is not defined, so an error will be reported during execution.
Solution
Set variable parameters for the custom function, as shown in the figure below: