~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to storage/myisam/mi_update.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2000-2006 MySQL AB
 
1
/*
 
2
   Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
2
3
 
3
4
   This program is free software; you can redistribute it and/or modify
4
5
   it under the terms of the GNU General Public License as published by
11
12
 
12
13
   You should have received a copy of the GNU General Public License
13
14
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
16
*/
15
17
 
16
18
/* Update an old row in a MyISAM table */
17
19
 
193
195
  save_errno=my_errno;
194
196
  if (changed)
195
197
    key_changed|= HA_STATE_CHANGED;
196
 
  if (my_errno == HA_ERR_FOUND_DUPP_KEY || my_errno == HA_ERR_OUT_OF_MEM ||
197
 
      my_errno == HA_ERR_RECORD_FILE_FULL)
 
198
  if (my_errno == HA_ERR_FOUND_DUPP_KEY || my_errno == HA_ERR_RECORD_FILE_FULL ||
 
199
      my_errno == HA_ERR_NULL_IN_SPATIAL || my_errno == HA_ERR_OUT_OF_MEM)
198
200
  {
199
201
    info->errkey= (int) i;
200
202
    flag=0;
212
214
        {
213
215
          uint new_length=_mi_make_key(info,i,new_key,newrec,pos);
214
216
          uint old_length= _mi_make_key(info,i,old_key,oldrec,pos);
215
 
          if ((flag++ && _mi_ck_delete(info,i,new_key,new_length)) ||
216
 
              _mi_ck_write(info,i,old_key,old_length))
 
217
          if ((flag++ && 
 
218
               share->keyinfo[i].ck_delete(info, i, new_key, new_length)) ||
 
219
              share->keyinfo[i].ck_insert(info, i, old_key, old_length))
217
220
            break;
218
221
        }
219
222
      }