since Mysql 3.23 does not support unions.
* sql/test-init.lisp: Don't try union tests on database
backends which do not support it.
15 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
* Version 2.10.18
+ * sql/db-interface.lisp: Add new db-type-has-union?
+ since Mysql 3.23 does not support unions.
+ * sql/test-init.lisp: Don't try union tests on database
+ backends which do not support it.
* db-oracle/*.lisp: initial port to UFFI
* sql/objects.lisp: implement UPDATE-OBJECT-JOINS,
implement REFRESH for SELECT.
(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)))))
t)
(:documentation "T [default] if database-type supports boolean WHERE clause, such as 'WHERE MARRIED'."))
+(defgeneric db-type-has-union? (db-type)
+ (:method (db-type)
+ (declare (ignore db-type))
+ t)
+ (:documentation "T [default] if database-type supports boolean UNION."))
+
(defgeneric db-backend-has-create/destroy-db? (db-type)
(:method (db-type)
(declare (ignore db-type))
#:db-backend-has-create/destroy-db?
#:db-type-has-views?
+ #:db-type-has-union?
#:db-type-has-subqueries?
#:db-type-has-boolean-where?
#:db-type-transaction-capable?
(clsql-sys:in test :fdml/select/22 :fdml/query/5
:fdml/query/7 :fdml/query/8))
(push (cons test "not supported by mysql") skip-tests))
+ ((and (null (clsql-sys:db-type-has-union? db-underlying-type))
+ (clsql-sys:in test :fdml/query/6))
+ (push (cons test "union not supported") skip-tests))
(t
(push test-form test-forms)))))
(values (nreverse test-forms) (nreverse skip-tests))))