~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/tests/libsvn_wc/wc-test-queries.sql

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* wc-test-queries.sql -- queries used to verify wc metadata from
 
2
 *                        the C tests.
 
3
 *
 
4
 * ====================================================================
 
5
 *    Licensed to the Apache Software Foundation (ASF) under one
 
6
 *    or more contributor license agreements.  See the NOTICE file
 
7
 *    distributed with this work for additional information
 
8
 *    regarding copyright ownership.  The ASF licenses this file
 
9
 *    to you under the Apache License, Version 2.0 (the
 
10
 *    "License"); you may not use this file except in compliance
 
11
 *    with the License.  You may obtain a copy of the License at
 
12
 *
 
13
 *      http://www.apache.org/licenses/LICENSE-2.0
 
14
 *
 
15
 *    Unless required by applicable law or agreed to in writing,
 
16
 *    software distributed under the License is distributed on an
 
17
 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
18
 *    KIND, either express or implied.  See the License for the
 
19
 *    specific language governing permissions and limitations
 
20
 *    under the License.
 
21
 * ====================================================================
 
22
 */
 
23
 
 
24
-- STMT_SELECT_NODES_INFO
 
25
SELECT op_depth, n.presence, n.local_relpath, revision,
 
26
       repos_path, file_external, def_local_relpath, moved_to, moved_here,
 
27
       properties
 
28
FROM nodes n
 
29
LEFT OUTER JOIN externals e
 
30
            ON n.wc_id = e.wc_id
 
31
                AND n.local_relpath = e.local_relpath
 
32
WHERE n.wc_id = ?1
 
33
  AND (n.local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(n.local_relpath, ?2))
 
34
 
 
35
-- STMT_SELECT_ACTUAL_INFO
 
36
SELECT local_relpath
 
37
FROM actual_node
 
38
WHERE wc_id = ?1
 
39
  AND conflict_data is NOT NULL
 
40
  AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
 
41
 
 
42
-- STMT_DELETE_NODES
 
43
DELETE FROM nodes;
 
44
 
 
45
-- STMT_INSERT_NODE
 
46
INSERT INTO nodes (local_relpath, op_depth, presence, repos_path,
 
47
                   revision, parent_relpath, moved_to, moved_here,
 
48
                   properties, wc_id, repos_id, kind,
 
49
                   depth)
 
50
           VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, 1,
 
51
                   CASE WHEN ?3 != 'base-deleted' THEN 1 END,
 
52
                   'dir',
 
53
                   CASE WHEN ?3 in ('normal', 'incomplete')
 
54
                        THEN 'infinity' END)
 
55
 
 
56
-- STMT_DELETE_ACTUAL
 
57
DELETE FROM actual_node;
 
58
 
 
59
-- STMT_INSERT_ACTUAL
 
60
INSERT INTO actual_node (local_relpath, parent_relpath, changelist, wc_id)
 
61
                VALUES (?1, ?2, ?3, 1)
 
62
 
 
63
-- STMT_ENSURE_EMPTY_PRISTINE
 
64
INSERT OR IGNORE INTO pristine (checksum, md5_checksum, size, refcount)
 
65
  VALUES ('$sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709',
 
66
          '$md5 $d41d8cd98f00b204e9800998ecf8427e',
 
67
          0, 0)
 
68
 
 
69
-- STMT_NODES_SET_FILE
 
70
UPDATE nodes
 
71
   SET kind = 'file',
 
72
       checksum = '$sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709',
 
73
       depth = NULL
 
74
WHERE wc_id = 1 and local_relpath = ?1
 
75
 
 
76
-- STMT_SELECT_ALL_ACTUAL
 
77
SELECT local_relpath FROM actual_node WHERE wc_id = 1
 
78