Bug #21108 | procedures failing when cursors fetch strings with quotes or spaces | ||
---|---|---|---|
Submitted: | 18 Jul 2006 8:16 | Modified: | 26 Aug 2006 8:47 |
Reporter: | Erica Moss | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S2 (Serious) |
Version: | 5.1.12 | OS: | Linux (Fedora core 5) |
Assigned to: | CPU Architecture: | Any |
[18 Jul 2006 8:16]
Erica Moss
[25 Aug 2006 19:38]
Omer Barnir
Please clarify which of the commands in the procedure is failing when encountering a string with quotes
[26 Aug 2006 8:47]
Sergei Golubchik
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/. No bug here. With SET @cmd:= concat('INSERT INTO t2 VALUES (\'', vname, '\')'); you construct a query INSERT INTO t2 VALUES ('cold'slaw'') this is syntaxically wrong, naturally it fails when you try to execute it. Same with the second procecedure, you try to execute the following query: DROP VIEW fooDB.t 1
[28 Aug 2006 16:08]
Omer Barnir
In order to get around this issue you need to use the quote function See http://dev.mysql.com/doc/refman/5.0/en/string-functions.html If the problem still exists please clarify and set back to verify