summaryrefslogtreecommitdiff
path: root/innobase/include/dict0dict.h
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2004-04-26 15:53:31 +0300
committerunknown <monty@mishka.local>2004-04-26 15:53:31 +0300
commit1065f2bbd66ac4b1161f5c188171a54cbad5b422 (patch)
tree25e3315af05fa92d20d2ad1d812882957c400337 /innobase/include/dict0dict.h
parent0ba6cb48d84f1ff951d09871a96be6cdef3f2c3c (diff)
parent6366a9090c7fc24f0e13b5b9d73d6777dcda9d9e (diff)
downloadmariadb-git-1065f2bbd66ac4b1161f5c188171a54cbad5b422.tar.gz
Merge with 4.0
innobase/dict/dict0boot.c: Auto merged innobase/dict/dict0load.c: Auto merged innobase/dict/dict0mem.c: Auto merged innobase/fut/fut0lst.c: Auto merged innobase/include/buf0lru.h: Auto merged innobase/include/dict0mem.h: Auto merged innobase/include/fsp0fsp.h: Auto merged innobase/include/ha0ha.h: Auto merged innobase/include/ibuf0ibuf.h: Auto merged innobase/include/lock0lock.h: Auto merged innobase/include/log0log.h: Auto merged innobase/include/mem0pool.h: Auto merged innobase/include/mtr0mtr.h: Auto merged innobase/include/os0file.h: Auto merged innobase/include/rem0rec.h: Auto merged innobase/include/rem0rec.ic: Auto merged innobase/include/srv0srv.h: Auto merged innobase/include/sync0sync.h: Auto merged innobase/include/trx0sys.h: Auto merged innobase/include/ut0byte.h: Auto merged innobase/include/ut0ut.h: Auto merged innobase/mem/mem0pool.c: Auto merged innobase/mtr/mtr0mtr.c: Auto merged innobase/os/os0proc.c: Auto merged innobase/pars/lexyy.c: Auto merged innobase/pars/pars0opt.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0purge.c: Auto merged innobase/row/row0uins.c: Auto merged innobase/row/row0umod.c: Auto merged innobase/row/row0undo.c: Auto merged innobase/row/row0upd.c: Auto merged innobase/trx/trx0purge.c: Auto merged innobase/trx/trx0roll.c: Auto merged innobase/trx/trx0sys.c: Auto merged innobase/trx/trx0undo.c: Auto merged innobase/ut/ut0byte.c: Auto merged pstack/bucomm.h: Auto merged pstack/budbg.h: Auto merged sql/item_sum.h: Auto merged sql/slave.cc: Auto merged sql/sql_db.cc: Auto merged support-files/mysql.spec.sh: Auto merged tests/insert_test.c: Auto merged mysql-test/t/func_group.test: Merge with 4.0 Put 4.1 tests lasts sql/ha_innodb.cc: Merge with 4.0 Added checking of results from my_malloc() BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'innobase/include/dict0dict.h')
-rw-r--r--innobase/include/dict0dict.h111
1 files changed, 44 insertions, 67 deletions
diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h
index 688685cff8b..98636f6e1cb 100644
--- a/innobase/include/dict0dict.h
+++ b/innobase/include/dict0dict.h
@@ -32,20 +32,21 @@ Get the database name length in a table name. */
ulint
dict_get_db_name_len(
/*=================*/
- /* out: database name length */
- char* name); /* in: table name in the form dbname '/' tablename */
+ /* out: database name length */
+ const char* name); /* in: table name in the form
+ dbname '/' tablename */
/*************************************************************************
Accepts a specified string. Comparisons are case-insensitive. */
-char*
+const char*
dict_accept(
/*========*/
- /* out: if string was accepted, the pointer
- is moved after that, else ptr is returned */
- char* ptr, /* in: scan from this */
- const char* string,/* in: accept only this string as the next
- non-whitespace string */
- ibool* success);/* out: TRUE if accepted */
+ /* out: if string was accepted, the pointer
+ is moved after that, else ptr is returned */
+ const char* ptr, /* in: scan from this */
+ const char* string, /* in: accept only this string as the next
+ non-whitespace string */
+ ibool* success);/* out: TRUE if accepted */
/************************************************************************
Decrements the count of open MySQL handles to a table. */
@@ -69,41 +70,6 @@ database directories. */
void
dict_load_space_id_list(void);
/*=========================*/
-/**************************************************************************
-Returns a stored procedure object and memoryfixes it. */
-UNIV_INLINE
-dict_proc_t*
-dict_procedure_get(
-/*===============*/
- /* out: procedure, NULL if does not exist */
- char* proc_name, /* in: table name */
- trx_t* trx); /* in: transaction handle or NULL */
-/**************************************************************************
-Adds a stored procedure object to the dictionary cache. */
-
-void
-dict_procedure_add_to_cache(
-/*========================*/
- dict_proc_t* proc); /* in: procedure */
-/**************************************************************************
-Reserves a parsed copy of a stored procedure to execute. If there are no
-free parsed copies left at the moment, parses a new copy. Takes the copy off
-the list of copies: the copy must be returned there with
-dict_procedure_release_parsed_copy. */
-
-que_t*
-dict_procedure_reserve_parsed_copy(
-/*===============================*/
- /* out: the query graph */
- dict_proc_t* proc); /* in: dictionary procedure node */
-/**************************************************************************
-Releases a parsed copy of an executed stored procedure. Puts the copy to the
-list of copies. */
-
-void
-dict_procedure_release_parsed_copy(
-/*===============================*/
- que_t* graph); /* in: query graph of a stored procedure */
/*************************************************************************
Gets the column data type. */
UNIV_INLINE
@@ -270,7 +236,7 @@ dict_foreign_parse_drop_constraints(
dict_table_t* table, /* in: table */
ulint* n, /* out: number of constraints
to drop */
- char*** constraints_to_drop); /* out: id's of the
+ const char*** constraints_to_drop); /* out: id's of the
constraints to drop */
/**************************************************************************
Returns a table object and memoryfixes it. NOTE! This is a high-level
@@ -354,18 +320,19 @@ dict_table_get_index_noninline(
dict_table_t* table, /* in: table */
char* name); /* in: index name */
/**************************************************************************
-Prints a table definition. */
+Prints a table data. */
void
-dict_table_print(
-/*=============*/
+dict_table_print_low(
+/*=================*/
dict_table_t* table); /* in: table */
+#ifdef UNIV_DEBUG
/**************************************************************************
-Prints a table data. */
+Prints a table definition. */
void
-dict_table_print_low(
-/*=================*/
+dict_table_print(
+/*=============*/
dict_table_t* table); /* in: table */
/**************************************************************************
Prints a table data when we know the table name. */
@@ -374,8 +341,9 @@ void
dict_table_print_by_name(
/*=====================*/
char* name);
+#endif /* UNIV_DEBUG */
/**************************************************************************
-Sprintfs to a string info on foreign keys of a table. */
+Outputs info on foreign keys of a table. */
void
dict_print_info_on_foreign_keys(
@@ -384,19 +352,23 @@ dict_print_info_on_foreign_keys(
a format suitable to be inserted into
a CREATE TABLE, otherwise in the format
of SHOW TABLE STATUS */
- char* str, /* in/out: pointer to a string */
- ulint len, /* in: space in str available for info */
+ FILE* file, /* in: file where to print */
dict_table_t* table); /* in: table */
/**************************************************************************
-Sprintfs to a string info on a foreign key of a table in a format suitable
-for CREATE TABLE. */
-
-char*
+Outputs info on a foreign key of a table in a format suitable for
+CREATE TABLE. */
+void
dict_print_info_on_foreign_key_in_create_format(
/*============================================*/
- /* out: how far in buf we printed */
- dict_foreign_t* foreign,/* in: foreign key constraint */
- char* buf); /* in: buffer of at least 5000 bytes */
+ FILE* file, /* in: file where to print */
+ dict_foreign_t* foreign);/* in: foreign key constraint */
+/************************************************************************
+Displays the names of the index and the table. */
+void
+dict_index_name_print(
+/*==================*/
+ FILE* file, /* in: output stream */
+ const dict_index_t* index); /* in: index to print */
/************************************************************************
Gets the first index on the table (the clustered index). */
UNIV_INLINE
@@ -899,14 +871,21 @@ Releases the dictionary system mutex for MySQL. */
void
dict_mutex_exit_for_mysql(void);
/*===========================*/
+/************************************************************************
+Checks if the database name in two table names is the same. */
-/* The following len must be at least 10000 bytes! */
-#define DICT_FOREIGN_ERR_BUF_LEN 10000
+ibool
+dict_tables_have_same_db(
+/*=====================*/
+ /* out: TRUE if same db name */
+ const char* name1, /* in: table name in the form
+ dbname '/' tablename */
+ const char* name2); /* in: table name in the form
+ dbname '/' tablename */
/* Buffers for storing detailed information about the latest foreign key
and unique key errors */
-extern char* dict_foreign_err_buf;
-extern char* dict_unique_err_buf;
+extern FILE* dict_foreign_err_file;
extern mutex_t dict_foreign_err_mutex; /* mutex protecting the buffers */
extern dict_sys_t* dict_sys; /* the dictionary system */
@@ -932,8 +911,6 @@ struct dict_sys_struct{
hash_table_t* table_id_hash; /* hash table of the tables, based
on id */
hash_table_t* col_hash; /* hash table of the columns */
- hash_table_t* procedure_hash; /* hash table of the stored
- procedures */
UT_LIST_BASE_NODE_T(dict_table_t)
table_LRU; /* LRU list of tables */
ulint size; /* varying space in bytes occupied