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

« back to all changes in this revision

Viewing changes to sql/opt_range.h

  • 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, 2010, 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
 
17
19
/* classes to use when handling where clause */
265
267
 
266
268
  virtual bool reverse_sorted() = 0;
267
269
  virtual bool unique_key_range() { return false; }
 
270
  virtual bool clustered_pk_range() { return false; }
268
271
 
269
272
  enum {
270
273
    QS_TYPE_RANGE = 0,
533
536
  THD *thd;
534
537
  int read_keys_and_merge();
535
538
 
 
539
  bool clustered_pk_range() { return test(pk_quick_select); }
 
540
 
536
541
  /* used to get rows collected in Unique */
537
542
  READ_RECORD read_record;
538
543
};
788
793
    tmp.set_all();
789
794
    return test_quick_select(thd, tmp, 0, limit, force_quick_range) < 0;
790
795
  }
791
 
  inline bool skip_record() { return cond ? cond->val_int() == 0 : 0; }
 
796
  inline bool skip_record(THD *thd, bool *skip_record)
 
797
  {
 
798
    *skip_record= cond ? cond->val_int() == FALSE : FALSE;
 
799
    return thd->is_error();
 
800
  }
792
801
  int test_quick_select(THD *thd, key_map keys, table_map prev_tables,
793
802
                        ha_rows limit, bool force_quick_range);
794
803
};