summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-08-03 23:09:43 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2015-08-03 23:09:43 +0300
commit9a5787db51ef571e2beaeda1402cf7578c95eaf6 (patch)
tree3dc0e3cfc17077929d701b1e3701c7c9f92f7aa7 /storage/innobase/include
parent4188ba9c1e0ea195adf00d9e6d11b29ef18b2109 (diff)
parent96badb16afcf8a6ae3d03918419fc51ace4be236 (diff)
downloadmariadb-git-9a5787db51ef571e2beaeda1402cf7578c95eaf6.tar.gz
Merge commit '96badb16afcf' into 10.0
Conflicts: client/mysql_upgrade.c mysql-test/r/func_misc.result mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result mysql-test/suite/innodb/r/innodb-fk.result mysql-test/t/subselect_sj_mat.test sql/item.cc sql/item_func.cc sql/log.cc sql/log_event.cc sql/rpl_utility.cc sql/slave.cc sql/sql_class.cc sql/sql_class.h sql/sql_select.cc storage/innobase/dict/dict0crea.c storage/innobase/dict/dict0dict.c storage/innobase/handler/ha_innodb.cc storage/xtradb/dict/dict0crea.c storage/xtradb/dict/dict0dict.c storage/xtradb/handler/ha_innodb.cc vio/viosslfactories.c
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/dict0crea.h22
-rw-r--r--storage/innobase/include/dict0dict.h19
-rw-r--r--storage/innobase/include/ha_prototypes.h9
3 files changed, 48 insertions, 2 deletions
diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h
index 67eab9058da..5628af6eb4d 100644
--- a/storage/innobase/include/dict0crea.h
+++ b/storage/innobase/include/dict0crea.h
@@ -110,6 +110,17 @@ UNIV_INTERN
dberr_t
dict_create_or_check_foreign_constraint_tables(void);
/*================================================*/
+
+/********************************************************************//**
+Construct foreign key constraint defintion from data dictionary information.
+*/
+UNIV_INTERN
+char*
+dict_foreign_def_get(
+/*=================*/
+ dict_foreign_t* foreign,/*!< in: foreign */
+ trx_t* trx); /*!< in: trx */
+
/********************************************************************//**
Generate a foreign key constraint name when it was not named by the user.
A generated constraint has a name of the format dbname/tablename_ibfk_NUMBER,
@@ -174,11 +185,22 @@ UNIV_INTERN
dberr_t
dict_create_add_foreign_to_dictionary(
/*==================================*/
+ dict_table_t* table, /*!< in: table */
const char* name, /*!< in: table name */
const dict_foreign_t* foreign,/*!< in: foreign key */
trx_t* trx) /*!< in/out: dictionary transaction */
__attribute__((nonnull, warn_unused_result));
+/********************************************************************//**
+Construct foreign key constraint defintion from data dictionary information.
+*/
+UNIV_INTERN
+char*
+dict_foreign_def_get(
+/*=================*/
+ dict_foreign_t* foreign,/*!< in: foreign */
+ trx_t* trx); /*!< in: trx */
+
/* Table create node structure */
struct tab_node_t{
que_common_t common; /*!< node type: QUE_NODE_TABLE_CREATE */
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
index 9e007809471..ef7b6580134 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -580,10 +580,18 @@ dict_foreign_find_index(
/*!< in: whether to check
charsets. only has an effect
if types_idx != NULL */
- ulint check_null)
+ ulint check_null,
/*!< in: nonzero if none of
the columns must be declared
NOT NULL */
+ ulint* error, /*!< out: error code */
+ ulint* err_col_no,
+ /*!< out: column number where
+ error happened */
+ dict_index_t** err_index)
+ /*!< out: index where error
+ happened */
+
__attribute__((nonnull(1,3), warn_unused_result));
/**********************************************************************//**
Returns a column's name.
@@ -675,10 +683,17 @@ dict_foreign_qualify_index(
/*!< in: whether to check
charsets. only has an effect
if types_idx != NULL */
- ulint check_null)
+ ulint check_null,
/*!< in: nonzero if none of
the columns must be declared
NOT NULL */
+ ulint* error, /*!< out: error code */
+ ulint* err_col_no,
+ /*!< out: column number where
+ error happened */
+ dict_index_t** err_index)
+ /*!< out: index where error
+ happened */
__attribute__((nonnull(1,3), warn_unused_result));
#ifdef UNIV_DEBUG
/********************************************************************//**
diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h
index 20409f85e0c..eef36110999 100644
--- a/storage/innobase/include/ha_prototypes.h
+++ b/storage/innobase/include/ha_prototypes.h
@@ -615,5 +615,14 @@ innobase_convert_to_filename_charset(
const char* from, /* in: identifier to convert */
ulint len); /* in: length of 'to', in bytes */
+/********************************************************************//**
+Helper function to push warnings from InnoDB internals to SQL-layer. */
+UNIV_INTERN
+void
+ib_push_warning(
+ trx_t* trx, /*!< in: trx */
+ ulint error, /*!< in: error code to push as warning */
+ const char *format,/*!< in: warning message */
+ ...);
#endif /* HA_INNODB_PROTOTYPES_H */