MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:damien Date:August 30 2007 12:48am
Subject:bk commit into 5.1 tree (dkatz:1.2592)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of dkatz. When dkatz 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@stripped, 2007-08-29 20:48:32-04:00, dkatz@stripped +7 -0
  Windows/Solaris threading enhancements merges.
  
  https://intranet.mysql.com/worklog/Server-Sprint/?tid=441
  MERGE: 1.2469.267.2

  mysys/thr_lock.c@stripped, 2007-08-29 20:48:29-04:00, dkatz@stripped +0 -1
    Windows/Solaris threading enhancements merges.
    
    https://intranet.mysql.com/worklog/Server-Sprint/?tid=441
    MERGE: 1.58.1.1

  sql/item_func.cc@stripped, 2007-08-29 20:48:29-04:00, dkatz@stripped +0 -0
    Windows/Solaris threading enhancements merges.
    
    https://intranet.mysql.com/worklog/Server-Sprint/?tid=441
    MERGE: 1.353.46.1

  sql/mysqld.cc@stripped, 2007-08-29 20:48:29-04:00, dkatz@stripped +0 -2
    Windows/Solaris threading enhancements merges.
    
    https://intranet.mysql.com/worklog/Server-Sprint/?tid=441
    MERGE: 1.619.5.1

  sql/set_var.cc@stripped, 2007-08-29 20:48:29-04:00, dkatz@stripped +2 -2
    Windows/Solaris threading enhancements merges.
    
    https://intranet.mysql.com/worklog/Server-Sprint/?tid=441
    MERGE: 1.221.2.1

  sql/sql_class.h@stripped, 2007-08-29 20:48:30-04:00, dkatz@stripped +0 -0
    Windows/Solaris threading enhancements merges.
    
    https://intranet.mysql.com/worklog/Server-Sprint/?tid=441
    MERGE: 1.345.1.1

  sql/sql_parse.cc@stripped, 2007-08-29 20:48:30-04:00, dkatz@stripped +0 -0
    Windows/Solaris threading enhancements merges.
    
    https://intranet.mysql.com/worklog/Server-Sprint/?tid=441
    MERGE: 1.639.1.1

  storage/myisam/mi_log.c@stripped, 2007-08-29 20:48:30-04:00, dkatz@stripped +0 -0
    Windows/Solaris threading enhancements merges.
    
    https://intranet.mysql.com/worklog/Server-Sprint/?tid=441
    MERGE: 1.15.1.1

# 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:	dkatz
# Host:	damien-katzs-computer.local
# Root:	/Users/dkatz/threadpool/RESYNC

--- 1.17/storage/myisam/mi_log.c	2007-08-13 09:11:16 -04:00
+++ 1.18/storage/myisam/mi_log.c	2007-08-29 20:48:30 -04:00
@@ -31,7 +31,7 @@
 
 #undef GETPID					/* For HPUX */
 #ifdef THREAD
-#define GETPID() (log_type == 1 ? (long) myisam_pid : (long) my_thread_dbug_id())
+#define GETPID() (log_type == 1 ? (long) myisam_pid : (long) my_thread_var->id)
 #else
 #define GETPID() myisam_pid
 #endif

--- 1.61/mysys/thr_lock.c	2007-08-05 05:20:03 -04:00
+++ 1.62/mysys/thr_lock.c	2007-08-29 20:48:29 -04:00
@@ -490,7 +490,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_O
   data->type=lock_type;
   data->owner= owner;                           /* Must be reset ! */
   VOID(pthread_mutex_lock(&lock->mutex));
-  DBUG_PRINT("lock",("data: 0x%lx  thread: 0x%lx  lock: 0x%lx  type: %d",
+  DBUG_PRINT("lock",("data: 0x%lx  thread: 0x%lu  lock: 0x%lx  type: %d",
                      (long) data, data->owner->info->thread_id,
                      (long) lock, (int) lock_type));
   check_locks(lock,(uint) lock_type <= (uint) TL_READ_NO_INSERT ?
@@ -509,7 +509,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_O
 	   and the read lock is not TL_READ_NO_INSERT
       */
 
-      DBUG_PRINT("lock",("write locked by thread: 0x%lx",
+      DBUG_PRINT("lock",("write locked by thread: 0x%lu",
 			 lock->write.data->owner->info->thread_id));
       if (thr_lock_owner_equal(data->owner, lock->write.data->owner) ||
 	  (lock->write.data->type <= TL_WRITE_DELAYED &&
@@ -632,7 +632,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_O
 	goto end;
       }
       /* purecov: begin inspected */
-      DBUG_PRINT("lock",("write locked by thread: 0x%lx",
+      DBUG_PRINT("lock",("write locked by thread: 0x%lu",
 			 lock->write.data->owner->info->thread_id));
       /* purecov: end */
     }
@@ -669,7 +669,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_O
 	  goto end;
 	}
       }
-      DBUG_PRINT("lock",("write locked by thread: 0x%lx  type: %d",
+      DBUG_PRINT("lock",("write locked by thread: 0x%lu  type: %d",
 			 lock->read.data->owner->info->thread_id, data->type));
     }
     wait_queue= &lock->write_wait;
@@ -732,7 +732,7 @@ static inline void free_all_read_locks(T
       lock->read_no_write_count++;
     }      
     /* purecov: begin inspected */
-    DBUG_PRINT("lock",("giving read lock to thread: 0x%lx",
+    DBUG_PRINT("lock",("giving read lock to thread: 0x%lu",
 		       data->owner->info->thread_id));
     /* purecov: end */
     data->cond=0;				/* Mark thread free */
@@ -840,7 +840,7 @@ static void wake_up_waiters(THR_LOCK *lo
 	      (*lock->check_status)(data->status_param))
 	    data->type=TL_WRITE;			/* Upgrade lock */
           /* purecov: begin inspected */
-	  DBUG_PRINT("lock",("giving write lock of type %d to thread: 0x%lx",
+	  DBUG_PRINT("lock",("giving write lock of type %d to thread: 0x%lu",
 			     data->type, data->owner->info->thread_id));
           /* purecov: end */
 	  {
@@ -1036,7 +1036,7 @@ void thr_multi_unlock(THR_LOCK_DATA **da
       thr_unlock(*pos);
     else
     {
-      DBUG_PRINT("lock",("Free lock: data: 0x%lx  thread: 0x%lx  lock: 0x%lx",
+      DBUG_PRINT("lock",("Free lock: data: 0x%lx  thread: 0x%lu  lock: 0x%lx",
                          (long) *pos, (*pos)->owner->info->thread_id,
                          (long) (*pos)->lock));
     }

--- 1.379/sql/item_func.cc	2007-08-26 18:38:29 -04:00
+++ 1.380/sql/item_func.cc	2007-08-29 20:48:29 -04:00
@@ -3550,7 +3550,6 @@ longlong Item_func_get_lock::val_int()
   {
     ull->locked=1;
     ull->set_thread(thd);
-    ull->thread_id= thd->thread_id;
     thd->ull=ull;
     error=0;
     DBUG_PRINT("info", ("got the lock"));

--- 1.653/sql/mysqld.cc	2007-08-26 18:38:31 -04:00
+++ 1.654/sql/mysqld.cc	2007-08-29 20:48:29 -04:00
@@ -1263,9 +1263,8 @@ void clean_up(bool print_message)
   if (!opt_bootstrap)
     (void) my_delete(pidfile_name,MYF(0));	// This may not always exist
 #endif
-  if (print_message && errmesg && server_start_time)
-    sql_print_information(ER(ER_SHUTDOWN_COMPLETE),my_progname);
-  thread_scheduler.end();
+  if (thread_scheduler.end)
+    thread_scheduler.end();
   finish_client_errs();
   my_free((uchar*) my_error_unregister(ER_ERROR_FIRST, ER_ERROR_LAST),
           MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR));

--- 1.392/sql/sql_class.h	2007-08-26 18:38:32 -04:00
+++ 1.393/sql/sql_class.h	2007-08-29 20:48:30 -04:00
@@ -2201,6 +2201,7 @@ public:
       save_copy_field= copy_field= 0;
     }
   }
+  thd_scheduler scheduler;
 };
 
 class select_union :public select_result_interceptor

--- 1.702/sql/sql_parse.cc	2007-08-26 04:36:04 -04:00
+++ 1.703/sql/sql_parse.cc	2007-08-29 20:48:30 -04:00
@@ -87,6 +87,41 @@ const char *xa_state_names[]={
   "NON-EXISTING", "ACTIVE", "IDLE", "PREPARED"
 };
 
+#ifdef HAVE_OPENSSL
+/*
+  Without SSL the handshake consists of one packet. This packet
+  has both client capabilites and scrambled password.
+  With SSL the handshake might consist of two packets. If the first
+  packet (client capabilities) has CLIENT_SSL flag set, we have to
+  switch to SSL and read the second packet. The scrambled password
+  is in the second packet and client_capabilites field will be ignored.
+  Maybe it is better to accept flags other than CLIENT_SSL from the
+  second packet?
+*/
+#define SSL_HANDSHAKE_SIZE      2
+#define NORMAL_HANDSHAKE_SIZE   6
+#define MIN_HANDSHAKE_SIZE      2
+#else
+#define MIN_HANDSHAKE_SIZE      6
+#endif /* HAVE_OPENSSL */
+#ifdef __WIN__
+static void  test_signal(int sig_ptr)
+{
+#if !defined( DBUG_OFF)
+  MessageBox(NULL,"Test signal","DBUG",MB_OK);
+#endif
+#if defined(OS2)
+  fprintf(stderr, "Test signal %d\n", sig_ptr);
+  fflush(stderr);
+#endif
+}
+static void init_signals(void)
+{
+  int signals[7] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGBREAK,SIGABRT } ;
+  for (int i=0 ; i < 7 ; i++)
+    signal( signals[i], test_signal) ;
+}
+#endif
 
 static void unlock_locked_tables(THD *thd)
 {
@@ -182,7 +217,6 @@ static bool some_non_temp_table_to_be_up
   return 0;
 }
 
-
 /*
   Mark all commands that somehow changes a table
   This is used to check number of updates / hour
@@ -3394,9 +3428,9 @@ end_with_restore_list:
           {
             if (!(user= get_current_user(thd, tmp_user)))
               goto error;
-	    reset_mqh(user, 0);
+            reset_mqh(user, 0);
           }
-	}
+        }
       }
     }
     break;

--- 1.240/sql/set_var.cc	2007-08-26 07:31:16 -04:00
+++ 1.241/sql/set_var.cc	2007-08-29 20:48:29 -04:00
@@ -716,6 +716,10 @@ static SHOW_VAR fixed_vars[]= {
 #ifdef HAVE_THR_SETCONCURRENCY
   {"thread_concurrency",      (char*) &concurrency,                 SHOW_LONG},
 #endif
+  {sys_thread_handling.name,  (char*) &sys_thread_handling,         SHOW_SYS},
+#if HAVE_POOL_OF_THREADS == 1
+  {sys_thread_pool_size.name, (char*) &sys_thread_pool_size,        SHOW_SYS},
+#endif
   {"thread_stack",            (char*) &thread_stack,                SHOW_LONG},
 };
 
Thread
bk commit into 5.1 tree (dkatz:1.2592)damien30 Aug