<div><div><br><div class="gmail_quote">On Fri, Jul 10, 2009 at 5:06 AM, Changying Li <span dir="ltr"><<a href="mailto:lchangying@gmail.com">lchangying@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'm a newbie of plt scheme. If I report a non-exist bug, please forgive<br>
me.<br>
<br>
plt scheme version:<br>
[chylli@arch scmtipcode] mzscheme -v<br>
Welcome to MzScheme v4.2 [3m], Copyright (c) 2004-2009 PLT Scheme Inc.<br>
<br>
mysql.plt version:<br>
mysql.plt (1 2) 0.5a jaz<br>
<br>
<br>
example code:<br>
<br>
#lang scheme<br>
(current-print void)<br>
(require (planet jaz/mysql:1))<br>
<br>
(connect "localhost" 3306 "chylli" "3843054" #:schema "test" #:set-current? #t)<br>
(define rs (query "select * from user_stat"))<br>
(printf "~a\n" (result-set-field-names rs ))<br>
(close-connection! (current-connection))<br>
<br>
<br>
expect:<br>
[chylli@arch /tmp] mzscheme test.ss<br>
#(stat_id user_id column_name column_value time)<br>
<br>
bad result:<br>
<br>
(file "/home/chylli/.plt-scheme/planet/300/4.2/cache/jaz/mysql.plt/1/2/private/structs.ss") broke the contract<br>
(->r ((f ...) (vec1 ...)) vec ... ...)<br>
on vector-map; expected <...43/vector-lib.ss:275:13>, given: #<procedure:field-name><br>
<br>
=== context ===<br>
/usr/lib/plt/collects/scheme/private/contract-guts.ss:220:0: raise-contract-error<br>
/usr/lib/plt/collects/srfi/43/vector-lib.ss:275:4: ...rfi/43/vector-lib.ss:275:4<br>
<br>
<br>
<br>
advice:<br>
74th line of structs.ss should be:<br>
(vector-map (lambda (i f) (field-name f)) (result-set-fields rs)))<br>
</blockquote><div><br></div><div><br></div><div>Thanks for the bug report. I fixed this issue and uploaded version 1.3 to planet:<div><br></div><div><a href="http://planet.plt-scheme.org/display.ss?package=mysql.plt&owner=jaz">http://planet.plt-scheme.org/display.ss?package=mysql.plt&owner=jaz</a></div>
<div><br></div><div>-Jon</div><div><br></div></div><div> </div></div></div></div>