Mysql Error 1307 Hy000
Updates: Status: Not a Bug Impact on me: None Category:MySQL Server: Stored Routines Severity:S1 (Critical) Version:6.0.3-alpha OS:Linux Assigned to: Tags: 1307 falied procedure View Add Comment Files Developer Edit Submission View Progress Log Contributions [13 Dec 2007 16:07] jey Razack Description: mysql> DELIMITER // mysql> create procedure Test() -> begin -> declare a INT; -> set a = 1; -> select a; -> end -> // ERROR 1307 (HY000): Failed to CREATE PROCEDURE Test How to repeat: DELIMITER // create procedure Test() begin declare a INT; set a = 1; select a; end // DELIMITER ; [13 Dec 2007 17:10] Kevin Lewis Works for me in mysql-6.0-falcon. This has nothing to do with Falcon, so I am changing the category. [13 Dec 2007 18:17] Hakan Küçükyılmaz Jey, thanks for your bug report. But you are missing a semicolon. Please check the documentation. mysql> create procedure Test() -> begin -> declare a INT; -> set a = 1; -> select a; -> end; -> // Query OK, 0 rows affected (0.35 sec) mysql> call Test()// +------+ | a | +------+ | 1 | +------+ 1 row in set (0.00 sec) Query OK, 0 rows affected (0.00 sec) Best regards, Hakan [13 Dec 2007 18:26] jey Razack Hakan, please try in 6.0.3-alpha .. mysql> DELIMITER // mysql> create procedure Test() -> begin -> declare a INT; -> set a = 1; -> select a; -> end; -> // ERROR 1307 (HY000): Failed to CREATE PROCEDURE Test mysql> DELIMITER ; [13 Dec 2007 21:20] Peter Laursen @jey This DELIMITER // create procedure Test() begin declare a INT; set a = 1; select a; end; // works for me with 6.0.4 'falcon preview' build. BTW: unless you change the status from 'not a bug' to 'open' I do not think you should expect any feedback (I am not a mysql person)! [13 Dec 2007 21:23] Peter Laursen btw ... this "DELIMITER //" has one additional space, try "DELIMITER //" .. because if you don't DELIMITER is (probably) " //" and not "//" .... [13 Dec 2007 21:27] jey Razack Thanks Peter, I will try to install 6.0.4 (preview). Regards..Jey [4 Nov 2008 7:48] Jose Fradejas DELIMITER // CREATE PROCEDURE p22 (parameter1 INT) BEGIN DECLARE EXIT HANDLER FOR 1452 INSERT INTO error_log VALUES (CONCAT ('Time: ',current_date,'. Foreign Key Reference Failure For Value = ',parameter1)); I
diagnostic query first: SELECT IF( COUNT(*) XOR (CAST(VERSION() AS decimal(2, 1)) >= 5.1), 'Wrong mysql.proc table version. Did you forget to run mysql_upgrade?', 'The mysql.proc table looks ok. Keep hunting.' ) AS troubleshooting FROM information_schema.columns WHERE table_schema = 'mysql' AND table_name = 'proc' AND column_name LIKE 'body_utf8'; Share this:TweetMoreShare on TumblrPocket Filed under: MySQL FAQ Leave a comment Comments (5) Trackbacks (0) ( subscribe to comments on this post ) PatrickDecember 21st, 2009 - 22:47 Do you have any other http://bugs.mysql.com/33219 information? I am experiencing this same behavior on mysql 5.0.45. when I run mysql_upgrade, I get no change in behavior. snoyesDecember 22nd, 2009 - 21:34 Find somebody who can create procedures with the same version as you, and check that the output from SHOW CREATE TABLE mysql.proc; is the same on both. Perhaps you've somehow run the 5.1 version http://thenoyes.com/littlenoise/?p=80 of mysql_upgrade. DarrylJanuary 22nd, 2010 - 09:06 I had this problem. I'm on Windows, so adjust for *nix OS. I went to MySQL bin folder, and ran: mysql_upgrade -u root -p Entered the password and the upgrade script ran and fixed the problem. HTH, Darryl BobSeptember 17th, 2010 - 03:40 Upgraded from previous version to 5.1.x Adding a sinple procedure failed with error 1307 running /usr/bin/upgrade_mysql -uroot solved the problem Thanks Steve MorganMay 28th, 2011 - 05:10 If you get an error running this ensure you start CMD as root. Leave a comment Cancel reply Name (required) Email (required) Website Notify me of follow-up comments by email. Notify me of new posts by email. No trackbacks yet. errno: 121 (Duplicate key) with CREATE TABLE » « Location, location, location Archives Archives Select Month September 2016 June 2016 November 2015 October 2015 August 2015 April 2015 March 2015 November 2014 October 2014 April 2014 September 2013 July 2013 April 2013 February 2013 October 2012 September 2012 December 2011 November 2011 October 2011 March 2011
MySQL 5.1 when the database files were created on mysql error a previous version of MySQL. To resolve it, run "mysql_upgrade" as Administrator/root. Previous post: "The application cannot start" running Visual Studio as mysql error 1307 Administrator Next post: Weekly review: Week ending Nov 29, 2009 Search this site Recent articles Page constantly reloads after logging in to Outlook on the web Using the GPG renderer to protect Salt pillar items Updating to latest "pass" on Ubuntu 14.04 Create a FreeBSD GCE instance with salt-cloud Shutdown HTPC from Vera controller Get smart with the Thesis WordPress Theme from DIYthemes.
procedure, I got the above error message. The user had the needed create routine privileges and the procedure syntax was corrected. Used the following command to check the version and found out that it was v.5.1.30. mysql> select version(); +----------------------+ | version() | +----------------------+ | 5.1.30-community-log | +----------------------+ 1 row in set (0.00 sec) After some researches, it turned out that the database was a copy from an earlier version. So to resolve the problem, I need to apply the mysql_upgrade script. For Redhat Linux installation, it was located in /usr/bin. But it is easy to find out where it is by using the Linux ‘which' command: #> which mysql_upgrade /usr/bin/mysql_upgrade To excute the script, from the command line run the script using mysql root user and password: #>/usr./bin/mysql_upgrade -u root -p Now it should be fine. The script also printed out messages on the screen on what got updated during the execution. References: MySQL Manual: Upgrading from MySQL 5.0 to 5.1 Other References On The Web Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Reactions: Posted by Data Bob Jr at 12:28 AM Labels: MySQL, MySQL DBA No comments: Post a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) Search This Blog Loading... Search Books and More Amazon.com Widgets Categories Ascential DataStage:Admin (9) Ascential DataStage:Design (4) Big Data (1) Book (1) Cognos (2) Cognos Framework Manager (1) Cognos Report Studio (1) Daddy Bob (1) Data and Information (5) Data Funny (15) Data Funny.Big Data (1) Data Modeling (3) Data Warehouse (7) DtataStage (3) IIS (3) Informatica: Admin (1) Intelligent (2) Kid Recipes (2) KIDS (3) Learn Piano (1) Life (15) Linux For DBA (13) Music (4) Music of the Night (4) MySQL (30) MySQL Data Warehouse (8) MySQL DBA (27) MySQL Performance Tuning (15) MySQL Performance Tuning: System Variables (9) MySQL Replication (5) Oracle (11) Oracle Data Warehouse (5) Oracle DBA (9) Perl (1) Perl:Regular Expressions (1) Pictures (5) Recipes (2) SQL (4) Suppercomputer (1) Toys (1) Video (23) Search The Web Links Ask Tom IBM WebSphere DataStage Forum Planet MySQL Subscribe Posts Atom Posts Comments Atom Comments Labels Ascential DataStage:Admin (9) Ascential DataStage:Design (4) Big Data (1) Book (1) Cognos (2) Cognos Framework Manager (1) Cognos Report Studio (1) Daddy Bob (1) Data and Information (5) Data Funny (15) Data Funny.Big Data (1) Data Modeling (3) Data Warehouse (7) DtataStage (3) IIS (3) Informatica: Admin (1) Intelligent (2) Kid Recipes (2) KIDS (3) Lear