Got multiple results sets working for mysql which solves the precedure
[clsql.git] / tests / test-connection.lisp
index e15b682d8597bfe1f0654cc0de461fd4e180fc2c..3e742e7e1a6f4f895d99c4aec470c47f9491aaef 100644 (file)
       (clsql-sys:query "DROP TABLE DUMMY"))
   nil nil)
 
+(deftest :connection/pool/procedure-mysql
+ (unwind-protect
+      (progn
+        (clsql-sys:disconnect)
+        (test-connect :pool t)
+        (clsql-sys:execute-command
+         "CREATE PROCEDURE prTest () BEGIN SELECT 1 \"a\",2 \"b\",3 \"c\" ,4  \"d\" UNION SELECT 5,6,7,8; END;")
+        (clsql-sys:disconnect)
+        (test-connect :pool t)
+        (let ((p0 (clsql-sys:query "CALL prTest();" :flatp t)))
+          (clsql-sys:disconnect)
+          (test-connect :pool t)
+          (let ((p1 (clsql-sys:query "CALL prTest();" :flatp t)))
+            (clsql-sys:disconnect)
+            (test-connect :pool t)
+            (values p0 p1))))
+   (ignore-errors
+    (clsql-sys:execute-command "DROP PROCEDURE prTest;"))
+   (test-connect))
+ ((1 2 3 4) (5 6 7 8))
+ ((1 2 3 4) (5 6 7 8)))
+
 ))