From 0e6b9695aff6500ad48c4dd9ab61343d7090b030 Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion)" Date: Tue, 24 Mar 2009 17:05:21 +0100 Subject: TRUNCATE is also a MySQL DDL statement, so document this is a possible caveat when using transactions and savepoints. --- activerecord/lib/active_record/transactions.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb index 0b6e52c79b..b059eb7f6f 100644 --- a/activerecord/lib/active_record/transactions.rb +++ b/activerecord/lib/active_record/transactions.rb @@ -175,6 +175,8 @@ module ActiveRecord # end # RELEASE savepoint active_record_1 # # ^^^^ BOOM! database error! # end + # + # Note that "TRUNCATE" is also a MySQL DDL statement! module ClassMethods # See ActiveRecord::Transactions::ClassMethods for detailed documentation. def transaction(options = {}, &block) -- cgit v1.2.3