~stewart/drizzle/docs-improvements-1

« back to all changes in this revision

Viewing changes to drizzled/table.h

merged with up to date trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
47
47
class COND_EQUAL;
48
48
class SecurityContext;
49
49
class TableList;
50
 
class Field_timestamp;
 
50
namespace field {
 
51
class Epoch;
 
52
}
51
53
class Field_blob;
52
54
 
53
55
extern uint64_t refresh_version;
158
160
  KeyInfo  *key_info; /**< data of keys in database */
159
161
  Field *next_number_field; /**< Set if next_number is activated. @TODO What the heck is the difference between this and the next member? */
160
162
  Field *found_next_number_field; /**< Points to the "next-number" field (autoincrement field) */
161
 
  Field_timestamp *timestamp_field; /**< Points to the auto-setting timestamp field, if any */
 
163
  field::Epoch *timestamp_field; /**< Points to the auto-setting timestamp field, if any */
162
164
 
163
165
  TableList *pos_in_table_list; /* Element referring to this table */
164
166
  Order *group;
280
282
    statement then the variable contains TIMESTAMP_NO_AUTO_SET (i.e. 0).
281
283
 
282
284
    Value of this variable is set for each statement in open_table() and
283
 
    if needed cleared later in statement processing code (see mysql_update()
 
285
    if needed cleared later in statement processing code (see update_query()
284
286
    as example).
285
287
  */
286
288
  timestamp_auto_set_type timestamp_field_type;
603
605
  */
604
606
  bool operator<(const Table &right) const
605
607
  {
606
 
    int result= strcasecmp(this->getShare()->getSchemaName(), right.getShare()->getSchemaName());
607
 
 
608
 
    if (result <  0)
609
 
      return true;
610
 
 
611
 
    if (result >  0)
612
 
      return false;
613
 
 
614
 
    result= strcasecmp(this->getShare()->getTableName(), right.getShare()->getTableName());
615
 
 
616
 
    if (result <  0)
617
 
      return true;
618
 
 
619
 
    if (result >  0)
620
 
      return false;
621
 
 
622
 
    if (this->getShare()->getTableProto()->type()  < right.getShare()->getTableProto()->type())
623
 
      return true;
624
 
 
625
 
    return false;
 
608
    return getShare()->getCacheKey() < right.getShare()->getCacheKey();
626
609
  }
627
610
 
628
611
  static bool compare(const Table *a, const Table *b)