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

« back to all changes in this revision

Viewing changes to subversion/libsvn_wc/wc-metadata.sql

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2014-02-20 20:38:10 UTC
  • mfrom: (0.2.11)
  • Revision ID: package-import@ubuntu.com-20140220203810-w61omsda8fs70pta
Tags: 1.8.8-1
* New upstream release.  Refresh patches.
  - Remove backported patches sqlite_3.8.x_workaround & swig-pl_build_fix
  - Fix integer overflows with 32-bit svnserv, which could cause an infinite
    loop (Closes: #738840) or inaccurate statistics (Closes: #738841)
  - Work around SQLite not honoring umask when creating rep-cache.db.
    (Closes: #735446)
  - Includes security fix:
    + CVE-2014-0032: mod_dav_svn crash when handling certain requests with
      SVNListParentPath on  (Closes: #737815)
* Add a subversion-dbg package.  (Closes: #508147)
* Bump libdb5.1-dev → libdb5.3-dev  (Closes: #738650)

Show diffs side-by-side

added added

removed removed

Lines of Context:
573
573
                                                      local_relpath);
574
574
 
575
575
/* ------------------------------------------------------------------------- */
 
576
/* This statement provides SQLite with the necessary information about our
 
577
   indexes to make better decisions in the query planner.
 
578
 
 
579
   For every interesting index this contains a number of rows where the
 
580
   statistics ar calculated for and then for every column in the index the
 
581
   average number of rows with the same value in all columns left of this
 
582
   column including the column itself.
 
583
 
 
584
   See http://www.sqlite.org/fileformat2.html#stat1tab for more details.
 
585
 
 
586
   The important thing here is that this tells Sqlite that the wc_id column
 
587
   of the NODES and ACTUAL_NODE table is usually a single value, so queries
 
588
   should use more than one column for index usage.
 
589
 
 
590
   The current hints describe NODES+ACTUAL_NODE as a working copy with
 
591
   8000 nodes in 1 a single working copy(=wc_id), 10 nodes per directory
 
592
   and an average of 2 op-depth layers per node.
 
593
 
 
594
   The number of integers must be number of index columns + 1, which is
 
595
   verified via the test_schema_statistics() test.
 
596
 */
 
597
-- STMT_INSTALL_SCHEMA_STATISTICS
 
598
ANALYZE sqlite_master; /* Creates empty sqlite_stat1 if necessary */
 
599
 
 
600
INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
 
601
    ('NODES', 'sqlite_autoindex_NODES_1',               '8000 8000 2 1');
 
602
INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
 
603
    ('NODES', 'I_NODES_PARENT',                         '8000 8000 10 2 1');
 
604
/* Tell a lie: We ignore that 99.9% of all moved_to values are NULL */
 
605
INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
 
606
    ('NODES', 'I_NODES_MOVED',                          '8000 8000 1 1');
 
607
 
 
608
INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
 
609
    ('ACTUAL_NODE', 'sqlite_autoindex_ACTUAL_NODE_1',   '8000 8000 1');
 
610
INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
 
611
    ('ACTUAL_NODE', 'I_ACTUAL_PARENT',                  '8000 8000 10 1');
 
612
 
 
613
INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
 
614
    ('LOCK', 'sqlite_autoindex_LOCK_1',                 '100 100 1');
 
615
 
 
616
INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
 
617
    ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1',           '100 100 1');
 
618
 
 
619
/* sqlite_autoindex_WORK_QUEUE_1 doesn't exist because WORK_QUEUE is
 
620
   a INTEGER PRIMARY KEY AUTOINCREMENT table */
 
621
 
 
622
ANALYZE sqlite_master; /* Loads sqlite_stat1 data for query optimizer */
 
623
/* ------------------------------------------------------------------------- */
576
624
 
577
625
/* Format 20 introduces NODES and removes BASE_NODE and WORKING_NODE */
578
626