mariadb/innobase/include/ut0ut.ic
unknown d1485aad0e Many files:
Multiple tablespaces for InnoDB
sql_table.cc:
  Tell explicitly that InnoDB should retrieve all columns in CHECKSUM TABLE
sql_update.cc, sql_select.cc, my_base.h:
  More descriptive flag name HA_EXTRA_RETRIEVE_ALL_COLS


include/my_base.h:
  More descriptive flag name HA_EXTRA_RETRIEVE_ALL_COLS
sql/sql_select.cc:
  More descriptive flag name HA_EXTRA_RETRIEVE_ALL_COLS
sql/sql_update.cc:
  More descriptive flag name HA_EXTRA_RETRIEVE_ALL_COLS
sql/sql_table.cc:
  Tell explicitly that InnoDB should retrieve all columns in CHECKSUM TABLE
sql/sql_db.cc:
  Multiple tablespaces for InnoDB
sql/ha_innodb.cc:
  Multiple tablespaces for InnoDB
sql/mysqld.cc:
  Multiple tablespaces for InnoDB
sql/set_var.cc:
  Multiple tablespaces for InnoDB
sql/sql_cache.cc:
  Multiple tablespaces for InnoDB
sql/ha_innodb.h:
  Multiple tablespaces for InnoDB
innobase/include/btr0btr.ic:
  Multiple tablespaces for InnoDB
innobase/include/btr0pcur.ic:
  Multiple tablespaces for InnoDB
innobase/include/data0type.ic:
  Multiple tablespaces for InnoDB
innobase/include/dyn0dyn.ic:
  Multiple tablespaces for InnoDB
innobase/include/fut0lst.ic:
  Multiple tablespaces for InnoDB
innobase/include/log0log.ic:
  Multiple tablespaces for InnoDB
innobase/include/mach0data.ic:
  Multiple tablespaces for InnoDB
innobase/include/mtr0log.ic:
  Multiple tablespaces for InnoDB
innobase/include/rem0rec.ic:
  Multiple tablespaces for InnoDB
innobase/include/ut0byte.ic:
  Multiple tablespaces for InnoDB
innobase/include/ut0ut.ic:
  Multiple tablespaces for InnoDB
innobase/include/buf0buf.h:
  Multiple tablespaces for InnoDB
innobase/include/buf0lru.h:
  Multiple tablespaces for InnoDB
innobase/include/buf0rea.h:
  Multiple tablespaces for InnoDB
innobase/include/data0type.h:
  Multiple tablespaces for InnoDB
innobase/include/db0err.h:
  Multiple tablespaces for InnoDB
innobase/include/dict0boot.h:
  Multiple tablespaces for InnoDB
innobase/include/dict0dict.h:
  Multiple tablespaces for InnoDB
innobase/include/dict0load.h:
  Multiple tablespaces for InnoDB
innobase/include/dict0mem.h:
  Multiple tablespaces for InnoDB
innobase/include/fil0fil.h:
  Multiple tablespaces for InnoDB
innobase/include/fsp0fsp.h:
  Multiple tablespaces for InnoDB
innobase/include/ibuf0ibuf.h:
  Multiple tablespaces for InnoDB
innobase/include/lock0lock.h:
  Multiple tablespaces for InnoDB
innobase/include/log0log.h:
  Multiple tablespaces for InnoDB
innobase/include/log0recv.h:
  Multiple tablespaces for InnoDB
innobase/include/os0file.h:
  Multiple tablespaces for InnoDB
innobase/include/page0page.h:
  Multiple tablespaces for InnoDB
innobase/include/que0types.h:
  Multiple tablespaces for InnoDB
innobase/include/rem0rec.h:
  Multiple tablespaces for InnoDB
innobase/include/srv0srv.h:
  Multiple tablespaces for InnoDB
innobase/include/srv0start.h:
  Multiple tablespaces for InnoDB
innobase/include/sync0sync.h:
  Multiple tablespaces for InnoDB
innobase/include/trx0sys.h:
  Multiple tablespaces for InnoDB
innobase/include/ut0byte.h:
  Multiple tablespaces for InnoDB
innobase/include/univ.i:
  Multiple tablespaces for InnoDB
innobase/btr/btr0cur.c:
  Multiple tablespaces for InnoDB
innobase/btr/btr0sea.c:
  Multiple tablespaces for InnoDB
innobase/buf/buf0buf.c:
  Multiple tablespaces for InnoDB
innobase/buf/buf0flu.c:
  Multiple tablespaces for InnoDB
innobase/buf/buf0lru.c:
  Multiple tablespaces for InnoDB
innobase/buf/buf0rea.c:
  Multiple tablespaces for InnoDB
innobase/data/data0type.c:
  Multiple tablespaces for InnoDB
innobase/dict/dict0boot.c:
  Multiple tablespaces for InnoDB
innobase/dict/dict0crea.c:
  Multiple tablespaces for InnoDB
innobase/dict/dict0dict.c:
  Multiple tablespaces for InnoDB
innobase/dict/dict0load.c:
  Multiple tablespaces for InnoDB
innobase/dict/dict0mem.c:
  Multiple tablespaces for InnoDB
innobase/fil/fil0fil.c:
  Multiple tablespaces for InnoDB
innobase/fsp/fsp0fsp.c:
  Multiple tablespaces for InnoDB
innobase/ha/ha0ha.c:
  Multiple tablespaces for InnoDB
innobase/ibuf/ibuf0ibuf.c:
  Multiple tablespaces for InnoDB
innobase/log/log0log.c:
  Multiple tablespaces for InnoDB
innobase/log/log0recv.c:
  Multiple tablespaces for InnoDB
innobase/mach/mach0data.c:
  Multiple tablespaces for InnoDB
innobase/mem/mem0dbg.c:
  Multiple tablespaces for InnoDB
innobase/mem/mem0pool.c:
  Multiple tablespaces for InnoDB
innobase/mtr/mtr0log.c:
  Multiple tablespaces for InnoDB
innobase/os/os0file.c:
  Multiple tablespaces for InnoDB
innobase/os/os0proc.c:
  Multiple tablespaces for InnoDB
innobase/page/page0cur.c:
  Multiple tablespaces for InnoDB
innobase/que/que0que.c:
  Multiple tablespaces for InnoDB
innobase/row/row0ins.c:
  Multiple tablespaces for InnoDB
innobase/row/row0mysql.c:
  Multiple tablespaces for InnoDB
innobase/row/row0sel.c:
  Multiple tablespaces for InnoDB
innobase/row/row0upd.c:
  Multiple tablespaces for InnoDB
innobase/srv/srv0srv.c:
  Multiple tablespaces for InnoDB
innobase/srv/srv0start.c:
  Multiple tablespaces for InnoDB
innobase/sync/sync0rw.c:
  Multiple tablespaces for InnoDB
innobase/sync/sync0sync.c:
  Multiple tablespaces for InnoDB
innobase/trx/trx0sys.c:
  Multiple tablespaces for InnoDB
innobase/trx/trx0trx.c:
  Multiple tablespaces for InnoDB
innobase/trx/trx0undo.c:
  Multiple tablespaces for InnoDB
innobase/ut/ut0byte.c:
  Multiple tablespaces for InnoDB
innobase/ut/ut0ut.c:
  Multiple tablespaces for InnoDB
2003-10-07 17:28:59 +03:00

174 lines
3.6 KiB
Text

/******************************************************************
Various utilities
(c) 1994, 1995 Innobase Oy
Created 5/30/1994 Heikki Tuuri
*******************************************************************/
/**********************************************************
Calculates the minimum of two ulints. */
UNIV_INLINE
ulint
ut_min(
/*===*/
/* out: minimum */
ulint n1, /* in: first number */
ulint n2) /* in: second number */
{
return((n1 <= n2) ? n1 : n2);
}
/**********************************************************
Calculates the maximum of two ulints. */
UNIV_INLINE
ulint
ut_max(
/*===*/
/* out: maximum */
ulint n1, /* in: first number */
ulint n2) /* in: second number */
{
return((n1 <= n2) ? n2 : n1);
}
/********************************************************************
Calculates minimum of two ulint-pairs. */
UNIV_INLINE
void
ut_pair_min(
/*========*/
ulint* a, /* out: more significant part of minimum */
ulint* b, /* out: less significant part of minimum */
ulint a1, /* in: more significant part of first pair */
ulint b1, /* in: less significant part of first pair */
ulint a2, /* in: more significant part of second pair */
ulint b2) /* in: less significant part of second pair */
{
if (a1 == a2) {
*a = a1;
*b = ut_min(b1, b2);
} else if (a1 < a2) {
*a = a1;
*b = b1;
} else {
*a = a2;
*b = b2;
}
}
/**********************************************************
Compares two ulints. */
UNIV_INLINE
int
ut_ulint_cmp(
/*=========*/
/* out: 1 if a > b, 0 if a == b, -1 if a < b */
ulint a, /* in: ulint */
ulint b) /* in: ulint */
{
if (a < b) {
return(-1);
} else if (a == b) {
return(0);
} else {
return(1);
}
}
/***********************************************************
Compares two pairs of ulints. */
UNIV_INLINE
int
ut_pair_cmp(
/*========*/
/* out: -1 if a < b, 0 if a == b, 1 if a > b */
ulint a1, /* in: more significant part of first pair */
ulint a2, /* in: less significant part of first pair */
ulint b1, /* in: more significant part of second pair */
ulint b2) /* in: less significant part of second pair */
{
if (a1 > b1) {
return(1);
} else if (a1 < b1) {
return(-1);
} else if (a2 > b2) {
return(1);
} else if (a2 < b2) {
return(-1);
} else {
return(0);
}
}
/*****************************************************************
Calculates fast the remainder when divided by a power of two. */
UNIV_INLINE
ulint
ut_2pow_remainder(
/*==============*/ /* out: remainder */
ulint n, /* in: number to be divided */
ulint m) /* in: divisor; power of 2 */
{
ut_ad(0x80000000UL % m == 0);
return(n & (m - 1));
}
/*****************************************************************
Calculates fast a value rounded to a multiple of a power of 2. */
UNIV_INLINE
ulint
ut_2pow_round(
/*==========*/ /* out: value of n rounded down to nearest
multiple of m */
ulint n, /* in: number to be rounded */
ulint m) /* in: divisor; power of 2 */
{
ut_ad(0x80000000UL % m == 0);
return(n & ~(m - 1));
}
/*****************************************************************
Calculates fast the 2-logarithm of a number, rounded upward to an
integer. */
UNIV_INLINE
ulint
ut_2_log(
/*=====*/
/* out: logarithm in the base 2, rounded upward */
ulint n) /* in: number != 0 */
{
ulint res;
res = 0;
ut_ad(n > 0);
n = n - 1;
for (;;) {
n = n / 2;
if (n == 0) {
break;
}
res++;
}
return(res + 1);
}
/*****************************************************************
Calculates 2 to power n. */
UNIV_INLINE
ulint
ut_2_exp(
/*=====*/
/* out: 2 to power n */
ulint n) /* in: number */
{
return(1 << n);
}