Bug #32418 Misleading comment about return value of DELETE
Submitted: 15 Nov 2007 17:57 Modified: 29 Nov 2007 18:12
Reporter: Peter Brawley (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.1.22 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any
Tags: qc

[15 Nov 2007 17:57] Peter Brawley
Description:
The manual page for DELETE says ...

"For the single-table syntax, the DELETE  statement deletes rows from tbl_name  and returns the number of rows deleted."

which encourages some users to try ...

SET @ok = (DELETE FROM tbl WHERE id=...);

which of course fails. The sentence needs a rewrite.

How to repeat:
as above
[15 Nov 2007 17:59] Paul DuBois
Peter, please suggest alternative wording. Thanks.
[15 Nov 2007 17:59] Valeriy Kravchuk
Thank you for a reasonable documentation request.
[15 Nov 2007 18:36] Peter Brawley
Suggested alternative:

"For the single-table syntax, the DELETE statement deletes rows from tbl_name. ROW_COUNT() [add the link] returns the number of rows deleted."
[29 Nov 2007 18:12] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Changed DELETE Syntax wording as suggested by the submitter.