-(when (clsql-base-sys:database-type-library-loaded :mysql)
- (clsql-base-sys:initialize-database-type :database-type :mysql))
+(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-has-union? ((db-type (eql :mysql)))
+ (not (eql (schar mysql::*mysql-client-info* 0) #\3)))
+
+(defmethod db-type-transaction-capable? ((db-type (eql :mysql)) database)
+ (let ((tuple (car (database-query "SHOW VARIABLES LIKE 'HAVE_INNODB'" database :auto nil))))
+ (and tuple (string-equal "YES" (second tuple)))))
+
+(when (clsql-sys:database-type-library-loaded :mysql)
+ (clsql-sys:initialize-database-type :database-type :mysql))