| Bug #10057 | The Synonym for 'Use' ( \u ) can be used in stored procedures. | ||
|---|---|---|---|
| Submitted: | 21 Apr 2005 10:05 | Modified: | 25 Apr 2005 21:25 |
| Reporter: | Disha | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 5.0.4 Beta-standard | OS: | Linux (RedHat Linux 9.0) |
| Assigned to: | CPU Architecture: | Any | |
[21 Apr 2005 14:41]
Jorge del Conde
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.
If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information
about accessing the source trees is available at
http://www.mysql.com/doc/en/Installing_source_tree.html
Additional info:
Hi
This is with a recent 5.0.5 bk pull:
mysql> Create procedure sp1 ()
-> Begin
-> \u test1
Database changed
-> End//
Query OK, 0 rows affected (0.02 sec)
[25 Apr 2005 21:25]
Sergei Golubchik
It's not a bug. \u is not a part of the SQL as MySQL implements it. It is a command of 'mysql' - command line client, just as \?, \p, \e, \g, etc. So, you simply create a procedure with an empty body.

Description: 1. When we create a stored procedure 'sp1' with '\u' keyword , procedure is created successfully.It does not give an error or warnings. 2. When we try to create a stored procedure 'sp1' with 'Use' keyword .It gives an error message :''Error 1336 (42000): Use is not allowed in a stored procedure How to repeat: 1. Set delimiter ie execute the following SQL statement: Delimiter // 2. Use database as 'test' ie execute the following SQL statement: Use test// 3. Create a procedure 'sp1' ie execute the following SQL statement: Create procedure sp1 () Begin \u test1 End// 4. Call procedure 'sp1' ie execute the following SQL statement: Call sp1() // 5. Observed : Call statement executes successfully without any error or warning. Expected Results : In procedure 'sp1' if we use '\u' it should give an error message 'Error 1336 (42000): Use is not allowed in a stored procedure' . Actual Results : In procedure 'sp1' if we use '\u' instead of the keyword 'Use' we are able to create the procedure.