[gold-users] Transaction support in MySQL

Scott Jackson scottmo at adaptivecomputing.com
Wed Jul 20 13:18:37 MDT 2011

For those using Gold with MySQL:

Gold uses transactions in order to rollback failed requests. For example, if there are not enough funds for a reservation, we do not want part of a reservation to be left around after it has returned with an insufficient funds response.

The MySQL database, prior to version 5.5.5, does not use a transaction safe storage engine by default. You must configure your MySQL server to use a transaction-safe storage engine such as InnoDB. This can be accomplished by setting the parameter default-storage-engine = INNODB in your my.cnf file under the [mysqld] section and restarting mysql.

For example:

# vi /etc/mysql/my.cnf
default-storage-engine = INNODB

Other options include using the --default-storage-engine=INNODB server startup option, or altering all of your Gold tables to specify the INNODB storage engine (i.e. ALTER TABLE t ENGINE = INNODB.

To see what storage engines are supported, which support transactions and which one is currently
being used as the default use the "show engines" command at the mysql prompt:

mysql> show engines;
| Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         | NO           | NO   | NO         |

Future releases of Gold will include this step in the installation instructions.



More information about the gold-users mailing list