X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-connection.lisp;h=3e742e7e1a6f4f895d99c4aec470c47f9491aaef;hb=f67c4e2a4e5b8371a1b7c1629828999ff909f538;hp=25c8b733c38f76b6f2d7162d5659071c0b4be7ba;hpb=2e4aa59540392e40168a6d83c858edd8514ba086;p=clsql.git diff --git a/tests/test-connection.lisp b/tests/test-connection.lisp index 25c8b73..3e742e7 100644 --- a/tests/test-connection.lisp +++ b/tests/test-connection.lisp @@ -1,18 +1,18 @@ ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- -;;;; ====================================================================== -;;;; File: test-connection.lisp -;;;; Authors: Marcus Pearce , Kevin Rosenberg -;;;; Created: 30/03/2004 -;;;; Updated: $Id$ +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION ;;;; -;;;; Tests for CLSQL database connections. +;;;; Name: test-connection.lisp +;;;; Purpose: Tests for CLSQL database connections +;;;; Authors: Marcus Pearce and Kevin M. Rosenberg +;;;; Created: March 2004 ;;;; ;;;; This file is part of CLSQL. ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software ;;;; as governed by the terms of the Lisp Lesser GNU Public License ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. -;;;; ====================================================================== +;;;; ************************************************************************* (in-package #:clsql-tests) @@ -55,4 +55,26 @@ (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))) + ))