diff options
author | unknown <marko@hundin.mysql.fi> | 2004-05-27 15:27:43 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-05-27 15:27:43 +0300 |
commit | a1bcf38257fcb124b1ed8432137d82aed95da32d (patch) | |
tree | 566268309e7e64b4e2f6a23700e7b8623521cbbd /innobase/dict/dict0load.c | |
parent | d366a2e4c97155d5ea10a7da084d188d7e42222c (diff) | |
download | mariadb-git-a1bcf38257fcb124b1ed8432137d82aed95da32d.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
innobase/btr/btr0cur.c:
Cast away constness from dfield_get_data() result
innobase/buf/buf0buf.c:
Enclose a debug assertion in #ifdef UNIV_SYNC_DEBUG
innobase/buf/buf0rea.c:
Corrected compile error #ifdef UNIV_DEBUG
innobase/dict/dict0boot.c:
Remove (char*) casts of string constants
innobase/dict/dict0crea.c:
Remove (char*) casts of string constants
innobase/dict/dict0dict.c:
Enclosed a debug assertion in #ifdef UNIV_SYNC_DEBUG
Replaced some debug assertions with preprocessor tests
Add const qualifiers to string constants
innobase/dict/dict0load.c:
Remove (char*) casts of string constants
innobase/fil/fil0fil.c:
Remove (char*) casts of string constants
Enclose debug assertions in #ifdef UNIV_SYNC_DEBUG
innobase/ha/ha0ha.c:
Enclose debug assertion in #ifdef UNIV_SYNC_DEBUG
innobase/ibuf/ibuf0ibuf.c:
Remove (char*) casts of string constants
innobase/include/buf0buf.ic:
Add const qualifier to string parameter
innobase/include/fil0fil.h:
Disable log archiving code unless #ifdef UNIV_LOG_ARCHIVE
innobase/include/log0recv.h:
Disable log archiving code unless #ifdef UNIV_LOG_ARCHIVE
Enclose ibbackup specific code in #ifdef UNIV_HOTBACKUP
innobase/include/mem0dbg.ic:
Add const qualifiers to string parameters
innobase/include/srv0srv.h:
Add const qualifiers to string constants
Enclose srv_arch_dir and srv_log_archive_on #ifdef UNIV_LOG_ARCHIVE
innobase/include/sync0rw.ic:
Add const qualifier to string parameter
innobase/include/sync0sync.ic:
Add const qualifier to string parameter
innobase/log/log0log.c:
Enclose log archiving code in #ifdef UNIV_LOG_ARCHIVE
Do not cast string constants to (char*)
innobase/log/log0recv.c:
Enclose ibbackup specific code in #ifdef UNIV_HOTBACKUP
Enclose disabled log code in #ifdef UNIV_LOG_REPLICATE or UNIV_LOG_ARCHIVE
innobase/mem/mem0dbg.c:
Add const qualifiers to string parameters
innobase/page/page0page.c:
Remove (char*) casts of string constants
innobase/pars/pars0pars.c:
Add const qualifier to string variable
innobase/row/row0ins.c:
Remove (char*) casts of string constants
Add const qualifiers to string parameters
row_ins_foreign_check_on_constraint(): Allocate table_name dynamically
innobase/row/row0mysql.c:
Remove (char*) casts of string constants
innobase/row/row0sel.c:
Remove (char*) casts of string constants
innobase/srv/srv0srv.c:
Remove (char*) casts of string constants
Disable log archiving variables unless #ifdef UNIV_LOG_ARCHIVE
innobase/srv/srv0start.c:
Disable log archiving code unless #ifdef UNIV_LOG_ARCHIVE
Remove (char*) casts of string constants
innobase/sync/sync0rw.c:
Remove (char*) casts of string constants
Add const qualifier to string parameter
innobase/sync/sync0sync.c:
Remove (char*) cast of string constant
Add const qualifier to string parameter
innobase/trx/trx0roll.c:
Remove (char*) cast of string constants
innobase/trx/trx0sys.c:
Remove (char*) cast of string constants
innobase/trx/trx0trx.c:
Remove (char*) cast of string constant
sql/ha_innodb.cc:
Enclose log archiving code in #ifdef UNIV_LOG_ARCHIVE
Diffstat (limited to 'innobase/dict/dict0load.c')
-rw-r--r-- | innobase/dict/dict0load.c | 46 |
1 files changed, 23 insertions, 23 deletions
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 */ |