~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/hp_rrnd.cc

  • Committer: Monty Taylor
  • Date: 2010-04-22 02:46:23 UTC
  • mto: (1497.3.4 enable-dtrace)
  • mto: This revision was merged to the branch mainline in revision 1527.
  • Revision ID: mordred@inaugust.com-20100422024623-4urw8fi8eraci08p
Don't overwrite the pandora_vc_revinfo file if we don't have new
authoratative information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/* Read a record from a random position */
17
17
 
26
26
 
27
27
int heap_rrnd(register HP_INFO *info, unsigned char *record, unsigned char *pos)
28
28
{
29
 
  HP_SHARE *share=info->getShare();
 
29
  HP_SHARE *share=info->s;
30
30
 
31
31
  info->lastinx= -1;
32
32
  if (!(info->current_ptr= pos))
33
33
  {
34
34
    info->update= 0;
35
 
    return(errno=  drizzled::HA_ERR_END_OF_FILE);
 
35
    return(errno= HA_ERR_END_OF_FILE);
36
36
  }
37
37
  if (get_chunk_status(&share->recordspace, info->current_ptr) != CHUNK_STATUS_ACTIVE)
38
38
  {
39
39
    /* treat deleted and linked chunks as deleted */
40
40
    info->update= HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND;
41
 
    return(errno= drizzled::HA_ERR_RECORD_DELETED);
 
41
    return(errno=HA_ERR_RECORD_DELETED);
42
42
  }
43
43
  info->update=HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND | HA_STATE_AKTIV;
44
44
  hp_extract_record(share, record, info->current_ptr);