Error 1607 Cannot Create Stored Routine
Reporter: Mark Leith Email Updates: Status: Closed Impact on me: None Category:MySQL Server: Stored Routines Severity:S3 (Non-critical) Version:5.1.23 OS:Any Assigned to: Jon Hauglid Tags: comments, stored procedure Triage: Triaged: D4 (Minor) View Add Comment Files Developer Edit Submission View Progress Log Contributions [31 Jan 2008 13:49] Mark Leith Description: Having a COMMENT within SPs of greater than 64 characters long now causes the CREATE PROCEDURE statement to fail, even when in a non-strict SQL mode: mysql> CREATE PROCEDURE p1 () -> COMMENT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' -> BEGIN -> END; ERROR 1607 (HY000): Cannot create stored routine `p1`. Check warnings mysql> SHOW WARNINGS; +---------+------+---------------------------------------------------+ | Level | Code | Message | +---------+------+---------------------------------------------------+ | Warning | 1265 | Data truncated for column 'comment' at row 1 | | Error | 1607 | Cannot create stored routine `p1`. Check warnings | +---------+------+---------------------------------------------------+ 2 rows in set (0.00 sec) mysql> SELECT @@sql_mode; +------------+ | @@sql_mode | +------------+ | | +------------+ 1 row in set (0.00 sec) This is a regression, and was introduced within ChangeSet 1.2476.480.11 2007/10/17 12:13:56 anozdrin@: Fix for BUG#24923: Functions with ENUM issues. The problem was that the RETURNS column in the mysql.proc was of CHAR(64). That was not enough for storing long-named datatypes. The fix is to change CHAR(64) to LONGBLOB, and to throw warnings at the time a stored routine is created if some data is truncated during writing into mysql.proc. How to repeat: SET SESSION sql_mode = ''; DROP PROCEDURE IF EXISTS p1; CREATE PROCEDURE p1 () COMMENT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' BEGIN END; SHOW WARNINGS; Suggested fix: Only disallow truncated comments when within a strict SQL mode [31 Jan 2008 17:40] Miguel Solorzano c:\dbs>5.1\bin\mysql -uroot test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.1.24-rc-nt Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> SET S
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 Learn more about Stack Overflow the company 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 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How can I view the error preventing me from creating a stored procedure? up vote 1 down vote favorite https://bugs.mysql.com/bug.php?id=34197 I'm trying to implement a Haversine distance function as desribed in this question. Whenever I run it though, either on the command line or through PhpMyAdmin, I get the following error: #1607 - Cannot create stored routine `haversine`. Check warnings The problem is that when I run SHOW WARNINGS; I get a 0 row result set. Is this a common problem? How do I view the warnings? (If it's relevant, I'm running http://stackoverflow.com/questions/6670565/how-can-i-view-the-error-preventing-me-from-creating-a-stored-procedure MySQL 5.1.37-1ubuntu5.) mysql stored-procedures warnings share|improve this question asked Jul 12 '11 at 20:19 Tom Wright 5,8871246105 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Don't know if there is any better way. What I have been doing is to create it very simple and incomplete and test at each added bit of functionality. Why don't you post yours? Look at this question: How do you debug MySQL stored procedures? share|improve this answer answered Jul 13 '11 at 0:08 Clodoaldo Neto 47.6k868116 I didn't see the need to post my stored procedure as it's a verbatim copy of the one on the question I linked to. This is also a reason why I'm reluctant to start taking it to bits; I know it works elsewhere, so it's probably my installation of MySQL that's the problem. –Tom Wright Jul 13 '11 at 11:09 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 ta
To He ... 10 Oct: Strange 1-Time Connect and then I have ... 09 Oct: Heidi duplicate row when i add new 08 Oct: Cross http://www.heidisql.com/forum.php?t=19118 apply 08 Oct: HeidiSQL + SQLite 08 Oct: Title bar buttons http://www.sqlserverf1.com/tag/cannot-create-stored-routine-s-check-warnings/ flicker in Windows 10 07 Oct: Help with query 07 Oct: Postgres tree 07 Oct: Feature Request 07 Oct: Revision 4514 "Donate" button(s) 07 Oct: UI bug in window: User Manager? 06 Oct: ERROR: syntax error at or near "DETERMI ... 06 error 1607 Oct: Crash when accessing database tab. 06 Oct: php query 06 Oct: Help.. lost connection to mysql server ... 06 Oct: Bug: Crash showing tooltip of MediumTex ... 05 Oct: 2 minor suggestions 05 Oct: Multiple "From IP"s in user manager 05 Oct: Remember queries between sessions (?RFC) DonateHow to donate List error 1607 cannot of donors HelpRequirements Connecting to a server Command line switches The database tree Creating a table Creating a view Creating a stored procedure Creating a trigger Creating a scheduled event The Data tab Running SQL queries SQL export HeidiSQL portable License Credits Long comments SP update Error New topic Register Log in 3 posts serhio posted 1 year ago in General When I update a Stored routine (stored procedure) on a MySql database, I put in the comment a "long" comment, the application bugs: My comment was like this: "Gets all the eLetters from the last month contained under a given root umbraco node" Result: [Window Title]-Unnamed: Error [Content]-SQL Error (1607): Cannot create stored routine `HeidiSQL_temproutine_1`. Check warnings [OK] [Footer]-Find some help on this error 1 attachment(s): 3 posts serhio posted 1 year ago version 9.3.0.4984 Please login to leave a reply, or register at first. Username: Password: Remember me Imprint | Using Project Honey Pot
Tag: Cannot create stored routine `%s`. Check warnings Troubleshooting MYSQL or MariaDB Errors from Error 1601 to 1610 March 1, 2015 SQLServerF1 Leave a comment MariaDB ERROR Code 1601 MySQL SQL State HY000 ER_SR_INVALID_CREATION_CTX Creation context of stored routine `%s`.`%s` is invalid MariaDB ERROR Code 1602 MySQL SQL State HY000 ER_TRG_CORRUPTED_FILE Corrupted TRG file for table `%s`.`%s` MariaDB ERROR Code 1603 MySQL SQL State HY000 ER_TRG_NO_CREATION_CTX Triggers for table `%s`.`%s` have no creation context MariaDB ERROR Code 1604 MySQL SQL State HY000 ER_TRG_INVALID_CREATION_CTX Trigger creation context of table `%s`.`%s` is invalid MariaDB ERROR Code 1605 MySQL SQL State HY000 ER_EVENT_INVALID_CREATION_CTX Creation context of event `%s`.`%s` is invalid MariaDB ERROR Code 1606 MySQL SQL State HY000 ER_TRG_CANT_OPEN_TABLE Cannot open table for trigger `%s`.`%s` MariaDB ERROR Code 1607 MySQL SQL State HY000 ER_CANT_CREATE_SROUTINE Cannot create stored routine `%s`. Check warnings MariaDB ERROR Code 1608 MySQL SQL State HY000 ER_SLAVE_AMBIGOUS_EXEC_MODE Ambiguous slave modes combination. %s Note: Removed after 5.5.2 and renamed to ER_NEVER_USED in 5.5.3. MariaDB ERROR Code 1608 MySQL SQL State HY000 ER_NEVER_USED Ambiguous slave modes combination. %s Note: Introduced in 5.5.3, renamed from ER_SLAVE_AMBIGOUS_EXEC_MODE. MariaDB ERROR Code 1609 MySQL SQL State HY000 ER_NO_FORMAT_DESCRIPTION_EVENT _BEFORE_BINLOG_STATEMENT BINLOG statement of type `%s` was not preceded by a format description BINLOG statement. MariaDB ERROR Code 1610 MySQL SQL State HY000 ER_SLAVE_CORRUPT_EVENT Corrupted replication event was detected Above are the list of shared MySQL and MariaDB Error Codes and their Description including SQL state and exact error code from Error 1601 to 1610 which performing certain operations against MySQL or MariaDB. What are MYSQL/MariaDB Errors? MySQL and MariaDB programs have access to several types of common error information when the server returns an error. The MYSQL/MariaDB message displayed contains three types of information: A numeric error