summaryrefslogtreecommitdiff
path: root/innobase/dict
diff options
context:
space:
mode:
authormarko@hundin.mysql.fi <>2004-05-27 15:27:43 +0300
committermarko@hundin.mysql.fi <>2004-05-27 15:27:43 +0300
commitfc85c80b88c0717684184f22a91f8b027a8f8559 (patch)
tree566268309e7e64b4e2f6a23700e7b8623521cbbd /innobase/dict
parente27322d8264c56e2f86435c6f6b1f80dbb448f1c (diff)
downloadmariadb-git-fc85c80b88c0717684184f22a91f8b027a8f8559.tar.gz
InnoDB cleanup:
Disable log archiving code unless #ifdef UNIV_LOG_ARCHIVE Remove (char*) casts of string constants; add const qualifiers Remove some Hot Backup code unless #ifdef UNIV_HOTBACKUP
Diffstat (limited to 'innobase/dict')
-rw-r--r--innobase/dict/dict0boot.c105
-rw-r--r--innobase/dict/dict0crea.c22
-rw-r--r--innobase/dict/dict0dict.c55
-rw-r--r--innobase/dict/dict0load.c46
4 files changed, 117 insertions, 111 deletions
diff --git a/innobase/dict/dict0boot.c b/innobase/dict/dict0boot.c
index 8e1629819f3..f156cf67a18 100644
--- a/innobase/dict/dict0boot.c
+++ b/innobase/dict/dict0boot.c
@@ -254,29 +254,26 @@ dict_boot(void)
/* Insert into the dictionary cache the descriptions of the basic
system tables */
/*-------------------------*/
- table = dict_mem_table_create((char *) "SYS_TABLES", DICT_HDR_SPACE,8);
-
- dict_mem_table_add_col(table, (char *) "NAME", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, (char *) "ID", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, (char *) "N_COLS", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "TYPE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "MIX_ID", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, (char *) "MIX_LEN", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "CLUSTER_NAME", DATA_BINARY,
- 0, 0, 0);
- dict_mem_table_add_col(table, (char *) "SPACE", DATA_INT, 0, 4, 0);
+ table = dict_mem_table_create("SYS_TABLES", DICT_HDR_SPACE,8);
+
+ dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, "ID", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, "N_COLS", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "TYPE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "MIX_ID", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, "MIX_LEN", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "CLUSTER_NAME", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, "SPACE", DATA_INT, 0, 4, 0);
table->id = DICT_TABLES_ID;
dict_table_add_to_cache(table);
dict_sys->sys_tables = table;
- index = dict_mem_index_create((char *) "SYS_TABLES", (char *)
- "CLUST_IND",
- DICT_HDR_SPACE,
- DICT_UNIQUE | DICT_CLUSTERED, 1);
+ index = dict_mem_index_create("SYS_TABLES", "CLUST_IND",
+ DICT_HDR_SPACE, DICT_UNIQUE | DICT_CLUSTERED, 1);
- dict_mem_index_add_field(index, (char *) "NAME", 0, 0);
+ dict_mem_index_add_field(index, "NAME", 0, 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_TABLES,
MLOG_4BYTES, &mtr);
@@ -284,52 +281,50 @@ dict_boot(void)
ut_a(dict_index_add_to_cache(table, index));
/*-------------------------*/
- index = dict_mem_index_create((char *) "SYS_TABLES",
- (char *) "ID_IND", DICT_HDR_SPACE,
- DICT_UNIQUE, 1);
- dict_mem_index_add_field(index, (char *) "ID", 0, 0);
+ index = dict_mem_index_create("SYS_TABLES", "ID_IND",
+ DICT_HDR_SPACE, DICT_UNIQUE, 1);
+ dict_mem_index_add_field(index, "ID", 0, 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_TABLE_IDS,
MLOG_4BYTES, &mtr);
index->id = DICT_TABLE_IDS_ID;
ut_a(dict_index_add_to_cache(table, index));
/*-------------------------*/
- table = dict_mem_table_create((char *) "SYS_COLUMNS",DICT_HDR_SPACE,7);
-
- dict_mem_table_add_col(table, (char *) "TABLE_ID", DATA_BINARY,0,0,0);
- dict_mem_table_add_col(table, (char *) "POS", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "NAME", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, (char *) "MTYPE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "PRTYPE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "LEN", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "PREC", DATA_INT, 0, 4, 0);
+ table = dict_mem_table_create("SYS_COLUMNS",DICT_HDR_SPACE,7);
+
+ dict_mem_table_add_col(table, "TABLE_ID", DATA_BINARY,0,0,0);
+ dict_mem_table_add_col(table, "POS", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, "MTYPE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "PRTYPE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "LEN", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "PREC", DATA_INT, 0, 4, 0);
table->id = DICT_COLUMNS_ID;
dict_table_add_to_cache(table);
dict_sys->sys_columns = table;
- index = dict_mem_index_create((char *) "SYS_COLUMNS",
- (char *) "CLUST_IND", DICT_HDR_SPACE,
- DICT_UNIQUE | DICT_CLUSTERED, 2);
+ index = dict_mem_index_create("SYS_COLUMNS", "CLUST_IND",
+ DICT_HDR_SPACE, DICT_UNIQUE | DICT_CLUSTERED, 2);
- dict_mem_index_add_field(index, (char *) "TABLE_ID", 0, 0);
- dict_mem_index_add_field(index, (char *) "POS", 0, 0);
+ dict_mem_index_add_field(index, "TABLE_ID", 0, 0);
+ dict_mem_index_add_field(index, "POS", 0, 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_COLUMNS,
MLOG_4BYTES, &mtr);
index->id = DICT_COLUMNS_ID;
ut_a(dict_index_add_to_cache(table, index));
/*-------------------------*/
- table = dict_mem_table_create((char *) "SYS_INDEXES",DICT_HDR_SPACE,7);
+ table = dict_mem_table_create("SYS_INDEXES",DICT_HDR_SPACE,7);
- dict_mem_table_add_col(table, (char *) "TABLE_ID", DATA_BINARY, 0,0,0);
- dict_mem_table_add_col(table, (char *) "ID", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, (char *) "NAME", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, (char *) "N_FIELDS", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "TYPE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "SPACE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "PAGE_NO", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "TABLE_ID", DATA_BINARY, 0,0,0);
+ dict_mem_table_add_col(table, "ID", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, "N_FIELDS", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "TYPE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "SPACE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "PAGE_NO", DATA_INT, 0, 4, 0);
/* The '+ 2' below comes from the 2 system fields */
#if DICT_SYS_INDEXES_PAGE_NO_FIELD != 6 + 2
@@ -343,34 +338,32 @@ dict_boot(void)
dict_table_add_to_cache(table);
dict_sys->sys_indexes = table;
- index = dict_mem_index_create((char *) "SYS_INDEXES",
- (char *) "CLUST_IND", DICT_HDR_SPACE,
- DICT_UNIQUE | DICT_CLUSTERED, 2);
+ index = dict_mem_index_create("SYS_INDEXES", "CLUST_IND",
+ DICT_HDR_SPACE, DICT_UNIQUE | DICT_CLUSTERED, 2);
- dict_mem_index_add_field(index, (char *) "TABLE_ID", 0, 0);
- dict_mem_index_add_field(index, (char *) "ID", 0, 0);
+ dict_mem_index_add_field(index, "TABLE_ID", 0, 0);
+ dict_mem_index_add_field(index, "ID", 0, 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_INDEXES,
MLOG_4BYTES, &mtr);
index->id = DICT_INDEXES_ID;
ut_a(dict_index_add_to_cache(table, index));
/*-------------------------*/
- table = dict_mem_table_create((char *) "SYS_FIELDS", DICT_HDR_SPACE,3);
+ table = dict_mem_table_create("SYS_FIELDS", DICT_HDR_SPACE,3);
- dict_mem_table_add_col(table, (char *) "INDEX_ID", DATA_BINARY, 0,0,0);
- dict_mem_table_add_col(table, (char *) "POS", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, (char *) "COL_NAME", DATA_BINARY, 0,0,0);
+ dict_mem_table_add_col(table, "INDEX_ID", DATA_BINARY, 0,0,0);
+ dict_mem_table_add_col(table, "POS", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, "COL_NAME", DATA_BINARY, 0,0,0);
table->id = DICT_FIELDS_ID;
dict_table_add_to_cache(table);
dict_sys->sys_fields = table;
- index = dict_mem_index_create((char *) "SYS_FIELDS",
- (char *) "CLUST_IND", DICT_HDR_SPACE,
- DICT_UNIQUE | DICT_CLUSTERED, 2);
+ index = dict_mem_index_create("SYS_FIELDS", "CLUST_IND",
+ DICT_HDR_SPACE, DICT_UNIQUE | DICT_CLUSTERED, 2);
- dict_mem_index_add_field(index, (char *) "INDEX_ID", 0, 0);
- dict_mem_index_add_field(index, (char *) "POS", 0, 0);
+ dict_mem_index_add_field(index, "INDEX_ID", 0, 0);
+ dict_mem_index_add_field(index, "POS", 0, 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_FIELDS,
MLOG_4BYTES, &mtr);
diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c
index f0b5906ec50..fd8e02585ae 100644
--- a/innobase/dict/dict0crea.c
+++ b/innobase/dict/dict0crea.c
@@ -1004,12 +1004,12 @@ dict_create_or_check_foreign_constraint_tables(void)
que_t* graph;
ulint error;
trx_t* trx;
- char* str;
+ const char* str;
mutex_enter(&(dict_sys->mutex));
- table1 = dict_table_get_low((char *) "SYS_FOREIGN");
- table2 = dict_table_get_low((char *) "SYS_FOREIGN_COLS");
+ table1 = dict_table_get_low("SYS_FOREIGN");
+ table2 = dict_table_get_low("SYS_FOREIGN_COLS");
if (table1 && table2
&& UT_LIST_GET_LEN(table1->indexes) == 3
@@ -1027,20 +1027,20 @@ dict_create_or_check_foreign_constraint_tables(void)
trx = trx_allocate_for_mysql();
- trx->op_info = (char *) "creating foreign key sys tables";
+ trx->op_info = "creating foreign key sys tables";
row_mysql_lock_data_dictionary(trx);
if (table1) {
fprintf(stderr,
"InnoDB: dropping incompletely created SYS_FOREIGN table\n");
- row_drop_table_for_mysql((char*)"SYS_FOREIGN", trx, TRUE);
+ row_drop_table_for_mysql("SYS_FOREIGN", trx, TRUE);
}
if (table2) {
fprintf(stderr,
"InnoDB: dropping incompletely created SYS_FOREIGN_COLS table\n");
- row_drop_table_for_mysql((char*)"SYS_FOREIGN_COLS", trx, TRUE);
+ row_drop_table_for_mysql("SYS_FOREIGN_COLS", trx, TRUE);
}
fprintf(stderr,
@@ -1050,7 +1050,7 @@ dict_create_or_check_foreign_constraint_tables(void)
there are 2 secondary indexes on SYS_FOREIGN, and they
are defined just like below */
- str = (char *)
+ str =
"PROCEDURE CREATE_FOREIGN_SYS_TABLES_PROC () IS\n"
"BEGIN\n"
"CREATE TABLE\n"
@@ -1090,15 +1090,15 @@ dict_create_or_check_foreign_constraint_tables(void)
fprintf(stderr,
"InnoDB: dropping incompletely created SYS_FOREIGN tables\n");
- row_drop_table_for_mysql((char*)"SYS_FOREIGN", trx, TRUE);
- row_drop_table_for_mysql((char*)"SYS_FOREIGN_COLS", trx, TRUE);
+ row_drop_table_for_mysql("SYS_FOREIGN", trx, TRUE);
+ row_drop_table_for_mysql("SYS_FOREIGN_COLS", trx, TRUE);
error = DB_MUST_GET_MORE_FILE_SPACE;
}
que_graph_free(graph);
- trx->op_info = (char *) "";
+ trx->op_info = "";
row_mysql_unlock_data_dictionary(trx);
@@ -1161,7 +1161,7 @@ dict_create_add_foreigns_to_dictionary(
ut_ad(mutex_own(&(dict_sys->mutex)));
#endif /* UNIV_SYNC_DEBUG */
- if (NULL == dict_table_get_low((char *) "SYS_FOREIGN")) {
+ if (NULL == dict_table_get_low("SYS_FOREIGN")) {
fprintf(stderr,
"InnoDB: table SYS_FOREIGN not found from internal data dictionary\n");
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 6a6ac2492f8..84a655bcb77 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -198,13 +198,14 @@ dict_tables_have_same_db(
/************************************************************************
Return the end of table name where we have removed dbname and '/'. */
static
-char*
+const char*
dict_remove_db_name(
/*================*/
- /* out: table name */
- char* name) /* in: table name in the form dbname '/' tablename */
+ /* out: table name */
+ const char* name) /* in: table name in the form
+ dbname '/' tablename */
{
- char* s;
+ const char* s;
s = strchr(name, '/');
ut_a(s);
if (s) s++;
@@ -783,23 +784,33 @@ dict_table_add_to_cache(
The clustered index will not always physically contain all
system columns. */
- dict_mem_table_add_col(table, (char *) "DB_ROW_ID", DATA_SYS,
+ dict_mem_table_add_col(table, "DB_ROW_ID", DATA_SYS,
DATA_ROW_ID, 0, 0);
- ut_ad(DATA_ROW_ID == 0);
- dict_mem_table_add_col(table, (char *) "DB_TRX_ID", DATA_SYS,
+#if DATA_ROW_ID != 0
+#error "DATA_ROW_ID != 0"
+#endif
+ dict_mem_table_add_col(table, "DB_TRX_ID", DATA_SYS,
DATA_TRX_ID, 0, 0);
- ut_ad(DATA_TRX_ID == 1);
- dict_mem_table_add_col(table, (char *) "DB_ROLL_PTR", DATA_SYS,
- DATA_ROLL_PTR,
- 0, 0);
- ut_ad(DATA_ROLL_PTR == 2);
+#if DATA_TRX_ID != 1
+#error "DATA_TRX_ID != 1"
+#endif
+ dict_mem_table_add_col(table, "DB_ROLL_PTR", DATA_SYS,
+ DATA_ROLL_PTR, 0, 0);
+#if DATA_ROLL_PTR != 2
+#error "DATA_ROLL_PTR != 2"
+#endif
- dict_mem_table_add_col(table, (char *) "DB_MIX_ID", DATA_SYS,
+ dict_mem_table_add_col(table, "DB_MIX_ID", DATA_SYS,
DATA_MIX_ID, 0, 0);
- ut_ad(DATA_MIX_ID == 3);
- ut_ad(DATA_N_SYS_COLS == 4); /* This assert reminds that if a new
- system column is added to the program,
- it should be dealt with here */
+#if DATA_MIX_ID != 3
+#error "DATA_MIX_ID != 3"
+#endif
+
+ /* This check reminds that if a new system column is added to
+ the program, it should be dealt with here */
+#if DATA_N_SYS_COLS != 4
+#error "DATA_N_SYS_COLS != 4"
+#endif
/* Look for a table with the same name: error if such exists */
{
@@ -1107,7 +1118,9 @@ dict_table_change_id_in_cache(
dulint new_id) /* in: new id to set */
{
ut_ad(table);
+#ifdef UNIV_SYNC_DEBUG
ut_ad(mutex_own(&(dict_sys->mutex)));
+#endif /* UNIV_SYNC_DEBUG */
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
/* Remove the table from the hash table of id's */
@@ -1973,7 +1986,7 @@ dict_foreign_find(
/*==============*/
/* out: foreign constraint */
dict_table_t* table, /* in: table object */
- char* id) /* in: foreign constraint id */
+ const char* id) /* in: foreign constraint id */
{
dict_foreign_t* foreign;
@@ -2367,7 +2380,7 @@ dict_scan_id(
*id = mem_heap_strdupl(heap, s, len);
} else {
/* no heap given: id will point to source string */
- *id = (char*) s;
+ *id = s;
}
return(ptr);
@@ -2750,7 +2763,7 @@ dict_create_foreign_constraints_low(
ut_ad(mutex_own(&(dict_sys->mutex)));
#endif /* UNIV_SYNC_DEBUG */
- table = dict_table_get_low((char*) name);
+ table = dict_table_get_low(name);
if (table == NULL) {
mutex_enter(&dict_foreign_err_mutex);
@@ -3936,7 +3949,7 @@ Prints a table data when we know the table name. */
void
dict_table_print_by_name(
/*=====================*/
- char* name)
+ const char* name)
{
dict_table_t* table;
diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c
index 071a3b4c684..b55050ee83f 100644
--- a/innobase/dict/dict0load.c
+++ b/innobase/dict/dict0load.c
@@ -51,7 +51,7 @@ dict_get_first_table_name_in_db(
mtr_start(&mtr);
- sys_tables = dict_table_get_low((char *) "SYS_TABLES");
+ sys_tables = dict_table_get_low("SYS_TABLES");
sys_index = UT_LIST_GET_FIRST(sys_tables->indexes);
tuple = dtuple_create(heap, 1);
@@ -127,7 +127,7 @@ dict_print(void)
mtr_start(&mtr);
- sys_tables = dict_table_get_low((char *) "SYS_TABLES");
+ sys_tables = dict_table_get_low("SYS_TABLES");
sys_index = UT_LIST_GET_FIRST(sys_tables->indexes);
btr_pcur_open_at_index_side(TRUE, sys_index, BTR_SEARCH_LEAF, &pcur,
@@ -213,7 +213,7 @@ dict_check_tablespaces_or_store_max_id(
mtr_start(&mtr);
- sys_tables = dict_table_get_low((char *) "SYS_TABLES");
+ sys_tables = dict_table_get_low("SYS_TABLES");
sys_index = UT_LIST_GET_FIRST(sys_tables->indexes);
btr_pcur_open_at_index_side(TRUE, sys_index, BTR_SEARCH_LEAF, &pcur,
@@ -312,7 +312,7 @@ dict_load_columns(
mtr_start(&mtr);
- sys_columns = dict_table_get_low((char*) "SYS_COLUMNS");
+ sys_columns = dict_table_get_low("SYS_COLUMNS");
sys_index = UT_LIST_GET_FIRST(sys_columns->indexes);
tuple = dtuple_create(heap, 1);
@@ -342,7 +342,7 @@ dict_load_columns(
ut_ad(len == 4);
ut_a(i == mach_read_from_4(field));
- ut_a(0 == ut_strcmp((char*) "NAME",
+ ut_a(0 == ut_strcmp("NAME",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_columns), 4))->name));
@@ -368,7 +368,7 @@ dict_load_columns(
field = rec_get_nth_field(rec, 7, &len);
col_len = mach_read_from_4(field);
- ut_a(0 == ut_strcmp((char*) "PREC",
+ ut_a(0 == ut_strcmp("PREC",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_columns), 8))->name));
@@ -438,7 +438,7 @@ dict_load_fields(
mtr_start(&mtr);
- sys_fields = dict_table_get_low((char*) "SYS_FIELDS");
+ sys_fields = dict_table_get_low("SYS_FIELDS");
sys_index = UT_LIST_GET_FIRST(sys_fields->indexes);
tuple = dtuple_create(heap, 1);
@@ -489,7 +489,7 @@ dict_load_fields(
prefix_len = 0;
}
- ut_a(0 == ut_strcmp((char*) "COL_NAME",
+ ut_a(0 == ut_strcmp("COL_NAME",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_fields), 4))->name));
@@ -551,7 +551,7 @@ dict_load_indexes(
mtr_start(&mtr);
- sys_indexes = dict_table_get_low((char*) "SYS_INDEXES");
+ sys_indexes = dict_table_get_low("SYS_INDEXES");
sys_index = UT_LIST_GET_FIRST(sys_indexes->indexes);
tuple = dtuple_create(heap, 1);
@@ -594,7 +594,7 @@ dict_load_indexes(
ut_ad(len == 8);
id = mach_read_from_8(field);
- ut_a(0 == ut_strcmp((char*) "NAME",
+ ut_a(0 == ut_strcmp("NAME",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_indexes), 4))->name));
@@ -611,7 +611,7 @@ dict_load_indexes(
field = rec_get_nth_field(rec, 7, &len);
space = mach_read_from_4(field);
- ut_a(0 == ut_strcmp((char*) "PAGE_NO",
+ ut_a(0 == ut_strcmp("PAGE_NO",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_indexes), 8))->name));
@@ -654,7 +654,7 @@ dict_load_indexes(
&& ((type & DICT_CLUSTERED)
|| ((table == dict_sys->sys_tables)
&& (name_len == (sizeof "ID_IND") - 1)
- && (0 == ut_memcmp(name_buf, (char*) "ID_IND",
+ && (0 == ut_memcmp(name_buf, "ID_IND",
name_len))))) {
/* The index was created in memory already at booting
@@ -721,7 +721,7 @@ dict_load_table(
mtr_start(&mtr);
- sys_tables = dict_table_get_low((char *) "SYS_TABLES");
+ sys_tables = dict_table_get_low("SYS_TABLES");
sys_index = UT_LIST_GET_FIRST(sys_tables->indexes);
tuple = dtuple_create(heap, 1);
@@ -757,7 +757,7 @@ dict_load_table(
return(NULL);
}
- ut_a(0 == ut_strcmp((char *) "SPACE",
+ ut_a(0 == ut_strcmp("SPACE",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_tables), 9))->name));
@@ -782,7 +782,7 @@ dict_load_table(
}
}
- ut_a(0 == ut_strcmp((char *) "N_COLS",
+ ut_a(0 == ut_strcmp("N_COLS",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_tables), 4))->name));
@@ -794,7 +794,7 @@ dict_load_table(
table->ibd_file_missing = ibd_file_missing;
- ut_a(0 == ut_strcmp((char *) "ID",
+ ut_a(0 == ut_strcmp("ID",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_tables), 3))->name));
@@ -983,7 +983,7 @@ static
void
dict_load_foreign_cols(
/*===================*/
- char* id, /* in: foreign constraint id as a null-
+ const char* id, /* in: foreign constraint id as a null-
terminated string */
dict_foreign_t* foreign)/* in: foreign constraint object */
{
@@ -1009,7 +1009,7 @@ dict_load_foreign_cols(
foreign->n_fields * sizeof(void*));
mtr_start(&mtr);
- sys_foreign_cols = dict_table_get_low((char *) "SYS_FOREIGN_COLS");
+ sys_foreign_cols = dict_table_get_low("SYS_FOREIGN_COLS");
sys_index = UT_LIST_GET_FIRST(sys_foreign_cols->indexes);
tuple = dtuple_create(foreign->heap, 1);
@@ -1056,9 +1056,9 @@ static
ulint
dict_load_foreign(
/*==============*/
- /* out: DB_SUCCESS or error code */
- char* id) /* in: foreign constraint id as a null-terminated
- string */
+ /* out: DB_SUCCESS or error code */
+ const char* id) /* in: foreign constraint id as a
+ null-terminated string */
{
dict_foreign_t* foreign;
dict_table_t* sys_foreign;
@@ -1081,7 +1081,7 @@ dict_load_foreign(
mtr_start(&mtr);
- sys_foreign = dict_table_get_low((char *) "SYS_FOREIGN");
+ sys_foreign = dict_table_get_low("SYS_FOREIGN");
sys_index = UT_LIST_GET_FIRST(sys_foreign->indexes);
tuple = dtuple_create(heap2, 1);
@@ -1207,7 +1207,7 @@ dict_load_foreigns(
ut_ad(mutex_own(&(dict_sys->mutex)));
#endif /* UNIV_SYNC_DEBUG */
- sys_foreign = dict_table_get_low((char *) "SYS_FOREIGN");
+ sys_foreign = dict_table_get_low("SYS_FOREIGN");
if (sys_foreign == NULL) {
/* No foreign keys defined yet in this database */