Bugs item #2860574, was opened at 2009-09-17 12:13
Message generated for change (Tracker Item Submitted) made by axelbel
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2860574&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Axel Belinfante (axelbel)
Assigned to: Nobody/Anonymous (nobody)
Summary: atal error: column ... not found  / BATappend access denied

Initial Comment:
when I paste the forst following (lower down) xquery fragment at the 
interactive prompt of  mclient -lx -p portnumber I get an error:

MAPI  = mone...@localhost:51012
QUERY = declare function add-int-attr($element as element()
ERROR = !fatal error: column 'item72' with type '0x1' not found in environment
        !# halted in milgen.brg (env_mvar_), line 695

when I simplify the stuff that I paste (as shown in second block, even lower 
down)
it does work as expected.

this is on linux Linux ewi865 2.6.16.21-0.8-smp #1 SMP Mon Jul 3 18:25:39 UTC 
2006 x86_64 x86_64 x86_64 GNU/Linux
with the Aug-2009 version.

This used to work  in the May 2009 version (same machine).



Sidenote: when I access the same functionality via xrpc I get a different error:

Error occurred during execution.
!ERROR: BATappend: access denied to tmp_375, aborting.
!ERROR: BATappend_wrap: operation failed.



====== first block start  ===================

declare function add-int-attr($element as element()
                                 ,$val as xs:integer?)
 as element()?
{
   element {$element/name()} {
        attribute  { 'seq' } { $val },
        $element/@*,
        $element/node()
   }
};


declare updating function save-view($savedoc as xs:string
                                       ,$name as xs:string
                                       ,$user as xs:string
                                       ,$view as element())
{
   let $doc := doc($savedoc)
   let $save := $doc/views/active/vi...@name eq $name and @user eq $user]
   return
        if (empty($save))
        then 
                let $v := add-int-attr($view, 0)
                return do insert $v as last into $doc/views/active
        else (
               let $n := (abs($save/@seq) +1 ) cast as xs:integer?
               let $v := add-int-attr($view, $n)
               return (
                   do replace $save with $v,
                   do insert $save as last into $doc/views/archive
               )
        )
};


 save-view("view-defs.xml", "zambon", "axel", <view now='1253179900.00036' 
name='zambon' prevseq='0' user='axel'><select allany=''  inex='include' ><cond 
cmp='eq' field='creators_family'>zambon</cond></select></view>)

====== first block end ===================

====== second block start ================

declare function add-int-attr($element as element()
                                 ,$val as xs:integer?)
 as element()?
{
   element {$element/name()} {
        attribute  { 'seq' } { $val },
        $element/@*,
        $element/node()
   }
};


declare updating function save-view($savedoc as xs:string
                                       ,$name as xs:string
                                       ,$user as xs:string
                                       ,$view as element())
{
   let $doc := doc($savedoc)
   let $save := $doc/views/active/vi...@name eq $name and @user eq $user]
   return
        if (empty($save))
        then 
                let $v := $view
                return do insert $v as last into $doc/views/active
        else (
               let $v := $view
               return (
                   do replace $save with $v,
                   do insert $save as last into $doc/views/archive
               )
        )
};


 save-view("view-defs.xml", "zambon", "axel", <view now='1253179900.00036' 
name='zambon' prevseq='0' user='axel'><select allany=''  inex='include' ><cond 
cmp='eq' field='creators_family'>zambon</cond></select></view>)

====== second block end ===================



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2860574&group_id=56967

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to