1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Remove "ibool comp" from dict_table_t and replace it with "ulint flags"

which can contain the new flag DICT_TF_COMPACT. Change dict_mem_table_create
to take a flags argument. Add dict_table_is_comp(). Adapt all users.

Change some places to explicitly assume that system tables do not use the
compact page format.
This commit is contained in:
osku
2006-02-27 09:11:57 +00:00
parent ab8517f396
commit 1a8f28e6dd
30 changed files with 228 additions and 149 deletions

View File

@@ -2306,7 +2306,7 @@ ha_innobase::get_row_type() const
row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt;
if (prebuilt && prebuilt->table) {
if (prebuilt->table->comp) {
if (dict_table_is_comp(prebuilt->table)) {
return(ROW_TYPE_COMPACT);
} else {
return(ROW_TYPE_REDUNDANT);
@@ -3694,12 +3694,12 @@ calc_row_difference(
if (n_len != UNIV_SQL_NULL) {
buf = row_mysql_store_col_in_innobase_format(
&dfield,
(byte*)buf,
TRUE,
new_mysql_row_col,
col_pack_len,
prebuilt->table->comp);
&dfield,
(byte*)buf,
TRUE,
new_mysql_row_col,
col_pack_len,
dict_table_is_comp(prebuilt->table));
ufield->new_val.data = dfield.data;
ufield->new_val.len = dfield.len;
} else {
@@ -4583,7 +4583,7 @@ create_table_def(
an .ibd file for it (no .ibd extension
in the path, though); otherwise this
is NULL */
ibool comp) /* in: TRUE=compact record format */
ulint flags) /* in: table flags */
{
Field* field;
dict_table_t* table;
@@ -4606,7 +4606,7 @@ create_table_def(
/* We pass 0 as the space id, and determine at a lower level the space
id where to store the table */
table = dict_mem_table_create(table_name, 0, n_cols, comp);
table = dict_mem_table_create(table_name, 0, n_cols, flags);
if (path_of_temp_table) {
table->dir_path_of_temp_table =
@@ -4852,6 +4852,7 @@ ha_innobase::create(
char norm_name[FN_REFLEN];
THD *thd= current_thd;
ib_longlong auto_inc_value;
ulint flags;
DBUG_ENTER("ha_innobase::create");
@@ -4905,9 +4906,15 @@ ha_innobase::create(
/* Create the table definition in InnoDB */
flags = 0;
if (form->s->row_type != ROW_TYPE_REDUNDANT) {
flags |= DICT_TF_COMPACT;
}
error = create_table_def(trx, form, norm_name,
create_info->options & HA_LEX_CREATE_TMP_TABLE ? name2 : NULL,
form->s->row_type != ROW_TYPE_REDUNDANT);
flags);
if (error) {
goto cleanup;