List:Internals« Previous MessageNext Message »
From:Heikki Tuuri Date:April 27 2005 1:57am
Subject:bk commit into 4.1 tree (heikki:1.2210)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of heikki. When heikki does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2210 05/04/27 02:57:19 heikki@stripped +3 -0
  dict0dict.c, dict0dict.h, fil0fil.c:
    Fix a problem in crash recovery of .ibd files on Windows if the user used
lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all
paths to lower case, so that the tablespace name would be consistent with the internal
data dictionary of InnoDB; remember that InnoDB puts internally all database names and
table names to lower case on Windows, regardless of the value of lower_case_table_names

  innobase/dict/dict0dict.c
    1.64 05/04/27 02:56:43 heikki@stripped +11 -1
    Fix a problem in crash recovery of .ibd files on Windows if the user used
lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all
paths to lower case, so that the tablespace name would be consistent with the internal
data dictionary of InnoDB; remember that InnoDB puts internally all database names and
table names to lower case on Windows, regardless of the value of lower_case_table_names

  innobase/include/dict0dict.h
    1.32 05/04/27 02:56:30 heikki@stripped +7 -0
    Fix a problem in crash recovery of .ibd files on Windows if the user used
lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all
paths to lower case, so that the tablespace name would be consistent with the internal
data dictionary of InnoDB; remember that InnoDB puts internally all database names and
table names to lower case on Windows, regardless of the value of lower_case_table_names

  innobase/fil/fil0fil.c
    1.52 05/04/27 02:56:18 heikki@stripped +9 -0
    Fix a problem in crash recovery of .ibd files on Windows if the user used
lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all
paths to lower case, so that the tablespace name would be consistent with the internal
data dictionary of InnoDB; remember that InnoDB puts internally all database names and
table names to lower case on Windows, regardless of the value of lower_case_table_names

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	heikki
# Host:	hundin.mysql.fi
# Root:	/home/heikki/mysql-4.1

--- 1.63/innobase/dict/dict0dict.c	Tue Apr 12 16:12:27 2005
+++ 1.64/innobase/dict/dict0dict.c	Wed Apr 27 02:56:43 2005
@@ -197,7 +197,17 @@
 mutex_t	dict_foreign_err_mutex; 	/* mutex protecting the foreign
 					and unique error buffers */
 	
-	
+/**********************************************************************
+Makes all characters in a NUL-terminated UTF-8 string lower case. */
+
+void
+dict_casedn_str(
+/*============*/
+	char*	a)	/* in/out: string to put in lower case */
+{
+	innobase_casedn_str(a);
+}
+
 /************************************************************************
 Checks if the database name in two table names is the same. */
 

--- 1.51/innobase/fil/fil0fil.c	Thu Apr 14 22:27:01 2005
+++ 1.52/innobase/fil/fil0fil.c	Wed Apr 27 02:56:18 2005
@@ -25,6 +25,7 @@
 #include "srv0start.h"
 #include "mtr0mtr.h"
 #include "mtr0log.h"
+#include "dict0dict.h"
 
 	 
 /*
@@ -2732,7 +2733,15 @@
 	sprintf(filepath, "%s/%s/%s", fil_path_to_mysql_datadir, dbname,
 								filename);
 	srv_normalize_path_for_win(filepath);
+#ifdef __WIN__
+	/* If lower_case_table_names is 0 or 2, then MySQL allows database
+	directory names with upper case letters. On Windows, all table and
+	database names in InnoDB are internally always in lower case. Put the
+	file path to lower case, so that we are consistent with InnoDB's
+	internal data dictionary. */
 
+	dict_casedn_str(filepath);
+#endif
 	file = os_file_create_simple_no_error_handling(filepath, OS_FILE_OPEN,
 						OS_FILE_READ_ONLY, &success);
 	if (!success) {

--- 1.31/innobase/include/dict0dict.h	Tue Apr 12 16:12:27 2005
+++ 1.32/innobase/include/dict0dict.h	Wed Apr 27 02:56:30 2005
@@ -26,6 +26,13 @@
 #include "ut0byte.h"
 #include "trx0types.h"
 
+/**********************************************************************
+Makes all characters in a NUL-terminated UTF-8 string lower case. */
+
+void
+dict_casedn_str(
+/*============*/
+	char*	a);	/* in/out: string to put in lower case */
 /************************************************************************
 Get the database name length in a table name. */
 
Thread
bk commit into 4.1 tree (heikki:1.2210)Heikki Tuuri27 Apr