Bug #30521 | strange: CREATE TEMPORARY TABLE .. AS SELECT is only partially atomic | ||
---|---|---|---|
Submitted: | 20 Aug 2007 20:49 | Modified: | 14 Dec 2007 20:18 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.1 | OS: | Any |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
[20 Aug 2007 20:49]
Matthias Leich
[20 Aug 2007 20:51]
Matthias Leich
test script
Attachment: ml040.test (application/octet-stream, text), 798 bytes.
[30 Aug 2007 10:58]
Konstantin Osipov
We want to allow CREATE TEMPORARY TABLE in stored functions. An explicit or implicit commit is not allowed in stored functions. Other options are infeasible. Should be documented in the manual.
[14 Dec 2007 20:18]
Paul DuBois
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. Revised description for http://dev.mysql.com/doc/refman/5.0/en/implicit-commit.html: CREATE TABLE and DROP TABLE do not commit a transaction if the TEMPORARY keyword is used. (This does not apply to other operations on temporary tables such as CREATE INDEX, which do cause a commit.) However, although no implicit occurs, neither can the statement be rolled back. Therefore, use of such statements will violate transaction atomicity: For example, if you use CREATE TEMPOARARY TABLE and then roll back the transaction, the table remains in existence.