r9119: Automated commit for Debian build of clsql upstream-version-2.9.2
[clsql.git] / db-mysql / mysql-sql.lisp
index 46544926debd64b7dd30c94214362f89ad1ab054..7f88875f1cc9000fb59e9684df7381257cbfbae2 100644 (file)
 
 ;;; Database capabilities
 
-(defmethod db-use-column-on-drop-index? ((db-type (eql :mysql)))
+(defmethod db-type-use-column-on-drop-index? ((db-type (eql :mysql)))
   t)
 
+(defmethod db-type-has-views? ((db-type (eql :mysql)))
+  ;; MySQL 4.1 will apparently have views, need to check *mysql-client-info*
+  nil)
+
+(defmethod db-type-has-subqueries? ((db-type (eql :mysql)))
+  ;; MySQL 4.1 will apparently have subqueries, need to check *mysql-client-info*
+  nil)
+
+(defmethod db-type-has-boolean-where? ((db-type (eql :mysql)))
+  nil)
+
+(defmethod db-type-transaction-capable? ((db-type (eql :mysql)) database)
+  (let ((has-innodb (caar (database-query "SHOW VARIABLES LIKE 'HAVE_INNODB'" database :auto))))
+    (and has-innodb (string-equal "YES" has-innodb))))
+
+
 (when (clsql-base-sys:database-type-library-loaded :mysql)
   (clsql-base-sys:initialize-database-type :database-type :mysql))