mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +01:00
branches/innodb+: Merge revisions 4063:4070 from branches/zip:
------------------------------------------------------------------------ r4070 | marko | 2009-01-30 12:58:56 +0200 (Fri, 30 Jan 2009) | 6 lines branches/zip: ibuf_use_t: Add the constant IBUF_USE_COUNT, to eliminate a gcc warning about an assertion that trivially holds. The warning was introduced in r4061, in the merge of branches/innodb+ -r4053. ibuf_insert(): Let an assertion fail if ibuf_use is unknown. ------------------------------------------------------------------------
This commit is contained in:
parent
9384b65fb7
commit
c3853fdade
3 changed files with 23 additions and 9 deletions
|
@ -188,7 +188,7 @@ bool nw_panic = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Allowed values of innodb_change_buffering */
|
/** Allowed values of innodb_change_buffering */
|
||||||
static const char* innobase_change_buffering_values[IBUF_USE_ALL + 1] = {
|
static const char* innobase_change_buffering_values[IBUF_USE_COUNT] = {
|
||||||
"none", /* IBUF_USE_NONE */
|
"none", /* IBUF_USE_NONE */
|
||||||
"inserts", /* IBUF_USE_INSERT */
|
"inserts", /* IBUF_USE_INSERT */
|
||||||
"deletes", /* IBUF_USE_DELETE_MARK */
|
"deletes", /* IBUF_USE_DELETE_MARK */
|
||||||
|
@ -9432,7 +9432,7 @@ innodb_change_buffering_update(
|
||||||
{
|
{
|
||||||
ut_a(var_ptr != NULL);
|
ut_a(var_ptr != NULL);
|
||||||
ut_a(save != NULL);
|
ut_a(save != NULL);
|
||||||
ut_a((*(ibuf_use_t*) save) <= IBUF_USE_ALL);
|
ut_a((*(ibuf_use_t*) save) < IBUF_USE_COUNT);
|
||||||
|
|
||||||
ibuf_use = *(const ibuf_use_t*) save;
|
ibuf_use = *(const ibuf_use_t*) save;
|
||||||
|
|
||||||
|
|
|
@ -3533,6 +3533,8 @@ ibuf_insert(
|
||||||
case IBUF_USE_INSERT:
|
case IBUF_USE_INSERT:
|
||||||
case IBUF_USE_INSERT_DELETE_MARK:
|
case IBUF_USE_INSERT_DELETE_MARK:
|
||||||
case IBUF_USE_ALL:
|
case IBUF_USE_ALL:
|
||||||
|
goto notify;
|
||||||
|
case IBUF_USE_COUNT:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -3545,9 +3547,11 @@ ibuf_insert(
|
||||||
case IBUF_USE_DELETE:
|
case IBUF_USE_DELETE:
|
||||||
case IBUF_USE_INSERT_DELETE_MARK:
|
case IBUF_USE_INSERT_DELETE_MARK:
|
||||||
case IBUF_USE_ALL:
|
case IBUF_USE_ALL:
|
||||||
|
ut_ad(!no_counter);
|
||||||
|
goto notify;
|
||||||
|
case IBUF_USE_COUNT:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ut_ad(!no_counter);
|
|
||||||
break;
|
break;
|
||||||
case IBUF_OP_DELETE:
|
case IBUF_OP_DELETE:
|
||||||
switch (use) {
|
switch (use) {
|
||||||
|
@ -3558,14 +3562,20 @@ ibuf_insert(
|
||||||
case IBUF_USE_DELETE_MARK:
|
case IBUF_USE_DELETE_MARK:
|
||||||
case IBUF_USE_DELETE:
|
case IBUF_USE_DELETE:
|
||||||
case IBUF_USE_ALL:
|
case IBUF_USE_ALL:
|
||||||
|
ut_ad(!no_counter);
|
||||||
|
goto skip_notify;
|
||||||
|
case IBUF_USE_COUNT:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ut_ad(!no_counter);
|
break;
|
||||||
goto skip_notify;
|
case IBUF_OP_COUNT:
|
||||||
default:
|
break;
|
||||||
ut_error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* unknown op or use */
|
||||||
|
ut_error;
|
||||||
|
|
||||||
|
notify:
|
||||||
/* If another thread buffers an insert on a page while
|
/* If another thread buffers an insert on a page while
|
||||||
the purge is in progress, the purge for the same page
|
the purge is in progress, the purge for the same page
|
||||||
must not be buffered, because it could remove a record
|
must not be buffered, because it could remove a record
|
||||||
|
|
|
@ -28,14 +28,18 @@ typedef enum {
|
||||||
IBUF_OP_COUNT = 3,
|
IBUF_OP_COUNT = 3,
|
||||||
} ibuf_op_t;
|
} ibuf_op_t;
|
||||||
|
|
||||||
/** Combinations of operations that can be buffered. */
|
/** Combinations of operations that can be buffered. Because the enum
|
||||||
|
values are used for indexing innobase_change_buffering_values[], they
|
||||||
|
should start at 0 and there should not be any gaps. */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
IBUF_USE_NONE = 0,
|
IBUF_USE_NONE = 0,
|
||||||
IBUF_USE_INSERT, /* insert */
|
IBUF_USE_INSERT, /* insert */
|
||||||
IBUF_USE_DELETE_MARK, /* delete */
|
IBUF_USE_DELETE_MARK, /* delete */
|
||||||
IBUF_USE_INSERT_DELETE_MARK, /* insert+delete */
|
IBUF_USE_INSERT_DELETE_MARK, /* insert+delete */
|
||||||
IBUF_USE_DELETE, /* delete+purge */
|
IBUF_USE_DELETE, /* delete+purge */
|
||||||
IBUF_USE_ALL /* insert+delete+purge */
|
IBUF_USE_ALL, /* insert+delete+purge */
|
||||||
|
|
||||||
|
IBUF_USE_COUNT /* number of entries in ibuf_use_t */
|
||||||
} ibuf_use_t;
|
} ibuf_use_t;
|
||||||
|
|
||||||
/** Operations that can currently be buffered. */
|
/** Operations that can currently be buffered. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue