You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2011/03/17 20:59:06 UTC

Re: svn commit: r1082650 - /subversion/trunk/subversion/libsvn_wc/wc-queries.sql

On Mar 17, 2011 7:19 PM, <ph...@apache.org> wrote:
>
> Author: philip
> Date: Thu Mar 17 19:19:11 2011
> New Revision: 1082650
>
> URL: http://svn.apache.org/viewvc?rev=1082650&view=rev
> Log:
> Only single statements in wc-queries.sql are executed, anything after
> a semi-colon is ignored.  That means that some statements setting up
> indices were not getting executed, and one statement lost part of
> it selection criteria.

You can use svn_sqlite__exec_statements() for those multi-statement
operations.

Cheers,
-g

Re: svn commit: r1082650 - /subversion/trunk/subversion/libsvn_wc/wc-queries.sql

Posted by Philip Martin <ph...@wandisco.com>.
Greg Stein <gs...@gmail.com> writes:

> On Mar 17, 2011 7:19 PM, <ph...@apache.org> wrote:
>>
>> Author: philip
>> Date: Thu Mar 17 19:19:11 2011
>> New Revision: 1082650
>>
>> URL: http://svn.apache.org/viewvc?rev=1082650&view=rev
>> Log:
>> Only single statements in wc-queries.sql are executed, anything after
>> a semi-colon is ignored.  That means that some statements setting up
>> indices were not getting executed, and one statement lost part of
>> it selection criteria.
>
> You can use svn_sqlite__exec_statements() for those multi-statement
> operations.

Not if one wants to bind:

-- STMT_CACHE_NODE_PROPS_RECURSIVE
CREATE TEMPORARY TABLE temp__node_props_cache AS
  SELECT local_relpath, kind, properties FROM nodes_current
  WHERE wc_id = ?1
    AND (?2 = '' OR local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
    AND local_relpath NOT IN (
      SELECT local_relpath FROM actual_node WHERE wc_id = ?1)
    AND (presence = 'normal' OR presence = 'incomplete');
CREATE UNIQUE INDEX temp__node_props_cache_unique
  ON temp__node_props_cache (local_relpath)

-- 
Philip

Re: svn commit: r1082650 - /subversion/trunk/subversion/libsvn_wc/wc-queries.sql

Posted by Greg Stein <gs...@gmail.com>.
Maybe we could rename these to GROUP_ to acknowledge their multiple
statements, and how to run them?
On Mar 17, 2011 7:59 PM, "Greg Stein" <gs...@gmail.com> wrote:
> On Mar 17, 2011 7:19 PM, <ph...@apache.org> wrote:
>>
>> Author: philip
>> Date: Thu Mar 17 19:19:11 2011
>> New Revision: 1082650
>>
>> URL: http://svn.apache.org/viewvc?rev=1082650&view=rev
>> Log:
>> Only single statements in wc-queries.sql are executed, anything after
>> a semi-colon is ignored. That means that some statements setting up
>> indices were not getting executed, and one statement lost part of
>> it selection criteria.
>
> You can use svn_sqlite__exec_statements() for those multi-statement
> operations.
>
> Cheers,
> -g