List:Commits« Previous MessageNext Message »
From:jani Date:January 12 2006 1:10pm
Subject:bk commit into 4.0 tree (jani:1.2169)
View as plain text  
Below is the list of changes that have just been committed into a local
4.0 repository of jani. When jani 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.2169 06/01/12 15:10:12 jani@stripped +4 -0
  NetWare specific change to increase thread stack size.
  Changes to Netware specific mysqld_safe.c

  sql/mysqld.cc
    1.530 06/01/12 15:10:10 jani@stripped +5 -0
    NetWare specific change to increase thread stack size.

  netware/mysqld_safe.c
    1.8 06/01/12 15:10:10 jani@stripped +15 -27
    NetWare specific change to make multiple mysqld_safe instances
    work when called through a NCF file.

  innobase/os/os0thread.c
    1.25 06/01/12 15:10:10 jani@stripped +9 -0
    NetWare specific change to increase thread stack size.

  include/config-netware.h
    1.8 06/01/12 15:10:10 jani@stripped +3 -0
    NetWare specific change to increase thread stack size.

# 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:	jani
# Host:	ua141d10.elisa.omakaista.fi
# Root:	/home/my/bk/mysql-4.0

--- 1.529/sql/mysqld.cc	2005-10-04 07:51:49 +03:00
+++ 1.530/sql/mysqld.cc	2006-01-12 15:10:10 +02:00
@@ -2402,6 +2402,11 @@
     }
   }
 #endif
+#ifdef __NETWARE__
+  /* Increasing stacksize of threads on NetWare */
+
+  pthread_attr_setstacksize(&connection_attrib, NW_THD_STACKSIZE);
+#endif
   if (!(opt_specialflag & SPECIAL_NO_PRIOR))
     my_pthread_attr_setprio(&connection_attrib,WAIT_PRIOR);
   pthread_attr_setscope(&connection_attrib, PTHREAD_SCOPE_SYSTEM);

--- 1.7/netware/mysqld_safe.c	2005-08-24 22:03:29 +03:00
+++ 1.8/netware/mysqld_safe.c	2006-01-12 15:10:10 +02:00
@@ -252,51 +252,39 @@
 ******************************************************************************/
 void read_defaults(arg_list_t *pal)
 {
-  arg_list_t al;
-  char defaults_file[PATH_MAX];
   char mydefaults[PATH_MAX];
+  char mydefaults_command[3*PATH_MAX];
   char line[PATH_MAX];
   FILE *fp;
   
-	// defaults output file
-	snprintf(defaults_file, PATH_MAX, "%s/bin/defaults.out", basedir);
-	remove(defaults_file);
-
-	// mysqladmin file
+	// my_print_defaults file
   snprintf(mydefaults, PATH_MAX, "%s/bin/my_print_defaults", basedir);
 	
-  // args
-  init_args(&al);
-  add_arg(&al, mydefaults);
-  if (default_option[0]) add_arg(&al, default_option);
-  add_arg(&al, "mysqld");
-  add_arg(&al, "server");
-  add_arg(&al, "mysqld_safe");
-  add_arg(&al, "safe_mysqld");
-
-	spawn(mydefaults, &al, TRUE, NULL, defaults_file, NULL);
-
-  free_args(&al);
-
+  // args to my_print_defaults
+  if (default_option[0]) 
+  {
+    snprintf(mydefaults_command, 3*PATH_MAX, "%s %s mysqld server mysqld_safe safe_mysqld", mydefaults, default_option);
+  }
+  else
+  {
+    snprintf(mydefaults_command, 3*PATH_MAX, "%s mysqld server mysqld_safe safe_mysqld", mydefaults);
+  }
 	// gather defaults
-	if((fp = fopen(defaults_file, "r")) != NULL)
+	if((fp = popen(mydefaults_command, "r")) != NULL)
 	{
 	  while(fgets(line, PATH_MAX, fp))
 	  {
       char *p;
       
       // remove end-of-line character
-      if ((p = strrchr(line, '\n')) != NULL) *p = '\0';
+      if ((p = strrchr(line, '\n')) != NULL) 
+        *p = '\0';
       
       // add the option as an argument
 	    add_arg(pal, line);
 	  }
-	  
-	  fclose(fp);
+	  pclose(fp);
 	}
-	
-	// remove file
-	remove(defaults_file);
 }
 
 /******************************************************************************

--- 1.24/innobase/os/os0thread.c	2004-04-06 16:14:39 +03:00
+++ 1.25/innobase/os/os0thread.c	2006-01-12 15:10:10 +02:00
@@ -148,6 +148,15 @@
 		 exit(1);
 	}
 #endif
+#ifdef __NETWARE__
+	ret = pthread_attr_setstacksize(&attr,
+					(size_t) NW_THD_STACKSIZE);
+        if (ret) {
+	         fprintf(stderr,
+          "InnoDB: Error: pthread_attr_setstacksize returned %d\n", ret);
+		 exit(1);
+	}
+#endif
 	os_mutex_enter(os_sync_mutex);
 	os_thread_count++;
 	os_mutex_exit(os_sync_mutex);

--- 1.7/include/config-netware.h	2005-10-28 14:00:56 +03:00
+++ 1.8/include/config-netware.h	2006-01-12 15:10:10 +02:00
@@ -92,6 +92,9 @@
 /* On NetWare, stack grows towards lower address*/
 #define STACK_DIRECTION -1
 
+/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
+#define NW_THD_STACKSIZE 65536
+
 /* On NetWare, to fix the problem with the deletion of open files */
 #define CANT_DELETE_OPEN_FILES 1
 
Thread
bk commit into 4.0 tree (jani:1.2169)jani12 Jan