MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alex Ivanov Notebook Date:April 26 2006 4:30am
Subject:bk commit into 5.1 tree (aivanov:1.2370) BUG#19217
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of alexi. When alexi 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.2370 06/04/26 08:30:37 aivanov@stripped +12 -0
  Applied innodb-5.1-ss492 snapshot.
   * Fix BUG#19217 "dict_load_indexes() may read the delete-mark incorrectly".
   * Remove obsolete and unused variables from srv0srv.c.
   * Remove srv_sys->operational since it is unused.
   * Make thread_id parameter in os_thread_create() optional.
   * Add platform-specific os_thread_ret_t and OS_THREAD_DUMMY_RETURN,
     and convert thread start functions to use them.

  storage/innobase/trx/trx0roll.c
    1.30 06/04/26 08:30:32 aivanov@stripped +2 -12
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/srv/srv0start.c
    1.92 06/04/26 08:30:32 aivanov@stripped +2 -15
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/srv/srv0srv.c
    1.99 06/04/26 08:30:32 aivanov@stripped +7 -59
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/que/que0que.c
    1.25 06/04/26 08:30:31 aivanov@stripped +0 -8
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/os/os0thread.c
    1.34 06/04/26 08:30:31 aivanov@stripped +7 -3
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/log/log0recv.c
    1.54 06/04/26 08:30:31 aivanov@stripped +1 -2
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/include/univ.i
    1.52 06/04/26 08:30:31 aivanov@stripped +12 -0
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/include/trx0roll.h
    1.12 06/04/26 08:30:31 aivanov@stripped +1 -5
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/include/srv0srv.h
    1.61 06/04/26 08:30:31 aivanov@stripped +3 -39
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/include/os0thread.h
    1.19 06/04/26 08:30:31 aivanov@stripped +1 -1
    Applied innodb-5.1-ss492 snapshot.

  storage/innobase/dict/dict0load.c
    1.49 06/04/26 08:30:31 aivanov@stripped +1 -1
    Applied innodb-5.1-ss492 snapshot.
     dict_load_indexes(): pass comp=0 to rec_get_deleted_flag(), because
     SYS_INDEXES always is in ROW_FORMAT=REDUNDANT (Bug #19217).

  storage/innobase/dict/dict0dict.c
    1.81 06/04/26 08:30:31 aivanov@stripped +3 -4
    Applied innodb-5.1-ss492 snapshot.

# 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:	aivanov
# Host:	mysqld.localdomain
# Root:	/home/alexi/innodb/mysql-5.1-ss492-work

--- 1.80/storage/innobase/dict/dict0dict.c	2006-04-23 12:48:20 +04:00
+++ 1.81/storage/innobase/dict/dict0dict.c	2006-04-26 08:30:31 +04:00
@@ -243,11 +243,10 @@
 	const char*	name)	/* in: table name in the form
 				dbname '/' tablename */
 {
-	const char*	s;
-	s = strchr(name, '/');
+	const char*	s = strchr(name, '/');
 	ut_a(s);
-	if (s) s++;
-	return(s);
+
+	return(s + 1);
 }
 
 /************************************************************************

--- 1.48/storage/innobase/dict/dict0load.c	2006-04-26 07:53:44 +04:00
+++ 1.49/storage/innobase/dict/dict0load.c	2006-04-26 08:30:31 +04:00
@@ -617,7 +617,7 @@
 			break;
 		}
 
-		if (rec_get_deleted_flag(rec, dict_table_is_comp(table))) {
+		if (rec_get_deleted_flag(rec, 0)) {
 			dict_load_report_deleted_index(table->name,
 				ULINT_UNDEFINED);
 

--- 1.18/storage/innobase/include/os0thread.h	2006-03-10 19:22:06 +03:00
+++ 1.19/storage/innobase/include/os0thread.h	2006-04-26 08:30:31 +04:00
@@ -77,7 +77,7 @@
 	void*			arg,		/* in: argument to start
 						function */
 	os_thread_id_t*		thread_id);	/* out: id of the created
-						thread */
+						thread, or NULL */
 int
 os_thread_join(
 /*===========*/

--- 1.60/storage/innobase/include/srv0srv.h	2006-03-10 19:22:08 +03:00
+++ 1.61/storage/innobase/include/srv0srv.h	2006-04-26 08:30:31 +04:00
@@ -157,33 +157,12 @@
 extern	ulint	srv_mem_pool_size;
 extern	ulint	srv_lock_table_size;
 
-extern	ulint	srv_sim_disk_wait_pct;
-extern	ulint	srv_sim_disk_wait_len;
-extern	ibool	srv_sim_disk_wait_by_yield;
-extern	ibool	srv_sim_disk_wait_by_wait;
-
-extern	ibool	srv_measure_contention;
-extern	ibool	srv_measure_by_spin;
-
 extern	ibool	srv_print_thread_releases;
 extern	ibool	srv_print_lock_waits;
 extern	ibool	srv_print_buf_io;
 extern	ibool	srv_print_log_io;
-extern	ibool	srv_print_parsed_sql;
 extern	ibool	srv_print_latch_waits;
 
-extern	ibool	srv_test_nocache;
-extern	ibool	srv_test_cache_evict;
-
-extern	ibool	srv_test_extra_mutexes;
-extern	ibool	srv_test_sync;
-extern	ulint	srv_test_n_threads;
-extern	ulint	srv_test_n_loops;
-extern	ulint	srv_test_n_free_rnds;
-extern	ulint	srv_test_n_reserved_rnds;
-extern	ulint	srv_test_n_mutexes;
-extern	ulint	srv_test_array_size;
-
 extern ulint	srv_activity_count;
 extern ulint	srv_fatal_semaphore_wait_threshold;
 extern ulint	srv_dml_needed_delay;
@@ -365,11 +344,7 @@
 /*************************************************************************
 The master thread controlling the server. */
 
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
 srv_master_thread(
 /*==============*/
 			/* out: a dummy parameter */
@@ -451,11 +426,7 @@
 A thread which wakes up threads whose lock wait may have lasted too long.
 This also prints the info output by various InnoDB monitors. */
 
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
 srv_lock_timeout_and_monitor_thread(
 /*================================*/
 			/* out: a dummy parameter */
@@ -465,11 +436,7 @@
 A thread which prints warnings about semaphore waits which have lasted
 too long. These can be used to track bugs which cause hangs. */
 
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
 srv_error_monitor_thread(
 /*=====================*/
 			/* out: a dummy parameter */
@@ -567,9 +534,6 @@
 
 /* The server system struct */
 struct srv_sys_struct{
-	os_event_t	operational;	/* created threads must wait for the
-					server to become operational by
-					waiting for this event */
 	srv_table_t*	threads;	/* server thread table */
 	UT_LIST_BASE_NODE_T(que_thr_t)
 			tasks;		/* task queue */

--- 1.11/storage/innobase/include/trx0roll.h	2006-03-10 19:22:08 +03:00
+++ 1.12/storage/innobase/include/trx0roll.h	2006-04-26 08:30:31 +04:00
@@ -107,11 +107,7 @@
 undo log. If the transaction was not yet committed, then we roll it back.
 Note: this is done in a background thread. */
 
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
 trx_rollback_or_clean_all_without_sess(
 /*===================================*/
 			/* out: a dummy parameter */

--- 1.51/storage/innobase/include/univ.i	2006-04-23 12:48:22 +04:00
+++ 1.52/storage/innobase/include/univ.i	2006-04-26 08:30:31 +04:00
@@ -273,6 +273,18 @@
 /* Compile-time constant of the given array's size. */
 #define UT_ARR_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
+/* The return type from a thread's start function differs between Unix and
+Windows, so define a typedef for it and a macro to use at the end of such
+functions. */
+
+#ifdef __WIN__
+typedef ulint os_thread_ret_t;
+#define OS_THREAD_DUMMY_RETURN return(0)
+#else
+typedef void* os_thread_ret_t;
+#define OS_THREAD_DUMMY_RETURN return(NULL)
+#endif
+
 #include <stdio.h>
 #include "ut0dbg.h"
 #include "ut0ut.h"

--- 1.53/storage/innobase/log/log0recv.c	2006-04-23 12:48:22 +04:00
+++ 1.54/storage/innobase/log/log0recv.c	2006-04-26 08:30:31 +04:00
@@ -2940,7 +2940,6 @@
 /*======================================*/
 {
 	int		i;
-	os_thread_id_t	recovery_thread_id;
 
 	/* Apply the hashed log records to the respective file pages */
 
@@ -2984,7 +2983,7 @@
 		session */
 
 		os_thread_create(trx_rollback_or_clean_all_without_sess,
-				(void *)&i, &recovery_thread_id);
+				(void *)&i, NULL);
 	}
 }
 

--- 1.33/storage/innobase/os/os0thread.c	2006-03-10 19:22:10 +03:00
+++ 1.34/storage/innobase/os/os0thread.c	2006-04-26 08:30:31 +04:00
@@ -96,7 +96,7 @@
 	void*			arg,		/* in: argument to start
 						function */
 	os_thread_id_t*		thread_id)	/* out: id of the created
-						thread */
+						thread, or NULL */
 {
 #ifdef __WIN__
 	os_thread_t	thread;
@@ -122,7 +122,9 @@
 		ut_a(SetThreadPriority(thread, srv_query_thread_priority));
 	}
 
-	*thread_id = win_thread_id;
+	if (thread_id) {
+		*thread_id = win_thread_id;
+	}
 
 	return(thread);
 #else
@@ -180,7 +182,9 @@
 		my_pthread_setprio(pthread, srv_query_thread_priority);
 	}
 
-	*thread_id = pthread;
+	if (thread_id) {
+		*thread_id = pthread;
+	}
 
 	return(pthread);
 #endif

--- 1.24/storage/innobase/que/que0que.c	2006-04-23 12:48:23 +04:00
+++ 1.25/storage/innobase/que/que0que.c	2006-04-26 08:30:31 +04:00
@@ -1340,14 +1340,6 @@
 	next_thr = que_thr_step(thr);
 	/*-------------------------*/
 
-	/* Test the effect on performance of adding extra mutex
-	reservations */
-
-/*	if (srv_test_extra_mutexes) {
-		mutex_enter(&kernel_mutex);
-		mutex_exit(&kernel_mutex);
-	}
-*/
 	loop_count++;
 
 	if (next_thr != thr) {

--- 1.98/storage/innobase/srv/srv0srv.c	2006-04-23 12:48:23 +04:00
+++ 1.99/storage/innobase/srv/srv0srv.c	2006-04-26 08:30:32 +04:00
@@ -362,30 +362,6 @@
 ibool	srv_print_innodb_tablespace_monitor = FALSE;
 ibool	srv_print_innodb_table_monitor = FALSE;
 
-/* The parameters below are obsolete: */
-
-ibool	srv_print_parsed_sql		= FALSE;
-
-ulint	srv_sim_disk_wait_pct		= ULINT_MAX;
-ulint	srv_sim_disk_wait_len		= ULINT_MAX;
-ibool	srv_sim_disk_wait_by_yield	= FALSE;
-ibool	srv_sim_disk_wait_by_wait	= FALSE;
-
-ibool	srv_measure_contention	= FALSE;
-ibool	srv_measure_by_spin	= FALSE;
-
-ibool	srv_test_extra_mutexes	= FALSE;
-ibool	srv_test_nocache	= FALSE;
-ibool	srv_test_cache_evict	= FALSE;
-
-ibool	srv_test_sync		= FALSE;
-ulint	srv_test_n_threads	= ULINT_MAX;
-ulint	srv_test_n_loops	= ULINT_MAX;
-ulint	srv_test_n_free_rnds	= ULINT_MAX;
-ulint	srv_test_n_reserved_rnds = ULINT_MAX;
-ulint	srv_test_array_size	= ULINT_MAX;
-ulint	srv_test_n_mutexes	= ULINT_MAX;
-
 /* Array of English strings describing the current state of an
 i/o handler thread */
 
@@ -911,10 +887,6 @@
 		srv_meter_foreground[i] = 250;
 	}
 
-	srv_sys->operational = os_event_create(NULL);
-
-	ut_a(srv_sys->operational);
-
 	UT_LIST_INIT(srv_sys->tasks);
 
 	/* create dummy table and index for old-style infimum and supremum */
@@ -1847,11 +1819,7 @@
 A thread which wakes up threads whose lock wait may have lasted too long.
 This also prints the info output by various InnoDB monitors. */
 
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
 srv_lock_timeout_and_monitor_thread(
 /*================================*/
 			/* out: a dummy parameter */
@@ -2023,22 +1991,15 @@
 	thread should always use that to exit and not use return() to exit. */
 
 	os_thread_exit(NULL);
-#ifndef __WIN__
-	return(NULL);
-#else
-	return(0);
-#endif
+
+	OS_THREAD_DUMMY_RETURN;
 }
 
 /*************************************************************************
 A thread which prints warnings about semaphore waits which have lasted
 too long. These can be used to track bugs which cause hangs. */
 
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
 srv_error_monitor_thread(
 /*=====================*/
 			/* out: a dummy parameter */
@@ -2120,11 +2081,7 @@
 
 	os_thread_exit(NULL);
 
-#ifndef __WIN__
-	return(NULL);
-#else
-	return(0);
-#endif
+	OS_THREAD_DUMMY_RETURN;
 }
 
 /***********************************************************************
@@ -2169,11 +2126,7 @@
 /*************************************************************************
 The master thread controlling the server. */
 
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
 srv_master_thread(
 /*==============*/
 			/* out: a dummy parameter */
@@ -2212,7 +2165,6 @@
 
 	mutex_exit(&kernel_mutex);
 
-	os_event_set(srv_sys->operational);
 loop:
 	/*****************************************************************/
 	/* ---- When there is database activity by users, we cycle in this
@@ -2619,10 +2571,6 @@
 
 	os_thread_exit(NULL);
 
-#ifndef __WIN__
-	return(NULL);				/* Not reached */
-#else
-	return(0);
-#endif
+	OS_THREAD_DUMMY_RETURN;
 }
 #endif /* !UNIV_HOTBACKUP */

--- 1.91/storage/innobase/srv/srv0start.c	2006-03-10 19:22:12 +03:00
+++ 1.92/storage/innobase/srv/srv0start.c	2006-04-26 08:30:32 +04:00
@@ -426,11 +426,7 @@
 I/o-handler thread function. */
 static
 
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
 io_handler_thread(
 /*==============*/
 	void*	arg)
@@ -459,11 +455,7 @@
 
 	os_thread_exit(NULL);
 
-#ifndef __WIN__
-	return(NULL);				/* Not reached */
-#else
-	return(0);
-#endif
+	OS_THREAD_DUMMY_RETURN;
 }
 #endif /* !UNIV_HOTBACKUP */
 
@@ -1539,11 +1531,6 @@
 		}
 	}
 #endif /* UNIV_LOG_ARCHIVE */
-
-	if (srv_measure_contention) {
-		/* os_thread_create(&test_measure_cont, NULL, thread_ids +
-		   SRV_MAX_N_IO_THREADS); */
-	}
 
 	/* fprintf(stderr, "Max allowed record size %lu\n",
 				page_get_free_space_of_empty() / 2); */

--- 1.29/storage/innobase/trx/trx0roll.c	2006-03-10 19:22:12 +03:00
+++ 1.30/storage/innobase/trx/trx0roll.c	2006-04-26 08:30:32 +04:00
@@ -391,11 +391,7 @@
 undo log. If the transaction was not yet committed, then we roll it back.
 Note: this is done in a background thread. */
 
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
 trx_rollback_or_clean_all_without_sess(
 /*===================================*/
 			/* out: a dummy parameter */
@@ -576,13 +572,7 @@
 
 	os_thread_exit(NULL);
 
-	/* The following is dummy code to keep the compiler happy: */
-
-#ifndef __WIN__
-	return(NULL);
-#else
-	return(0);
-#endif
+	OS_THREAD_DUMMY_RETURN;
 }
 
 /***********************************************************************
Thread
bk commit into 5.1 tree (aivanov:1.2370) BUG#19217Alex Ivanov Notebook25 Apr