List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:October 5 2010 6:45am
Subject:bzr commit into mysql-next-mr-persistent-stats branch (vasil.dimov:3293)
View as plain text  
#At file:///usr/local/devel/bzrroot/server/mysql-next-mr-persistent-stats/ based on revid:vasil.dimov@stripped

 3293 Vasil Dimov	2010-10-05
      Do not set the error message if DB_TABLE_NOT_FOUND
      
      Since we are not using the message in the case of DB_TABLE_NOT_FOUND
      we change the function not to print to the string then. This is an
      optimizatoin since it is called for each dict_table_get().
      
      Suggested by:	Jimmy (rb://373)

    modified:
      storage/innobase/dict/dict0dict.c
      storage/innobase/dict/dict0stats.c
      storage/innobase/include/dict0dict.h
=== modified file 'storage/innobase/dict/dict0dict.c'
--- a/storage/innobase/dict/dict0dict.c	revid:vasil.dimov@stripped
+++ b/storage/innobase/dict/dict0dict.c	revid:vasil.dimov@stripped
@@ -4819,7 +4819,8 @@ dict_table_schema_check(
 	dict_table_schema_t*	req_schema,	/*!< in/out: required table
 						schema */
 	char*			errstr,		/*!< out: human readable error
-						message if != DB_SUCCESS is
+						message if != DB_SUCCESS and
+						!= DB_TABLE_NOT_FOUND is
 						returned */
 	size_t			errstr_sz)	/*!< in: errstr size */
 {
@@ -4833,10 +4834,6 @@ dict_table_schema_check(
 	if (table == NULL || table->ibd_file_missing) {
 		/* no such table or missing tablespace */
 
-		ut_snprintf(errstr, errstr_sz,
-			    "%s does not exist or its tablespace is missing.",
-			    req_schema->table_name);
-
 		return(DB_TABLE_NOT_FOUND);
 	}
 

=== modified file 'storage/innobase/dict/dict0stats.c'
--- a/storage/innobase/dict/dict0stats.c	revid:vasil.dimov@stripped
+++ b/storage/innobase/dict/dict0stats.c	revid:vasil.dimov@stripped
@@ -2640,6 +2640,8 @@ test_dict_table_schema_check()
 	};
 	char	errstr[512];
 
+	ut_snprintf(errstr, sizeof(errstr), "Table not found");
+
 	/* prevent any data dictionary modifications while we are checking
 	the tables' structure */
 

=== modified file 'storage/innobase/include/dict0dict.h'
--- a/storage/innobase/include/dict0dict.h	revid:vasil.dimov@stripped
+++ b/storage/innobase/include/dict0dict.h	revid:vasil.dimov@stripped
@@ -1221,7 +1221,8 @@ dict_table_schema_check(
 	dict_table_schema_t*	req_schema,	/*!< in/out: required table
 						schema */
 	char*			errstr,		/*!< out: human readable error
-						message if != DB_SUCCESS is
+						message if != DB_SUCCESS and
+						!= DB_TABLE_NOT_FOUND is
 						returned */
 	size_t			errstr_sz);	/*!< in: errstr size */
 /* @} */


Attachment: [text/bzr-bundle] bzr/vasil.dimov@oracle.com-20101005064313-kk8v6j3a10e42lho.bundle
Thread
bzr commit into mysql-next-mr-persistent-stats branch (vasil.dimov:3293) vasil.dimov5 Oct