List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:November 22 2010 3:00pm
Subject:bzr commit into mysql-trunk-innodb branch (vasil.dimov:3332)
View as plain text  
#At file:///usr/local/devel/bzrroot/server/mysql-trunk-innodb/ based on revid:vasil.dimov@stripped

 3332 Vasil Dimov	2010-11-22 [merge]
      Merge mysql-5.5-innodb -> mysql-trunk-innodb

    modified:
      include/mysql/innodb_priv.h
      sql/sql_table.cc
      sql/sql_table.h
      storage/innobase/handler/ha_innodb.cc
=== modified file 'include/mysql/innodb_priv.h'
--- a/include/mysql/innodb_priv.h	revid:vasil.dimov@stripped
+++ b/include/mysql/innodb_priv.h	revid:vasil.dimov@stripped
@@ -22,7 +22,6 @@
 
 class THD;
 
-uint filename_to_tablename(const char *from, char *to, uint to_length);
 int get_quote_char_for_identifier(THD *thd, const char *name, uint length);
 bool schema_table_store_record(THD *thd, TABLE *table);
 void localtime_to_TIME(MYSQL_TIME *to, struct tm *from);

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	revid:vasil.dimov@stripped
+++ b/sql/sql_table.cc	revid:vasil.dimov@stripped
@@ -372,7 +372,11 @@ uint explain_filename(THD* thd,
     Table name length.
 */
 
-uint filename_to_tablename(const char *from, char *to, uint to_length)
+uint filename_to_tablename(const char *from, char *to, uint to_length
+#ifndef DBUG_OFF
+                           , bool stay_quiet
+#endif /* DBUG_OFF */
+                           )
 {
   uint errors;
   size_t res;
@@ -392,7 +396,13 @@ uint filename_to_tablename(const char *f
     {
       res= (strxnmov(to, to_length, MYSQL50_TABLE_NAME_PREFIX,  from, NullS) -
             to);
-      sql_print_error("Invalid (old?) table or database name '%s'", from);
+#ifndef DBUG_OFF
+      if (!stay_quiet) {
+#endif /* DBUG_OFF */
+        sql_print_error("Invalid (old?) table or database name '%s'", from);
+#ifndef DBUG_OFF
+      }
+#endif /* DBUG_OFF */
       /*
         TODO: add a stored procedure for fix table and database names,
         and mention its name in error log.

=== modified file 'sql/sql_table.h'
--- a/sql/sql_table.h	revid:vasil.dimov@stripped
+++ b/sql/sql_table.h	revid:vasil.dimov@stripped
@@ -133,7 +133,11 @@ enum enum_explain_filename_mode
 #define NO_FRM_RENAME   (1 << 2)
 #define FRM_ONLY        (1 << 3)
 
-uint filename_to_tablename(const char *from, char *to, uint to_length);
+uint filename_to_tablename(const char *from, char *to, uint to_length
+#ifndef DBUG_OFF
+                           , bool stay_quiet = false
+#endif /* DBUG_OFF */
+                           );
 uint tablename_to_filename(const char *from, char *to, uint to_length);
 uint check_n_cut_mysql50_prefix(const char *from, char *to, uint to_length);
 bool check_mysql50_prefix(const char *name);

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	revid:vasil.dimov@stripped
+++ b/storage/innobase/handler/ha_innodb.cc	revid:vasil.dimov@stripped
@@ -2336,13 +2336,13 @@ innobase_init(
 
 	ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)MYSQL_TYPE_VARCHAR);
 
-#ifdef UNIV_DEBUG
+#ifndef DBUG_OFF
 	static const char	test_filename[] = "-@";
 	char			test_tablename[sizeof test_filename
 				+ sizeof srv_mysql50_table_name_prefix];
 	if ((sizeof test_tablename) - 1
 			!= filename_to_tablename(test_filename, test_tablename,
-			sizeof test_tablename)
+			sizeof test_tablename, true)
 			|| strncmp(test_tablename,
 			srv_mysql50_table_name_prefix,
 			sizeof srv_mysql50_table_name_prefix)
@@ -2352,7 +2352,7 @@ innobase_init(
 		sql_print_error("tablename encoding has been changed");
 		goto error;
 	}
-#endif /* UNIV_DEBUG */
+#endif /* DBUG_OFF */
 
 	/* Check that values don't overflow on 32-bit systems. */
 	if (sizeof(ulint) == 4) {

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-trunk-innodb branch (vasil.dimov:3332) vasil.dimov22 Nov