diff options
author | unknown <marko@hundin.mysql.fi> | 2004-05-17 14:40:31 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-05-17 14:40:31 +0300 |
commit | 6b237533f1baae131e192ccbafcfcfaef13f4fc0 (patch) | |
tree | 17e1fcb0d47194292389b6b6d5d0b78c2695e328 /innobase/include/fil0fil.h | |
parent | 1915bfebcb9005102c72028221bb89aa5f0204e4 (diff) | |
download | mariadb-git-6b237533f1baae131e192ccbafcfcfaef13f4fc0.tar.gz |
InnoDB cleanup: Add const qualifiers to many char* arguments
innobase/dict/dict0dict.c:
Replace char* arguments with const char*
innobase/dict/dict0load.c:
Replace char* arguments with const char*
innobase/dict/dict0mem.c:
Replace char* arguments with const char*
innobase/fil/fil0fil.c:
Replace char* arguments with const char*
innobase/include/data0data.h:
dfield_set_data(): add const qualifier
innobase/include/data0data.ic:
dfield_set_data(): add const qualifier
(temporarily shut up compiler warnings)
innobase/include/dict0dict.h:
Replace char* arguments with const char*
innobase/include/dict0dict.ic:
Replace char* arguments with const char*
innobase/include/dict0load.h:
Replace char* arguments with const char*
innobase/include/dict0mem.h:
Replace char* arguments with const char*
innobase/include/fil0fil.h:
Replace char* arguments with const char*
innobase/include/os0file.h:
Replace char* arguments with const char*
innobase/include/os0sync.h:
Replace char* arguments with const char*
innobase/include/pars0pars.h:
Replace char* arguments with const char*
innobase/include/pars0sym.h:
Replace char* arguments with const char*
innobase/include/row0mysql.h:
Replace char* arguments with const char*
innobase/include/row0sel.h:
Replace char* arguments with const char*
innobase/include/trx0roll.h:
Replace char* arguments with const char*
innobase/include/trx0sys.h:
Replace char* arguments with const char*
innobase/include/trx0trx.h:
Replace char* arguments with const char*
innobase/include/ut0rnd.h:
Replace char* arguments with const char*
innobase/include/ut0rnd.ic:
Replace char* arguments with const char*
innobase/include/ut0ut.h:
Remove unused function ut_printf()
innobase/os/os0file.c:
Replace char* arguments with const char*
innobase/os/os0sync.c:
Replace char* arguments with const char*
innobase/pars/pars0pars.c:
Replace char* arguments with const char*
innobase/pars/pars0sym.c:
Use mem_heap_strdupl() instead of mem_heap_alloc() and memcpy()
innobase/row/row0mysql.c:
Replace char* arguments with const char*
innobase/row/row0sel.c:
Replace char* arguments with const char*
innobase/trx/trx0roll.c:
Replace char* arguments with const char*
innobase/trx/trx0sys.c:
Replace char* arguments with const char*
Diffstat (limited to 'innobase/include/fil0fil.h')
-rw-r--r-- | innobase/include/fil0fil.h | 104 |
1 files changed, 55 insertions, 49 deletions
diff --git a/innobase/include/fil0fil.h b/innobase/include/fil0fil.h index f7cdeb7f195..b750e9b38f2 100644 --- a/innobase/include/fil0fil.h +++ b/innobase/include/fil0fil.h @@ -132,11 +132,12 @@ Appends a new file to the chain of files of a space. File must be closed. */ void fil_node_create( /*============*/ - char* name, /* in: file name (file must be closed) */ - ulint size, /* in: file size in database blocks, rounded downwards - to an integer */ - ulint id, /* in: space id where to append */ - ibool is_raw);/* in: TRUE if a raw device or a raw disk partition */ + const char* name, /* in: file name (file must be closed) */ + ulint size, /* in: file size in database blocks, rounded + downwards to an integer */ + ulint id, /* in: space id where to append */ + ibool is_raw);/* in: TRUE if a raw device or + a raw disk partition */ /******************************************************************** Drops files from the start of a file space, so that its size is cut by the amount given. */ @@ -155,10 +156,10 @@ there is an error, prints an error message to the .err log. */ ibool fil_space_create( /*=============*/ - /* out: TRUE if success */ - char* name, /* in: space name */ - ulint id, /* in: space id */ - ulint purpose);/* in: FIL_TABLESPACE, or FIL_LOG if log */ + /* out: TRUE if success */ + const char* name, /* in: space name */ + ulint id, /* in: space id */ + ulint purpose);/* in: FIL_TABLESPACE, or FIL_LOG if log */ /*********************************************************************** Frees a space object from a the tablespace memory cache. Closes the files in the chain but does not delete them. */ @@ -327,14 +328,15 @@ tablespace memory cache. */ ibool fil_rename_tablespace( /*==================*/ - /* out: TRUE if success */ - char* old_name, /* in: old table name in the standard - databasename/tablename format of InnoDB, or - NULL if we do the rename based on the space - id only */ - ulint id, /* in: space id */ - char* new_name); /* in: new table name in the standard - databasename/tablename format of InnoDB */ + /* out: TRUE if success */ + const char* old_name, /* in: old table name in the standard + databasename/tablename format of + InnoDB, or NULL if we do the rename + based on the space id only */ + ulint id, /* in: space id */ + const char* new_name); /* in: new table name in the standard + databasename/tablename format + of InnoDB */ /*********************************************************************** Creates a new single-table tablespace to a database directory of MySQL. Database directories are under the 'datadir' of MySQL. The datadir is the @@ -344,14 +346,16 @@ path '.'. */ ulint fil_create_new_single_table_tablespace( /*===================================*/ - /* out: DB_SUCCESS or error code */ - ulint* space_id, /* in/out: space id; if this is != 0, then - this is an input parameter, otherwise - output */ - char* tablename, /* in: the table name in the usual - databasename/tablename format of InnoDB */ - ulint size); /* in: the initial size of the tablespace file - in pages, must be > 0 */ + /* out: DB_SUCCESS or error code */ + ulint* space_id, /* in/out: space id; if this is != 0, + then this is an input parameter, + otherwise output */ + const char* tablename, /* in: the table name in the usual + databasename/tablename format + of InnoDB */ + ulint size); /* in: the initial size of the + tablespace file in pages, + must be >= FIL_IBD_FILE_INITIAL_SIZE */ /************************************************************************ Tries to open a single-table tablespace and checks the space id is right in it. If does not succeed, prints an error message to the .err log. This @@ -362,10 +366,10 @@ protection of the dictionary mutex, so that two users cannot race here. */ ibool fil_open_single_table_tablespace( /*=============================*/ - /* out: TRUE if success */ - ulint id, /* in: space id */ - char* name); /* in: table name in the databasename/tablename - format */ + /* out: TRUE if success */ + ulint id, /* in: space id */ + const char* name); /* in: table name in the + databasename/tablename format */ /************************************************************************ It is possible, though very improbable, that the lsn's in the tablespace to be imported have risen above the current system lsn, if a lengthy purge, ibuf @@ -379,12 +383,12 @@ lsn's just by looking at that flush lsn. */ ibool fil_reset_too_high_lsns( /*====================*/ - /* out: TRUE if success */ - char* name, /* in: table name in the databasename/tablename - format */ - dulint current_lsn); /* in: reset lsn's if the lsn stamped to - FIL_PAGE_FILE_FLUSH_LSN in the first page is - too high */ + /* out: TRUE if success */ + const char* name, /* in: table name in the + databasename/tablename format */ + dulint current_lsn); /* in: reset lsn's if the lsn stamped + to FIL_PAGE_FILE_FLUSH_LSN in the + first page is too high */ /************************************************************************ At the server startup, if we need crash recovery, scans the database directories under the MySQL datadir, looking for .ibd files. Those files are @@ -436,20 +440,22 @@ there may be many tablespaces which are not yet in the memory cache. */ ibool fil_space_for_table_exists_in_mem( /*==============================*/ - /* out: TRUE if a matching tablespace - exists in the memory cache */ - ulint id, /* in: space id */ - char* name, /* in: table name in the standard - 'databasename/tablename' format */ - ibool mark_space, /* in: in crash recovery, at database startup - we mark all spaces which have an associated - table in the InnoDB data dictionary, so that - we can print a warning about orphaned - tablespaces */ - ibool print_error_if_does_not_exist); - /* in: print detailed error information to - the .err log if a matching tablespace is - not found from memory */ + /* out: TRUE if a matching tablespace + exists in the memory cache */ + ulint id, /* in: space id */ + const char* name, /* in: table name in the standard + 'databasename/tablename' format */ + ibool mark_space, /* in: in crash recovery, at database + startup we mark all spaces which have + an associated table in the InnoDB + data dictionary, so that + we can print a warning about orphaned + tablespaces */ + ibool print_error_if_does_not_exist); + /* in: print detailed error + information to the .err log if a + matching tablespace is not found from + memory */ /************************************************************************** Tries to extend a data file so that it would accommodate the number of pages given. The tablespace must be cached in the memory cache. If the space is big |