Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What Happens to the Current Transaction If a DDL Statement Is Executed
What Happens to the Current Transaction If a DDL Statement Is Executed? - MySQL FAQs - Transaction Management: Commit or Rollback
✍: FYIcenter.com
If a DDL statement is executed, the current transaction will be committed and ended. All the database changes made in the current transaction will become permanent. This is called an implicit commit by a DDL statement.
The following tutorial exercise shows you that the CREATE TABLE statement forced the current transaction to be committed and ended. The subsequent ROLLBACK command had no effects on the closed transaction:
>\mysql\bin\mysql -u dev -piyf fyi mysql> START TRANSACTION; Query OK, 0 rows affected (0.01 sec) mysql> INSERT INTO fyi_links (url, id) VALUES ('oracle.com', 112); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO fyi_links (url, id) VALUES ('mysql.com', 113); Query OK, 1 row affected (0.00 sec) mysql> CREATE TABLE fyi_temp AS (SELECT * FROM fyi_links); Query OK, 4 rows affected (0.22 sec) Records: 4 Duplicates: 0 Warnings: 0 mysql> ROLLBACK; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> SELECT * FROM fyi_links; +-----+---------------+-------+--------+-------------------- | id | url | notes | counts | created +-----+---------------+-------+--------+-------------------- | 101 | fyicenter.com | Good | 999 | 2006-07-01 20:34:10 | 110 | centerfyi.com | Wrong | 0 | 2006-07-01 20:34:12 | 112 | oracle.com | NULL | NULL | 2006-07-01 20:41:12 | 113 | mysql.com | NULL | NULL | 2006-07-01 20:41:21 +-----+---------------+-------+--------+--------------------
2007-05-11, 5743👍, 0💬
Popular Posts:
What Happens to Your Transactions When ERROR 1213 Occurred? - MySQL FAQs - Transaction Management: C...
What is difference between SITP and UTP in testing ? UTP (Unit Test Plan) are done at smallest unit ...
How To Use "IF" Statements on Multiple Conditions? - Oracle DBA FAQ - Understanding PL/SQL Language ...
What is the version information in XML? “version” tag shows which version of XML is used.
Describe in detail Basic of SAO architecture of Remoting? For these types of questions interviewer e...