X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-mysql%2Fmysql-sql.lisp;h=7f88875f1cc9000fb59e9684df7381257cbfbae2;hb=23b76563b25a517ad20f29d6dc5a65c8b958a042;hp=7cc6f50ba53d126b0a6af193125221fcb1e354b4;hpb=a4097e19c5157e87b9991549bc44f3ef598aeb90;p=clsql.git diff --git a/db-mysql/mysql-sql.lisp b/db-mysql/mysql-sql.lisp index 7cc6f50..7f88875 100644 --- a/db-mysql/mysql-sql.lisp +++ b/db-mysql/mysql-sql.lisp @@ -421,9 +421,25 @@ ;;; Database capabilities -(defmethod db-use-column-on-drop-index? ((database mysql-database)) +(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))