Fossil

Check-in [3e9f9b06]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Removed some dead SQL code and fixed transaction closing in a "cannot happen" scenario in load_vfile_from_rid(), per ML discussion.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3e9f9b0609095ffc2d41cb78ea435f7d7606f70b
User & Date: stephan 2013-09-02 19:11:14
Context
2013-09-02
19:20
Fixed a wrong-column use in load_vfile_from_rid(), which caused an is-a-phantom check to always eval to false, even for phantoms. This has 'probably' never been triggered before. check-in: 612e0ecc user: stephan tags: trunk
19:11
Removed some dead SQL code and fixed transaction closing in a "cannot happen" scenario in load_vfile_from_rid(), per ML discussion. check-in: 3e9f9b06 user: stephan tags: trunk
17:44
Added recent assertion/stderr fix to changelog. check-in: 429aba33 user: stephan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vfile.c.

80
81
82
83
84
85
86
87
88


89
90
91
92
93
94
95

  if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){
    return;
  }

  db_begin_transaction();
  p = manifest_get(vid, CFTYPE_MANIFEST);
  if( p==0 ) return;
  db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid);


  db_prepare(&ins,
    "INSERT INTO vfile(vid,isexe,islink,rid,mrid,pathname) "
    " VALUES(:vid,:isexe,:islink,:id,:id,:name)");
  db_prepare(&ridq, "SELECT rid,size FROM blob WHERE uuid=:uuid");
  db_bind_int(&ins, ":vid", vid);
  manifest_file_rewind(p);
  while( (pFile = manifest_file_next(p,0))!=0 ){







|
|
>
>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

  if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){
    return;
  }

  db_begin_transaction();
  p = manifest_get(vid, CFTYPE_MANIFEST);
  if( p==0 ) {
    db_end_transaction(1);
    return;
  }
  db_prepare(&ins,
    "INSERT INTO vfile(vid,isexe,islink,rid,mrid,pathname) "
    " VALUES(:vid,:isexe,:islink,:id,:id,:name)");
  db_prepare(&ridq, "SELECT rid,size FROM blob WHERE uuid=:uuid");
  db_bind_int(&ins, ":vid", vid);
  manifest_file_rewind(p);
  while( (pFile = manifest_file_next(p,0))!=0 ){