List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:August 3 2011 11:30am
Subject:bzr push into mysql-trunk branch (vasil.dimov:3340 to 3341)
View as plain text  
 3341 Vasil Dimov	2011-08-03
      Revert vasil.dimov@stripped which
      was a workaround for
      
      Bug 12813354 - PLUGIN_VAR_MEMALLOC WITHOUT VALIDATION FUNC CRASHES IF
      THE VALUE IS SET TO NULL
      
      but that bug is now fixed.

    modified:
      storage/innobase/handler/ha_innodb.cc
 3340 Vasil Dimov	2011-08-03
      Fix Bug 12813354 - PLUGIN_VAR_MEMALLOC WITHOUT VALIDATION FUNC CRASHES
      IF THE VALUE IS SET TO NULL
      
      Do not try to strdup() the string if the value is NULL. In this case
      *(char **)tgt has already been assigned NULL at the start of the function.
      
      Reviewed by:	magne.mahre (via IM)

    modified:
      sql/sql_plugin.cc
=== 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
@@ -11081,37 +11081,6 @@ ha_innobase::check_if_incompatible_data(
 	return(COMPATIBLE_DATA_YES);
 }
 
-/*************************************************************//**
-Check if the value passed is NULL.
-@return	0 for valid (!= NULL) */
-static
-int
-innodb_buffer_pool_filename_validate(
-/*=================================*/
-	THD*				thd,	/*!< in: thread handle */
-	struct st_mysql_sys_var*	var,	/*!< in: pointer to system
-						variable */
-	void*				save,	/*!< out: immediate result
-						for update function */
-	struct st_mysql_value*		value)	/*!< in: incoming string */
-{
-	const char*	p;
-	char		buff[STRING_BUFFER_USUAL_SIZE];
-	int		len = sizeof(buff);
-
-	ut_a(save != NULL);
-	ut_a(value != NULL);
-
-	p = value->val_str(value, buff, &len);
-
-	*static_cast<const char**>(save) = p;
-
-	if (p != NULL) {
-		return(0);
-	}
-
-	return(1);
-}
 /************************************************************//**
 Validate the file format name and return its corresponding id.
 @return	valid file format id */
@@ -12405,7 +12374,7 @@ static MYSQL_SYSVAR_LONG(buffer_pool_ins
 static MYSQL_SYSVAR_STR(buffer_pool_filename, srv_buf_dump_filename,
   PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC,
   "Filename to/from which to dump/load the InnoDB buffer pool",
-  innodb_buffer_pool_filename_validate, NULL, SRV_BUF_DUMP_FILENAME_DEFAULT);
+  NULL, NULL, SRV_BUF_DUMP_FILENAME_DEFAULT);
 
 static MYSQL_SYSVAR_BOOL(buffer_pool_dump_now, innodb_buffer_pool_dump_now,
   PLUGIN_VAR_RQCMDARG,

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (vasil.dimov:3340 to 3341) vasil.dimov4 Aug