summaryrefslogtreecommitdiff
path: root/innobase/include
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2005-12-12 21:06:59 +0300
committerunknown <aivanov@mysql.com>2005-12-12 21:06:59 +0300
commit8e3f95b555c4ed94bb5c1720969a060d20ed6536 (patch)
tree35392e37ca8b9a00df52afbe11acee443b2f1edb /innobase/include
parent5aeb69296a4e134f0215da3e6bcce4956b7d76ad (diff)
downloadmariadb-git-8e3f95b555c4ed94bb5c1720969a060d20ed6536.tar.gz
Fix BUG#12071: "Windows hang: 'Opening tables' or 'Waiting for
table' lockup". Changes from the innodb-4.1-ss11 snapshot. Do not call os_file-create_tmpfile() at runtime. Instead, create a tempfile at startup and guard access to it with a mutex. Also, fix bugs: 10511: "Wrong padding of UCS2 CHAR columns in ON UPDATE CASCADE"; 13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs". When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between foreign key references are compatible. Also, added test cases (also for bug 9802). innobase/dict/dict0dict.c: Changes from the innodb-4.1-ss11 snapshot innobase/dict/dict0load.c: Changes from the innodb-4.1-ss11 snapshot innobase/include/dict0dict.h: Changes from the innodb-4.1-ss11 snapshot innobase/include/dict0load.h: Changes from the innodb-4.1-ss11 snapshot innobase/include/os0file.h: Changes from the innodb-4.1-ss11 snapshot innobase/include/rem0cmp.h: Changes from the innodb-4.1-ss11 snapshot innobase/include/srv0srv.h: Changes from the innodb-4.1-ss11 snapshot innobase/rem/rem0cmp.c: Changes from the innodb-4.1-ss11 snapshot innobase/row/row0ins.c: Changes from the innodb-4.1-ss11 snapshot innobase/row/row0mysql.c: Changes from the innodb-4.1-ss11 snapshot innobase/srv/srv0srv.c: Changes from the innodb-4.1-ss11 snapshot innobase/srv/srv0start.c: Changes from the innodb-4.1-ss11 snapshot libmysqld/ha_blackhole.cc: Changes from the innodb-4.1-ss11 snapshot mysql-test/r/innodb.result: Changes from the innodb-4.1-ss11 snapshot mysql-test/t/innodb.test: Changes from the innodb-4.1-ss11 snapshot sql/ha_innodb.cc: Changes from the innodb-4.1-ss11 snapshot
Diffstat (limited to 'innobase/include')
-rw-r--r--innobase/include/dict0dict.h3
-rw-r--r--innobase/include/dict0load.h3
-rw-r--r--innobase/include/os0file.h2
-rw-r--r--innobase/include/rem0cmp.h3
-rw-r--r--innobase/include/srv0srv.h6
5 files changed, 13 insertions, 4 deletions
diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h
index 3333385ec56..bf1382e8bb2 100644
--- a/innobase/include/dict0dict.h
+++ b/innobase/include/dict0dict.h
@@ -197,7 +197,8 @@ dict_foreign_add_to_cache(
/*======================*/
/* out: DB_SUCCESS or error code */
dict_foreign_t* foreign, /* in, own: foreign key constraint */
- ibool check_types); /* in: TRUE=check type compatibility */
+ ibool check_charsets);/* in: TRUE=check charset
+ compatibility */
/*************************************************************************
Checks if a table is referenced by foreign keys. */
diff --git a/innobase/include/dict0load.h b/innobase/include/dict0load.h
index f13620bc6e8..741123614ab 100644
--- a/innobase/include/dict0load.h
+++ b/innobase/include/dict0load.h
@@ -82,7 +82,8 @@ dict_load_foreigns(
/*===============*/
/* out: DB_SUCCESS or error code */
const char* table_name, /* in: table name */
- ibool check_types); /* in: TRUE=check type compatibility */
+ ibool check_charsets);/* in: TRUE=check charsets
+ compatibility */
/************************************************************************
Prints to the standard output information on all tables found in the data
dictionary system table. */
diff --git a/innobase/include/os0file.h b/innobase/include/os0file.h
index 280a949c1c5..cd07eb49cd6 100644
--- a/innobase/include/os0file.h
+++ b/innobase/include/os0file.h
@@ -182,7 +182,7 @@ Creates a temporary file. */
FILE*
os_file_create_tmpfile(void);
/*========================*/
- /* out: temporary file handle (never NULL) */
+ /* out: temporary file handle, or NULL on error */
/***************************************************************************
The os_file_opendir() function opens a directory stream corresponding to the
directory named by the dirname argument. The directory stream is positioned
diff --git a/innobase/include/rem0cmp.h b/innobase/include/rem0cmp.h
index 712e263350e..6288d47bd63 100644
--- a/innobase/include/rem0cmp.h
+++ b/innobase/include/rem0cmp.h
@@ -24,7 +24,8 @@ cmp_types_are_equal(
/* out: TRUE if the types are considered
equal in comparisons */
dtype_t* type1, /* in: type 1 */
- dtype_t* type2); /* in: type 2 */
+ dtype_t* type2, /* in: type 2 */
+ ibool check_charsets); /* in: whether to check charsets */
/*****************************************************************
This function is used to compare two data fields for which we know the
data type. */
diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
index 4352083b21f..992271e32ee 100644
--- a/innobase/include/srv0srv.h
+++ b/innobase/include/srv0srv.h
@@ -34,6 +34,12 @@ extern ibool srv_lower_case_table_names;
extern mutex_t srv_monitor_file_mutex;
/* Temporary file for innodb monitor output */
extern FILE* srv_monitor_file;
+/* Mutex for locking srv_dict_tmpfile.
+This mutex has a very high rank; threads reserving it should not
+be holding any InnoDB latches. */
+extern mutex_t srv_dict_tmpfile_mutex;
+/* Temporary file for output from the data dictionary */
+extern FILE* srv_dict_tmpfile;
/* Server parameters which are read from the initfile */