~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2008-08-22 15:37:17 UTC
  • mfrom: (365.2.9 codestyle)
  • mto: This revision was merged to the branch mainline in revision 368.
  • Revision ID: brian@tangent.org-20080822153717-kqyxqh0xcnvfjrzh
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3038
3038
    share opens have been executed while one table was open all the
3039
3039
    time).
3040
3040
 
3041
 
    share->table_map_id is not ~0UL.
 
3041
    share->table_map_id is not UINT32_MAX.
3042
3042
 */
3043
3043
void assign_new_table_id(TABLE_SHARE *share)
3044
3044
{
3045
 
  static ulong last_table_id= ~0UL;
 
3045
  static uint32_t last_table_id= UINT32_MAX;
3046
3046
 
3047
3047
  /* Preconditions */
3048
3048
  assert(share != NULL);
3053
3053
    There is one reserved number that cannot be used.  Remember to
3054
3054
    change this when 6-byte global table id's are introduced.
3055
3055
  */
3056
 
  if (unlikely(tid == ~0UL))
 
3056
  if (unlikely(tid == UINT32_MAX))
3057
3057
    tid= ++last_table_id;
3058
3058
  share->table_map_id= tid;
3059
3059
 
3060
3060
  /* Post conditions */
3061
 
  assert(share->table_map_id != ~0UL);
 
3061
  assert(share->table_map_id != UINT32_MAX);
3062
3062
 
3063
3063
  return;
3064
3064
}