List:Commits« Previous MessageNext Message »
From:Kristofer Pettersson Date:November 9 2009 10:47am
Subject:bzr commit into mysql-5.1-bugteam branch (kristofer.pettersson:3189)
Bug#46043
View as plain text  
#At file:///Users/thek/Development/mysql-5.1-bugteam/ based on revid:kristofer.pettersson@stripped

 3189 Kristofer Pettersson	2009-11-09
      Bug#46043 mysqld --skip-innodb does not skip InnoDB
           
      The prefix --skip- didn't work on 64 bit big endian machines
      because of how the value pointer was casted.
     @ mysys/my_getopt.c
        * Split if-statement; The value pointer must correspond to the type mask or it will break on big endian platforms.

    modified:
      mysys/my_getopt.c
=== modified file 'mysys/my_getopt.c'
--- a/mysys/my_getopt.c	2009-10-27 13:16:02 +0000
+++ b/mysys/my_getopt.c	2009-11-09 10:47:47 +0000
@@ -411,19 +411,33 @@ invalid value '%s'",
 	  argument= optend;
 	}
 	else if (optp->arg_type == OPT_ARG &&
-		 (((optp->var_type & GET_TYPE_MASK) == GET_BOOL) ||
-                   (optp->var_type & GET_TYPE_MASK) == GET_ENUM))
+	         (optp->var_type & GET_TYPE_MASK) == GET_BOOL)
 	{
 	  if (optend == disabled_my_option)
-	    *((my_bool*) value)= (my_bool) 0;
+	    *((my_bool*) value)= 0;
 	  else
 	  {
 	    if (!optend) /* No argument -> enable option */
-	      *((my_bool*) value)= (my_bool) 1;
+	      *((my_bool*) value)= 1;
             else
               argument= optend;
 	  }
 	}
+	else if (optp->arg_type == OPT_ARG &&
+	         (optp->var_type & GET_TYPE_MASK) == GET_ENUM)
+	
+	
+	{
+	  if (optend == disabled_my_option)
+	    *((uint*) value)= 0;
+	  else
+	  {
+	    if (!optend) /* No argument -> enable option */
+	      *((uint*) value)= 1;
+            else
+              argument= optend;
+	  }
+	}	 
 	else if (optp->arg_type == REQUIRED_ARG && !optend)
 	{
 	  /* Check if there are more arguments after this one */


Attachment: [text/bzr-bundle]
Thread
bzr commit into mysql-5.1-bugteam branch (kristofer.pettersson:3189)Bug#46043Kristofer Pettersson9 Nov
  • Re: bzr commit into mysql-5.1-bugteam branch(kristofer.pettersson:3189) Bug#46043Davi Arnaut9 Nov