diff options
author | Marc Alff <marc.alff@sun.com> | 2009-10-29 10:51:04 -0600 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2009-10-29 10:51:04 -0600 |
commit | 63e732fe6140f1ca9dbfacb18bff5119c3c67647 (patch) | |
tree | 2dcacd76b2ac37ed934e4aecb67f7a107ff04f48 /mysql-test | |
parent | afc87e52ac154db1ae97dc917c3e80e2872b868b (diff) | |
download | mariadb-git-63e732fe6140f1ca9dbfacb18bff5119c3c67647.tar.gz |
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.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/include/have_nodebug.inc | 4 | ||||
-rw-r--r-- | mysql-test/r/have_nodebug.require | 2 | ||||
-rw-r--r-- | mysql-test/r/sp-no-code.result | 4 | ||||
-rw-r--r-- | mysql-test/t/sp-no-code.test | 12 |
4 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/include/have_nodebug.inc b/mysql-test/include/have_nodebug.inc new file mode 100644 index 00000000000..3a5b073cd2e --- /dev/null +++ b/mysql-test/include/have_nodebug.inc @@ -0,0 +1,4 @@ +-- require r/have_nodebug.require +disable_query_log; +select (version() like '%debug%') as debug; +enable_query_log; diff --git a/mysql-test/r/have_nodebug.require b/mysql-test/r/have_nodebug.require new file mode 100644 index 00000000000..ff251521aa8 --- /dev/null +++ b/mysql-test/r/have_nodebug.require @@ -0,0 +1,2 @@ +debug +0 diff --git a/mysql-test/r/sp-no-code.result b/mysql-test/r/sp-no-code.result new file mode 100644 index 00000000000..77d2c93eaf6 --- /dev/null +++ b/mysql-test/r/sp-no-code.result @@ -0,0 +1,4 @@ +show procedure code foo; +ERROR HY000: The 'SHOW PROCEDURE|FUNCTION CODE' feature is disabled; you need MySQL built with '--with-debug' to have it working +show function code foo; +ERROR HY000: The 'SHOW PROCEDURE|FUNCTION CODE' feature is disabled; you need MySQL built with '--with-debug' to have it working diff --git a/mysql-test/t/sp-no-code.test b/mysql-test/t/sp-no-code.test new file mode 100644 index 00000000000..ce16c32a270 --- /dev/null +++ b/mysql-test/t/sp-no-code.test @@ -0,0 +1,12 @@ +# +# Test the debugging feature "show procedure/function code <name>" +# + +-- source include/have_nodebug.inc + +--error ER_FEATURE_DISABLED +show procedure code foo; + +--error ER_FEATURE_DISABLED +show function code foo; + |