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/trx | |
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/trx')
-rw-r--r-- | innobase/trx/trx0roll.c | 16 | ||||
-rw-r--r-- | innobase/trx/trx0sys.c | 4 | ||||
-rw-r--r-- | innobase/trx/trx0trx.c | 12 |
3 files changed, 16 insertions, 16 deletions
diff --git a/innobase/trx/trx0roll.c b/innobase/trx/trx0roll.c index 4343249764e..8b8a079bb7f 100644 --- a/innobase/trx/trx0roll.c +++ b/innobase/trx/trx0roll.c @@ -116,11 +116,11 @@ trx_rollback_for_mysql( return(DB_SUCCESS); } - trx->op_info = (char *) "rollback"; + trx->op_info = "rollback"; err = trx_general_rollback_for_mysql(trx, FALSE, NULL); - trx->op_info = (char *) ""; + trx->op_info = ""; return(err); } @@ -141,14 +141,14 @@ trx_rollback_last_sql_stat_for_mysql( return(DB_SUCCESS); } - trx->op_info = (char *) "rollback of SQL statement"; + trx->op_info = "rollback of SQL statement"; err = trx_general_rollback_for_mysql(trx, TRUE, &(trx->last_sql_stat_start)); /* The following call should not be needed, but we play safe: */ trx_mark_sql_stat_end(trx); - trx->op_info = (char *) ""; + trx->op_info = ""; return(err); } @@ -239,7 +239,7 @@ trx_rollback_to_savepoint_for_mysql( *mysql_binlog_cache_pos = savep->mysql_binlog_cache_pos; - trx->op_info = (char *) "rollback to a savepoint"; + trx->op_info = "rollback to a savepoint"; err = trx_general_rollback_for_mysql(trx, TRUE, &(savep->savept)); @@ -248,7 +248,7 @@ trx_rollback_to_savepoint_for_mysql( trx_mark_sql_stat_end(trx); - trx->op_info = (char *) ""; + trx->op_info = ""; return(err); } @@ -343,7 +343,7 @@ trx_rollback_or_clean_all_without_sess(void) trx_t* trx; dict_table_t* table; ib_longlong rows_to_undo; - char* unit = (char*)""; + const char* unit = ""; int err; mutex_enter(&kernel_mutex); @@ -421,7 +421,7 @@ loop: rows_to_undo = trx_roll_max_undo_no; if (rows_to_undo > 1000000000) { rows_to_undo = rows_to_undo / 1000000; - unit = (char*)"M"; + unit = "M"; } fprintf(stderr, diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c index 7e35e34f014..b377bdb9809 100644 --- a/innobase/trx/trx0sys.c +++ b/innobase/trx/trx0sys.c @@ -832,7 +832,7 @@ trx_sys_init_at_db_start(void) { trx_sysf_t* sys_header; ib_longlong rows_to_undo = 0; - char* unit = (char*)""; + const char* unit = ""; trx_t* trx; mtr_t mtr; @@ -881,7 +881,7 @@ trx_sys_init_at_db_start(void) } if (rows_to_undo > 1000000000) { - unit = (char*)"M"; + unit = "M"; rows_to_undo = rows_to_undo / 1000000; } diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index 862229ef032..afef08dc100 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -81,7 +81,7 @@ trx_create( trx->magic_n = TRX_MAGIC_N; - trx->op_info = (char *) ""; + trx->op_info = ""; trx->type = TRX_USER; trx->conc_state = TRX_NOT_STARTED; @@ -107,7 +107,7 @@ trx_create( trx->mysql_log_file_name = NULL; trx->mysql_log_offset = 0; - trx->mysql_master_log_file_name = (char*)""; + trx->mysql_master_log_file_name = ""; trx->mysql_master_log_pos = 0; mutex_create(&(trx->undo_mutex)); @@ -1394,7 +1394,7 @@ trx_commit_for_mysql( ut_a(trx); - trx->op_info = (char *) "committing"; + trx->op_info = "committing"; trx_start_if_not_started(trx); @@ -1404,7 +1404,7 @@ trx_commit_for_mysql( mutex_exit(&kernel_mutex); - trx->op_info = (char *) ""; + trx->op_info = ""; return(0); } @@ -1423,7 +1423,7 @@ trx_commit_complete_for_mysql( ut_a(trx); - trx->op_info = (char*)"flushing log"; + trx->op_info = "flushing log"; if (srv_flush_log_at_trx_commit == 0) { /* Do nothing */ @@ -1447,7 +1447,7 @@ trx_commit_complete_for_mysql( ut_error; } - trx->op_info = (char*)""; + trx->op_info = ""; return(0); } |