r9119: Automated commit for Debian build of clsql upstream-version-2.9.2
[clsql.git] / sql / classes.lisp
index 7098ca2c81eafb294522578b648d896f0f20782f..558127ae9bbd28d18e34d702bad90acac53d8a15 100644 (file)
@@ -630,6 +630,9 @@ uninclusive, and the args from that keyword to the end."
     :initform nil)
    (modifiers
     :initarg :modifiers
+    :initform nil)
+   (transactions
+    :initarg :transactions
     :initform nil))
   (:documentation
    "An SQL CREATE TABLE statement."))
@@ -658,7 +661,7 @@ uninclusive, and the args from that keyword to the end."
                  (when constraints
                    (write-string " " *sql-stream*)
                    (write-string constraints *sql-stream*)))))))
-    (with-slots (name columns modifiers)
+    (with-slots (name columns modifiers transactions)
       stmt
       (write-string "CREATE TABLE " *sql-stream*)
       (output-sql name database)
@@ -673,7 +676,11 @@ uninclusive, and the args from that keyword to the end."
             ((null modifier))
           (write-string ", " *sql-stream*)
           (write-string (car modifier) *sql-stream*)))
-      (write-char #\) *sql-stream*)))
+      (write-char #\) *sql-stream*)
+      (when (and (eq :mysql (database-underlying-type database))
+                transactions
+                (db-type-transaction-capable? :mysql database))
+       (write-string " Type=InnoDB" *sql-stream*)))) 
   t)