~ubuntu-branches/ubuntu/quantal/mysql-5.5/quantal-updates

« back to all changes in this revision

Viewing changes to sql/sql_handler.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-01-16 10:11:37 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130116101137-w2lant30o21mzi0b
Tags: 5.5.29-0ubuntu0.12.10.1
* SECURITY UPDATE: Update to 5.5.29 to fix security issues (LP: #1100264)
  - http://www.oracle.com/technetwork/topics/security/cpujan2013-1515902.html
* debian/patches/CVE-2012-5611.patch: removed, included upstream.
* debian/patches/38_scripts__mysqld_safe.sh__signals.patch: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
665
665
    case RFIRST:
666
666
      if (keyname)
667
667
      {
668
 
        table->file->ha_index_or_rnd_end();
669
 
        table->file->ha_index_init(keyno, 1);
670
 
        error= table->file->index_first(table->record[0]);
 
668
        if (!(error= table->file->ha_index_or_rnd_end()) &&
 
669
            !(error= table->file->ha_index_init(keyno, 1)))
 
670
          error= table->file->index_first(table->record[0]);
671
671
      }
672
672
      else
673
673
      {
674
 
        table->file->ha_index_or_rnd_end();
675
 
        if (!(error= table->file->ha_rnd_init(1)))
 
674
        if (!(error= table->file->ha_index_or_rnd_end()) &&
 
675
            !(error= table->file->ha_rnd_init(1)))
676
676
          error= table->file->rnd_next(table->record[0]);
677
677
      }
678
678
      mode=RNEXT;
689
689
      /* else fall through */
690
690
    case RLAST:
691
691
      DBUG_ASSERT(keyname != 0);
692
 
      table->file->ha_index_or_rnd_end();
693
 
      table->file->ha_index_init(keyno, 1);
694
 
      error= table->file->index_last(table->record[0]);
 
692
      if (!(error= table->file->ha_index_or_rnd_end()) &&
 
693
          !(error= table->file->ha_index_init(keyno, 1)))
 
694
        error= table->file->index_last(table->record[0]);
695
695
      mode=RPREV;
696
696
      break;
697
697
    case RNEXT_SAME:
734
734
 
735
735
      if (!(key= (uchar*) thd->calloc(ALIGN_SIZE(key_len))))
736
736
        goto err;
737
 
      table->file->ha_index_or_rnd_end();
738
 
      table->file->ha_index_init(keyno, 1);
 
737
      if ((error= table->file->ha_index_or_rnd_end()))
 
738
        break;
739
739
      key_copy(key, table->record[0], table->key_info + keyno, key_len);
740
 
      error= table->file->index_read_map(table->record[0],
741
 
                                         key, keypart_map, ha_rkey_mode);
 
740
      if (!(error= table->file->ha_index_init(keyno, 1)))
 
741
        error= table->file->index_read_map(table->record[0],
 
742
                                           key, keypart_map, ha_rkey_mode);
742
743
      mode=rkey_to_rnext[(int)ha_rkey_mode];
743
744
      break;
744
745
    }