1
/******************************************************
2
Data dictionary creation and booting
6
Created 4/18/1996 Heikki Tuuri
7
*******************************************************/
9
/**************************************************************************
10
Writes the current value of the row id counter to the dictionary header file
14
dict_hdr_flush_row_id(void);
15
/*=======================*/
18
/**************************************************************************
19
Returns a new row id. */
22
dict_sys_get_new_row_id(void)
23
/*=========================*/
28
mutex_enter(&(dict_sys->mutex));
30
id = dict_sys->row_id;
32
if (0 == (ut_dulint_get_low(id) % DICT_HDR_ROW_ID_WRITE_MARGIN)) {
34
dict_hdr_flush_row_id();
37
UT_DULINT_INC(dict_sys->row_id);
39
mutex_exit(&(dict_sys->mutex));
44
/**************************************************************************
45
Reads a row id from a record or other 6-byte stored form. */
51
byte* field) /* in: record field */
53
#if DATA_ROW_ID_LEN != 6
54
# error "DATA_ROW_ID_LEN != 6"
57
return(mach_read_from_6(field));
60
/**************************************************************************
61
Writes a row id to a record or other 6-byte stored form. */
64
dict_sys_write_row_id(
65
/*==================*/
66
byte* field, /* in: record field */
67
dulint row_id) /* in: row id */
69
#if DATA_ROW_ID_LEN != 6
70
# error "DATA_ROW_ID_LEN != 6"
73
mach_write_to_6(field, row_id);