List:Commits« Previous MessageNext Message »
From:Sunny Bains Date:May 3 2010 5:13am
Subject:bzr commit into mysql-trunk-innodb branch (Sunny.Bains:3049)
View as plain text  
#At file:///Users/sunny/innodb/bzr/mysql-trunk-innodb/ based on revid:sunny.bains@stripped

 3049 Sunny Bains	2010-05-03
      Increase the size of the thread_ids array and add an assertion to check that
      we don't go out of bounds.

    modified:
      storage/innobase/srv/srv0start.c
=== modified file 'storage/innobase/srv/srv0start.c'
--- a/storage/innobase/srv/srv0start.c	revid:sunny.bains@stripped
+++ b/storage/innobase/srv/srv0start.c	revid:sunny.bains@stripped
@@ -127,8 +127,8 @@ static ulint		ios;
 
 /** io_handler_thread parameters for thread identification */
 static ulint		n[SRV_MAX_N_IO_THREADS + 6];
-/** io_handler_thread identifiers */
-static os_thread_id_t	thread_ids[SRV_MAX_N_IO_THREADS + 6];
+/** io_handler_thread identifiers, 32 is the maximum number of purge threads  */
+static os_thread_id_t	thread_ids[SRV_MAX_N_IO_THREADS + 6 + 32];
 
 /** We use this mutex to test the return value of pthread_mutex_trylock
    on successful locking. HP-UX does NOT return 0, though Linux et al do. */
@@ -1755,7 +1755,12 @@ innobase_start_or_create_for_mysql(void)
 	start the purge thread. */
 	if (srv_n_purge_threads >= 1) {
 
-		os_thread_create(&srv_purge_coordinator_thread, NULL, NULL);
+		os_thread_create(
+			&srv_purge_coordinator_thread, NULL,
+			thread_ids + 5 + SRV_MAX_N_IO_THREADS);
+
+		ut_a(UT_ARR_SIZE(thread_ids)
+		     > 5 + srv_n_purge_threads + SRV_MAX_N_IO_THREADS);
 
 		for (i = 1; i < srv_n_purge_threads; ++i) {
 			os_thread_create(


Attachment: [text/bzr-bundle] bzr/sunny.bains@oracle.com-20100503051305-wuh07nt1jkux2rwx.bundle
Thread
bzr commit into mysql-trunk-innodb branch (Sunny.Bains:3049) Sunny Bains3 May