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
ut_ad(DATA_ROW_ID_LEN == 6);
55
return(mach_read_from_6(field));
58
/**************************************************************************
59
Writes a row id to a record or other 6-byte stored form. */
62
dict_sys_write_row_id(
63
/*==================*/
64
byte* field, /* in: record field */
65
dulint row_id) /* in: row id */
67
ut_ad(DATA_ROW_ID_LEN == 6);
69
mach_write_to_6(field, row_id);