• unknown's avatar
    Fixed BUG#16896: Stored function: unused AGGREGATE-clause in CREATE FUNCTION · 0fd78492
    unknown authored
      Check if AGGREGATE was given with a stored (non-UDF) function, and return
      error in that case.
      Also made udf_example/udf_test work again, by adding a missing *_init()
      function. (_init() functions required unless --allow_suspicious_udfs is
      given to the server, since March 2005 - it seems udf_example wasn't updated
      at the time.)
    
    
    mysql-test/r/sp-error.result:
      Updated results for BUG#16896.
    mysql-test/t/sp-error.test:
      Added test case for BUG#16896.
    sql/share/errmsg.txt:
      New error message: ER_SP_NO_AGGREGATE
    sql/sql_yacc.yy:
      Check if AGGREGATE was used when creating a stored function (i.e. not an UDF).
    sql/udf_example.cc:
      Added myfunc_int_init() function to make it work when the server is running without
      --allow_suspicious_udfs.
    0fd78492
sp-error.result 36.5 KB