Loading mysql-test/r/skip_grants.result +5 −0 Original line number Diff line number Diff line Loading @@ -70,3 +70,8 @@ count(*) select count(*) from information_schema.USER_PRIVILEGES; count(*) 0 CREATE FUNCTION a RETURNS STRING SONAME ''; ERROR HY000: Can't initialize function 'a'; UDFs are unavailable with the --skip-grant-tables option DROP FUNCTION a; ERROR 42000: FUNCTION test.a does not exist End of 5.0 tests mysql-test/t/skip_grants.test +12 −0 Original line number Diff line number Diff line Loading @@ -116,3 +116,15 @@ select count(*) from information_schema.COLUMN_PRIVILEGES; select count(*) from information_schema.SCHEMA_PRIVILEGES; select count(*) from information_schema.TABLE_PRIVILEGES; select count(*) from information_schema.USER_PRIVILEGES; # # Bug #32020: loading udfs while --skip-grant-tables is enabled causes out of # memory errors # --error ER_CANT_INITIALIZE_UDF CREATE FUNCTION a RETURNS STRING SONAME ''; --error ER_SP_DOES_NOT_EXIST DROP FUNCTION a; --echo End of 5.0 tests sql/sql_udf.cc +10 −2 Original line number Diff line number Diff line Loading @@ -410,6 +410,11 @@ int mysql_create_function(THD *thd,udf_func *udf) if (!initialized) { if (opt_noacl) my_error(ER_CANT_INITIALIZE_UDF, MYF(0), udf->name.str, "UDFs are unavailable with the --skip-grant-tables option"); else my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); DBUG_RETURN(1); } Loading Loading @@ -514,6 +519,9 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) DBUG_ENTER("mysql_drop_function"); if (!initialized) { if (opt_noacl) my_error(ER_FUNCTION_NOT_DEFINED, MYF(0), udf_name->str); else my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); DBUG_RETURN(1); } Loading Loading
mysql-test/r/skip_grants.result +5 −0 Original line number Diff line number Diff line Loading @@ -70,3 +70,8 @@ count(*) select count(*) from information_schema.USER_PRIVILEGES; count(*) 0 CREATE FUNCTION a RETURNS STRING SONAME ''; ERROR HY000: Can't initialize function 'a'; UDFs are unavailable with the --skip-grant-tables option DROP FUNCTION a; ERROR 42000: FUNCTION test.a does not exist End of 5.0 tests
mysql-test/t/skip_grants.test +12 −0 Original line number Diff line number Diff line Loading @@ -116,3 +116,15 @@ select count(*) from information_schema.COLUMN_PRIVILEGES; select count(*) from information_schema.SCHEMA_PRIVILEGES; select count(*) from information_schema.TABLE_PRIVILEGES; select count(*) from information_schema.USER_PRIVILEGES; # # Bug #32020: loading udfs while --skip-grant-tables is enabled causes out of # memory errors # --error ER_CANT_INITIALIZE_UDF CREATE FUNCTION a RETURNS STRING SONAME ''; --error ER_SP_DOES_NOT_EXIST DROP FUNCTION a; --echo End of 5.0 tests
sql/sql_udf.cc +10 −2 Original line number Diff line number Diff line Loading @@ -410,6 +410,11 @@ int mysql_create_function(THD *thd,udf_func *udf) if (!initialized) { if (opt_noacl) my_error(ER_CANT_INITIALIZE_UDF, MYF(0), udf->name.str, "UDFs are unavailable with the --skip-grant-tables option"); else my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); DBUG_RETURN(1); } Loading Loading @@ -514,6 +519,9 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) DBUG_ENTER("mysql_drop_function"); if (!initialized) { if (opt_noacl) my_error(ER_FUNCTION_NOT_DEFINED, MYF(0), udf_name->str); else my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); DBUG_RETURN(1); } Loading