Bug #22870 Mallformed statement gets executed (calling SP from PS)
| Submitted: | 1 Oct 2006 10:28 | Modified: | 1 Aug 2007 10:49 |
|---|---|---|---|
| Reporter: | Tonci Grgin | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: Prepared statements | Severity: | S3 (Non-critical) |
| Version: | 5.0 BK, 5.1 BK | OS: | Linux (SUSE Linux 10.0) |
| Assigned to: | Konstantin Osipov | CPU Architecture: | Any |
[1 Oct 2006 10:28]
Tonci Grgin
[1 Oct 2006 10:29]
Tonci Grgin
Test case
Attachment: bug22297.c (text/x-csrc), 8.19 KiB.
[1 Oct 2006 10:56]
Valeriy Kravchuk
Thank you for a problem report. Sorry, but this is a documented limitation of prepared statements in MySQL, it seems. According to the manual, http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html: "The following statements can be used as prepared statements: CREATE TABLE, DELETE, DO, INSERT, REPLACE, SELECT, SET, UPDATE, and most SHOW statements. Other statements are not supported in MySQL 5.0."
[1 Oct 2006 11:27]
Tonci Grgin
Changing synopsis according to Valeriy's findings. According to manual http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html: "The following statements can be used as prepared statements: CREATE TABLE, DELETE, DO, INSERT, REPLACE, SELECT, SET, UPDATE, and most SHOW statements. Other statements are not supported in MySQL 5.0." This should not work at all. It is my opinion, as statement text should be checked in prepare, that letting this construct pass and retreiving 10-20% of resultset is misleading, so this is a bug (with new synopsis). We should throw error and stop execution of mallformed statement.
[1 Aug 2007 10:49]
Konstantin Osipov
Can't repea it any more. Could be a side effect of one of the bugs in pre-locking/temporary tables handling in stored procedures fixed recently. Since it is not clear what was causing the failure, closing without adding a test case.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.