Mysql Error Code 1289
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
Mysql View Stored Procedure Code
policies of this site About Us Learn more about Stack Overflow the company procedure in mysql Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MySql - Enable stored procedure feature access using --with-debug in Windows up vote 1 down vote favorite I'm using MySql commandline 5.6.11 and when I try to see my stored procedure in the command line like SHOW PROCEDURE CODE sp_my_procedure I'm getting: ERROR 1289 (HY000): The 'SHOW PROCEDURE|FUNCTION CODE' feature is disabled; you need MySQL built with '--with-debug' to have it working How do I use the command to run mysql with "--with-debug" in Windows (I saw the documentation but it talks about how to do that in Linux)? mysql share|improve this question asked Apr 16 '14 at 8:01 biniam_Ethiopia 3,31711628 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote You need to compile your mysql binary by yourself, see http://dev.mysql.com/doc/refman/5.6/en/source-installation.html, because of SHOW PROCEDURE CODE proc_name This statement is a MySQL extension that is available only for servers that have been built with debugging support. But maybe SHOW CREATE PROCEDURE gives you what you want. share|improve this answer answered Apr 16 '14 at 9:05 VMai 7,95661127 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged mysql or a
Eeden (OCA) Email Updates: Status: Not a Bug Impact on me: None Category:MySQL Server: Stored Routines Severity:S3 (Non-critical) Version:5.1.47 OS:Any Assigned to: Tags: SP View Add Comment Files Developer Edit Submission View Progress Log Contributions [26 Apr 2011 14:54] Daniël van Eeden Description: The example on this page does not work. http://dev.mysql.com/doc/refman/5.1/en/show-procedure-code.html mysql> DELIMITER // mysql> CREATE PROCEDURE p1 () -> BEGIN -> DECLARE fanta INT DEFAULT 55; -> DROP TABLE t2; -> LOOP -> INSERT INTO t3 VALUES (fanta); -> END LOOP; -> END// Query OK, 0 http://stackoverflow.com/questions/23103412/mysql-enable-stored-procedure-feature-access-using-with-debug-in-windows rows affected (0.00 sec) mysql> SHOW PROCEDURE CODE p1// ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 mysql> SELECT VERSION()// +-----------+ | VERSION() | +-----------+ | 5.1.47 | +-----------+ 1 row in set (0.00 sec) How to repeat: https://bugs.mysql.com/bug.php?id=60980 Try example Suggested fix: Fix SHOW PROCEDURE CODE. (Or fix documentation if that's not possible). [26 Apr 2011 15:15] Miguel Solorzano It works with debug built. Maybe a documentation or server error messages bu?. C:\DBS>c:\dbs\5.1\bin\mysql -uroot --port=3306 --prompt="mysql 5.1 >" Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.1.57-Win X64-debug-log Source distribution Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.1 >use test Database changed mysql 5.1 >SHOW PROCEDURE CODE p1; +-----+----------------------------------------+ | Pos | Instruction | +-----+----------------------------------------+ | 0 | set fanta@0 55 | | 1 | stmt 9 "DROP TABLE t2" | | 2 | stmt 5 "INSERT INTO t3 VALUES (fanta)" | | 3 | jump 2 | +-----+----------------------------------------+ 4 rows in set (0.00 sec) mysql 5.1 > [26 Apr 2011 15:16] Miguel Solorzano Behavior on 5.5: C:\DBS>c:\dbs\5.5\b
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us http://dba.stackexchange.com/questions/22817/show-procedure-code-in-mysql Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: mysql error Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Show procedure code in MySQL up vote 5 down vote favorite 1 I've tried to show the SQL code of a stored procedure called add_pixel: mysql> SHOW PROCEDURE CODE add_pixel; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server mysql error code version for the right syntax to use near '' at line 1 I've made sure that the procedure exists: mysql> CALL add_pixel(); ERROR 1318 (42000): Incorrect number of arguments for PROCEDURE pixels.add_pixel; expected 3, got 0 And SHOW CREATE PROCEDURE works: mysql> SHOW CREATE PROCEDURE add_pixel; +-----------+----------+------------------+----------------------+----------------------+--------------------+ | Procedure | sql_mode | Create Procedure | character_set_client | collation_connection | Database Collation | +-----------+----------+------------------+----------------------+----------------------+--------------------+ | add_pixel | | NULL | utf8 | utf8_general_ci | utf8_unicode_ci | +-----------+----------+------------------+----------------------+----------------------+--------------------+ 1 row in set (0.00 sec) and that my MySQL version supports `SHOW PROCEDURE (SHOW PROCEDURE CODE was added in MySQL 5.0.17). How do I view the source SQL code of the procedure? mysql sql stored-procedures source-code share|improve this question edited Aug 21 '12 at 9:39 asked Aug 21 '12 at 9:24 Adam Matan 2,460104271 Try SHOW CREATE PROCEDURE –ypercubeᵀᴹ Aug 21 '12 at 9:36 1 As your link explains about the SHOW PROCEDURE CODE: "This statement is a MySQL extension that is available only for servers that have been built with debugging support." –ypercubeᵀᴹ Aug 21 '12 at 9:37 @ypercube SHOW CREATE works. I think you might be right about the debugging support. Care to post it as an answer? &