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

Bug#33637 SHOW PROCEDURE CODE/SHOW FUNCTION CODE sp_name gives a syntax error.

Backport for 5.5

In non debug builds, the statements:
- SHOW PROCEDURE CODE
- SHOW FUNCTION CODE
used to fail with a "syntax error", which is misleading.

These statements have been changed to return the following error for non
debug builds:
ERROR HY000: The 'SHOW PROCEDURE|FUNCTION CODE' feature is disabled; you
need MySQL built with '--with-debug' to have it working

For debug builds (./configure --with-debug), nothing is changed.
This commit is contained in:
Marc Alff
2009-10-29 10:51:04 -06:00
parent afc87e52ac
commit 63e732fe61
6 changed files with 28 additions and 12 deletions

View File

@@ -4658,10 +4658,10 @@ create_sp_error:
}
break;
}
#ifndef DBUG_OFF
case SQLCOM_SHOW_PROC_CODE:
case SQLCOM_SHOW_FUNC_CODE:
{
#ifndef DBUG_OFF
sp_head *sp;
if (lex->sql_command == SQLCOM_SHOW_PROC_CODE)
@@ -4678,8 +4678,12 @@ create_sp_error:
goto error;
}
break;
}
#else
my_error(ER_FEATURE_DISABLED, MYF(0),
"SHOW PROCEDURE|FUNCTION CODE", "--with-debug");
goto error;
#endif // ifndef DBUG_OFF
}
case SQLCOM_SHOW_CREATE_TRIGGER:
{
if (lex->spname->m_name.length > NAME_LEN)