Faircube Networks - Custom programming projects, internet consulting, web design, and various other multimedia and graphic design solutions.
 
Home arrow MySQL arrow BDB and INNODB tables types that support transactions
BDB and INNODB tables types that support transactions

Transactions: Not all table types support transactions. BDB and INNODB type do support transactions.
Assuming the server has NOT been started with --skip-bdb or --skip-innodb the following should work:

 

mysql> create table tran_test (a int, b int) type = InnoDB;
mysql> begin;
mysql> insert into tran_test (a,b) values (1,2);


mysql> select * from tran_test;
select * from tran_test;
+------+------+
| a    | b    |
+------+------+
|    1 |    2 |
+------+------+
1 row in set (0.00 sec)

mysql> rollback;

mysql> select * from tran_test;
select * from tran_test;
Empty set (0.00 sec)

Summary: rollback undoes everything and commit will save.

 

 

 
 
Home | Services | Portfolio | Support | Prices | About Us | Privacy | Terms | Website Resources | Legal
Copyright © 1999-2007 Faircube Networks Inc. All Rights Reserved.