1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bugfixes in SHOW CREATE PROCEDURE/FUNCTION and SHOW PROCEDURE/FUNCTION STATUS;

- dropped routines should not show up in status
- error handling for non-existing routines

+ some cleanup.
This commit is contained in:
pem@mysql.comhem.se
2003-11-20 15:07:22 +01:00
parent 5b355ea6f5
commit 96f1252899
7 changed files with 80 additions and 49 deletions

View File

@@ -3592,10 +3592,11 @@ mysql_execute_command(THD *thd)
goto error;
}
res= sp_show_create_procedure(thd, &lex->udf.name);
if (res == SP_KEY_NOT_FOUND)
{
net_printf(thd, ER_SP_DOES_NOT_EXIST,
if (res != SP_OK)
{ /* We don't distinguish between errors for now */
net_printf(thd, ER_SP_DOES_NOT_EXIST,
SP_COM_STRING(lex), lex->udf.name.str);
res= 0;
goto error;
}
break;
@@ -3608,23 +3609,24 @@ mysql_execute_command(THD *thd)
goto error;
}
res= sp_show_create_function(thd, &lex->udf.name);
if (res == SP_KEY_NOT_FOUND)
{
if (res != SP_OK)
{ /* We don't distinguish between errors for now */
net_printf(thd, ER_SP_DOES_NOT_EXIST,
SP_COM_STRING(lex), lex->udf.name.str);
res= 0;
goto error;
}
break;
}
case SQLCOM_SHOW_STATUS_PROC:
{
res= db_show_status_procedure(thd, (lex->wild ?
res= sp_show_status_procedure(thd, (lex->wild ?
lex->wild->ptr() : NullS));
break;
}
case SQLCOM_SHOW_STATUS_FUNC:
{
res= db_show_status_function(thd, (lex->wild ?
res= sp_show_status_function(thd, (lex->wild ?
lex->wild->ptr() : NullS));
break;
}