From 4dfe327a06153de262849d5f75dd9306983d3776 Mon Sep 17 00:00:00 2001 From: "monty@hundin.mysql.fi" <> Date: Mon, 12 Aug 2002 06:49:28 +0300 Subject: [PATCH 1/8] Fix after merge --- sql/ha_innobase.cc | 2 +- sql/mysqld.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index f9c425d0aac..723100da1c4 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -303,7 +303,7 @@ innobase_mysql_print_thd( buf[0]='\n'; buf[1]=0; - ut_a(strlen(old_buf) < 400); + ut_a(strlen(buf) < 400); } } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 150ad8ea379..b4667db5abe 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -617,7 +617,6 @@ void close_server_sock() { DBUG_PRINT("info",("calling shutdown on unix socket")); VOID(shutdown(unix_sock,2)); - DBUG_PRINT("info",("calling closesocket on unix socket")); VOID(unlink(mysql_unix_port)); unix_sock=INVALID_SOCKET; } From 4861939801a8c3b3ae85e56762985a505c7f4e39 Mon Sep 17 00:00:00 2001 From: "arjen@fred.bitbike.com" <> Date: Mon, 12 Aug 2002 14:55:07 +1000 Subject: [PATCH 2/8] Various little docs fixups. --- BitKeeper/etc/config | 1 + BitKeeper/triggers/post-commit | 37 +++++++++++++++++++++++++++------- Docs/manual.texi | 16 +++++++++++++-- 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/BitKeeper/etc/config b/BitKeeper/etc/config index 257f193723f..85b5a871301 100644 --- a/BitKeeper/etc/config +++ b/BitKeeper/etc/config @@ -68,4 +68,5 @@ pager: # hours: [serg:]checkout:get +[arjen:]checkout:get checkout:edit diff --git a/BitKeeper/triggers/post-commit b/BitKeeper/triggers/post-commit index dc5f2f2b824..8780811a2da 100755 --- a/BitKeeper/triggers/post-commit +++ b/BitKeeper/triggers/post-commit @@ -4,6 +4,7 @@ TO=dev-public@mysql.com FROM=$USER@mysql.com INTERNALS=internals@lists.mysql.com +DOCS=docs-commit@mysql.com LIMIT=10000 if [ "$REAL_EMAIL" = "" ] @@ -37,17 +38,39 @@ From: $FROM To: $INTERNALS Subject: bk commit into 3.23 tree -Below is the list of changes that have just been commited into a local -3.23. repository of $USER. When $USER does a push, they will be -propogaged to the main repository and within 24 hours after the push into -the public repository. For information on how to access -the public repository see -http://www.mysql.com/doc/I/n/Installing_source_tree.html +Below is the list of changes that have just been committed into a local +3.23 repository of $USER. When $USER 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://www.mysql.com/doc/I/n/Installing_source_tree.html EOF bk changes -v -r+ bk cset -r+ -d ) | head -n $LIMIT | /usr/sbin/sendmail -t + +#++ +# docs-commit@ mail +# Picks up anything under the Docs subdirectory (relevant for docs team). +#-- + bk changes -v -r+ | grep -q " Docs/" + if [ $? -eq 0 ] + then + echo "Notifying docs list at $DOCS" + ( + cat < +From: $FROM +To: $DOCS +Subject: bk commit - 3.23 tree (Manual) + +EOF + bk changes -v -r+ + bk cset -r+ -d + ) | head -n $LIMIT | /usr/sbin/sendmail -t + fi + else - echo "commit failed because '$BK_STATUS', sorry life is hard..." + echo "commit failed because '$BK_STATUS', you may need to re-clone..." fi diff --git a/Docs/manual.texi b/Docs/manual.texi index 6e86d85ee38..0e040c08bc5 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -46868,6 +46868,7 @@ users use this code as the rest of the code and because of this we are not yet 100% confident in this code. @menu +* News-3.23.53:: Changes in release 3.23.53 * News-3.23.52:: Changes in release 3.23.52 * News-3.23.51:: Changes in release 3.23.51 * News-3.23.50:: Changes in release 3.23.50 @@ -46924,8 +46925,18 @@ not yet 100% confident in this code. * News-3.23.0:: Changes in release 3.23.0 @end menu -@node News-3.23.52, News-3.23.51, News-3.23.x, News-3.23.x +@node News-3.23.53, News-3.23.52, News-3.23.x, News-3.23.x +@appendixsubsec Changes in release 3.23.53 + +@itemize @bullet +@item +Changed behaviour that @code{IF(condition,column,NULL)} always returns +column type. +@end itemize + +@node News-3.23.52, News-3.23.51, News-3.23.53, News-3.23.x @appendixsubsec Changes in release 3.23.52 + @itemize @bullet @item Fixed problem with @code{UNSIGNED BIGINT} on AIX. @@ -47002,7 +47013,8 @@ Fixed bug in @code{DROP DATABASE} with symlinked directory. Fixed optimization problem with @code{DATETIME} and value outside @code{DATETIME} range. @item -Removed BDB documentation. +Removed Sleepycat's BDB doc files from the source tree, as they're not +needed (MySQL covers BDB in its own documentation). @item Fixed mit-pthreads to compile with glibc 2.2 (needed for @code{make dist}). @item From 389d730d0374a8f77cef8d1cd190aad7570ef4c4 Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Mon, 12 Aug 2002 08:29:15 +0300 Subject: [PATCH 3/8] ha_innobase.cc: Cleanup of latest rewrite of innobase_mysql_print_thd; from now on changing this code is forbidden unless a written permission is received from Heikki 3 days in advance --- sql/ha_innobase.cc | 72 ++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 723100da1c4..69d539fc061 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -253,57 +253,66 @@ convert_error_code_to_mysql( extern "C" { /***************************************************************** Prints info of a THD object (== user session thread) to the -standard output. NOTE that mysql/innobase/trx/trx0trx.c must contain +standard output. NOTE that /mysql/innobase/trx/trx0trx.c must contain the prototype for this function! */ void innobase_mysql_print_thd( /*=====================*/ - char* buf, /* in/out: buffer where to print, must be at least + char* buf, /* in/out: buffer where to print, must be at least 400 bytes */ - void* input_thd)/* in: pointer to a MySQL THD object */ + void* input_thd)/* in: pointer to a MySQL THD object */ { - THD* thd; + THD* thd; + char* old_buf = buf; thd = (THD*) input_thd; - /* We can't use value of sprintf() as this is not portable */ - buf+= my_sprintf(buf, - (buf, "MySQL thread id %lu", - thd->thread_id)); - if (thd->host) - { - *buf++=' '; - buf=strnmov(buf, thd->host, 30); + /* We cannot use the return value of normal sprintf() as this is + not portable to some old non-Posix Unixes, e.g., some old SCO + Unixes */ + + buf += my_sprintf(buf, + (buf, "MySQL thread id %lu, query id %lu", + thd->thread_id, thd->query_id)); + if (thd->host) { + *buf = ' '; + buf++; + buf = strnmov(buf, thd->host, 30); } - if (thd->ip) - { - *buf++=' '; - buf=strnmov(buf, thd->ip, 20); + if (thd->ip) { + *buf = ' '; + buf++; + buf=strnmov(buf, thd->ip, 20); } - if (thd->user) - { - *buf++=' '; - buf=strnmov(buf, thd->user, 20); + if (thd->user) { + *buf = ' '; + buf++; + buf=strnmov(buf, thd->user, 20); } - if (thd->proc_info) - { - *buf++=' '; - buf=strnmov(buf, thd->proc_info, 50); + if (thd->proc_info) { + *buf = ' '; + buf++; + buf=strnmov(buf, thd->proc_info, 50); } - if (thd->query) - { - *buf++='\n'; - buf=strnmov(buf, thd->query, 150); + if (thd->query) { + *buf = '\n'; + buf++; + buf=strnmov(buf, thd->query, 150); } - buf[0]='\n'; - buf[1]=0; - ut_a(strlen(buf) < 400); + buf[0] = '\n'; + buf[1] = '\0'; /* Note that we must put a null character here to end + the printed string */ + + /* We test the printed length did not overrun the buffer length of + 400 bytes */ + + ut_a(strlen(old_buf) < 400); } } @@ -2470,6 +2479,7 @@ ha_innobase::rnd_pos( Stores a reference to the current row to 'ref' field of the handle. Note that in the case where we have generated the clustered index for the table, the function parameter is illogical: we MUST ASSUME that 'record' +is the current 'position' of the handle, because if row ref is actually the row id internally generated in InnoDB, then 'record' does not contain it. We just guess that the row id must be for the record where the handle was positioned the last time. */ From ce61cb54c84a6c101fa917aeffacbcf251874250 Mon Sep 17 00:00:00 2001 From: "arjen@fred.bitbike.com" <> Date: Mon, 12 Aug 2002 18:24:28 +1000 Subject: [PATCH 4/8] Update docs because of stable tree revert. --- Docs/manual.texi | 3 --- 1 file changed, 3 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index 0e040c08bc5..e4b9247c09d 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -46929,9 +46929,6 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.53 @itemize @bullet -@item -Changed behaviour that @code{IF(condition,column,NULL)} always returns -column type. @end itemize @node News-3.23.52, News-3.23.51, News-3.23.53, News-3.23.x From efe85086c6648b426d58eaae069c640a0f7e18c4 Mon Sep 17 00:00:00 2001 From: "serg@sergbook.mysql.com" <> Date: Mon, 12 Aug 2002 15:11:58 +0200 Subject: [PATCH 5/8] undo InnoDB HANDLER patch as it should not go into 3.23 tree --- innobase/include/trx0trx.h | 7 ----- innobase/trx/trx0trx.c | 11 -------- sql/ha_innobase.cc | 55 -------------------------------------- sql/ha_innobase.h | 1 - 4 files changed, 74 deletions(-) diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index e1f65e9da0f..84d85fcaff6 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -117,13 +117,6 @@ void trx_start_if_not_started( /*=====================*/ trx_t* trx); /* in: transaction */ -/***************************************************************** -Starts the transaction if it is not yet started. */ - -void -trx_start_if_not_started_noninline( -/*===============================*/ - trx_t* trx); /* in: transaction */ /******************************************************************** Commits a transaction. */ diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index b8cf7ad4a6d..94a11042de5 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -39,17 +39,6 @@ sess_t* trx_dummy_sess = NULL; the kernel mutex */ ulint trx_n_mysql_transactions = 0; -/***************************************************************** -Starts the transaction if it is not yet started. */ - -void -trx_start_if_not_started_noninline( -/*===============================*/ - trx_t* trx) /* in: transaction */ -{ - trx_start_if_not_started(trx); -} - /******************************************************************** Retrieves the error_info field from a trx. */ diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 69d539fc061..878f8855b07 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -398,61 +398,6 @@ ha_innobase::update_thd( return(0); } -/********************************************************************* -Call this when you have opened a new table handle in HANDLER, before you -call index_read_idx() etc. Actually, we can let the cursor stay open even -over a transaction commit! Then you should call this before every operation, -fecth next etc. This function inits the necessary things even after a -transaction commit. */ - -/* TODO: THIS CODE HAS NOT BEEN TESTED!!! */ - -void -ha_innobase::init_table_handle_for_HANDLER(void) -/*============================================*/ -{ - row_prebuilt_t* prebuilt; - - /* If current thd does not yet have a trx struct, create one. - If the current handle does not yet have a prebuilt struct, create - one. Update the trx pointers in the prebuilt struct. Normally - this operation is done in external_lock. */ - - update_thd(current_thd); - - /* Initialize the prebuilt struct much like it would be inited in - external_lock */ - - prebuilt = (row_prebuilt_t*)innobase_prebuilt; - - /* If the transaction is not started yet, start it */ - - trx_start_if_not_started_noninline(prebuilt->trx); - - /* Assign a read view if the transaction does not have it yet */ - - trx_assign_read_view(prebuilt->trx); - - /* We did the necessary inits in this function, no need to repeat them - in row_search_for_mysql */ - - prebuilt->sql_stat_start = FALSE; - - /* We let HANDLER always to do the reads as consistent reads, even - if the trx isolation level would have been specified as SERIALIZABLE */ - - prebuilt->select_lock_type = LOCK_NONE; - - /* Always fetch all columns in the index record */ - - prebuilt->hint_no_need_to_fetch_extra_cols = FALSE; - - /* We want always to fetch all columns in the whole row? Or do - we???? */ - - prebuilt->read_just_key = FALSE; -} - /************************************************************************* Opens an InnoDB database. */ diff --git a/sql/ha_innobase.h b/sql/ha_innobase.h index 2c69018ed38..abb6ade79f7 100644 --- a/sql/ha_innobase.h +++ b/sql/ha_innobase.h @@ -157,7 +157,6 @@ class ha_innobase: public handler void free_foreign_key_create_info(char* str); THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); - void init_table_handle_for_HANDLER(); /* TODO: NOT TESTED!!! */ longlong get_auto_increment(); }; From 7cbe8b369ae712a5ce8d990717cc28b1ca2d87ff Mon Sep 17 00:00:00 2001 From: "serg@sergbook.mysql.com" <> Date: Mon, 12 Aug 2002 16:18:37 +0200 Subject: [PATCH 6/8] put InnoDB HANDLER patch back again :)) --- innobase/include/trx0trx.h | 7 +++++ innobase/trx/trx0trx.c | 11 ++++++++ sql/ha_innobase.cc | 55 ++++++++++++++++++++++++++++++++++++++ sql/ha_innobase.h | 1 + 4 files changed, 74 insertions(+) diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index 84d85fcaff6..e1f65e9da0f 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -117,6 +117,13 @@ void trx_start_if_not_started( /*=====================*/ trx_t* trx); /* in: transaction */ +/***************************************************************** +Starts the transaction if it is not yet started. */ + +void +trx_start_if_not_started_noninline( +/*===============================*/ + trx_t* trx); /* in: transaction */ /******************************************************************** Commits a transaction. */ diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index 94a11042de5..b8cf7ad4a6d 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -39,6 +39,17 @@ sess_t* trx_dummy_sess = NULL; the kernel mutex */ ulint trx_n_mysql_transactions = 0; +/***************************************************************** +Starts the transaction if it is not yet started. */ + +void +trx_start_if_not_started_noninline( +/*===============================*/ + trx_t* trx) /* in: transaction */ +{ + trx_start_if_not_started(trx); +} + /******************************************************************** Retrieves the error_info field from a trx. */ diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 878f8855b07..69d539fc061 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -398,6 +398,61 @@ ha_innobase::update_thd( return(0); } +/********************************************************************* +Call this when you have opened a new table handle in HANDLER, before you +call index_read_idx() etc. Actually, we can let the cursor stay open even +over a transaction commit! Then you should call this before every operation, +fecth next etc. This function inits the necessary things even after a +transaction commit. */ + +/* TODO: THIS CODE HAS NOT BEEN TESTED!!! */ + +void +ha_innobase::init_table_handle_for_HANDLER(void) +/*============================================*/ +{ + row_prebuilt_t* prebuilt; + + /* If current thd does not yet have a trx struct, create one. + If the current handle does not yet have a prebuilt struct, create + one. Update the trx pointers in the prebuilt struct. Normally + this operation is done in external_lock. */ + + update_thd(current_thd); + + /* Initialize the prebuilt struct much like it would be inited in + external_lock */ + + prebuilt = (row_prebuilt_t*)innobase_prebuilt; + + /* If the transaction is not started yet, start it */ + + trx_start_if_not_started_noninline(prebuilt->trx); + + /* Assign a read view if the transaction does not have it yet */ + + trx_assign_read_view(prebuilt->trx); + + /* We did the necessary inits in this function, no need to repeat them + in row_search_for_mysql */ + + prebuilt->sql_stat_start = FALSE; + + /* We let HANDLER always to do the reads as consistent reads, even + if the trx isolation level would have been specified as SERIALIZABLE */ + + prebuilt->select_lock_type = LOCK_NONE; + + /* Always fetch all columns in the index record */ + + prebuilt->hint_no_need_to_fetch_extra_cols = FALSE; + + /* We want always to fetch all columns in the whole row? Or do + we???? */ + + prebuilt->read_just_key = FALSE; +} + /************************************************************************* Opens an InnoDB database. */ diff --git a/sql/ha_innobase.h b/sql/ha_innobase.h index abb6ade79f7..2c69018ed38 100644 --- a/sql/ha_innobase.h +++ b/sql/ha_innobase.h @@ -157,6 +157,7 @@ class ha_innobase: public handler void free_foreign_key_create_info(char* str); THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); + void init_table_handle_for_HANDLER(); /* TODO: NOT TESTED!!! */ longlong get_auto_increment(); }; From 49f658281f612b8b9806c3e68edfe46d11ba87f8 Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Mon, 12 Aug 2002 17:31:57 +0300 Subject: [PATCH 7/8] ha_innobase.h, ha_innobase.cc: Put a note that the InnoDB HANDLER code is not used until 4.1, and appears for documentational purposes only --- sql/ha_innobase.cc | 9 +++++++-- sql/ha_innobase.h | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 69d539fc061..b69cbfa2c48 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -398,6 +398,9 @@ ha_innobase::update_thd( return(0); } +#ifdef notdefined +/* The code here appears for documentational purposes only. Not used +or tested yet. Will be used in 4.1. */ /********************************************************************* Call this when you have opened a new table handle in HANDLER, before you call index_read_idx() etc. Actually, we can let the cursor stay open even @@ -405,14 +408,15 @@ over a transaction commit! Then you should call this before every operation, fecth next etc. This function inits the necessary things even after a transaction commit. */ -/* TODO: THIS CODE HAS NOT BEEN TESTED!!! */ - void ha_innobase::init_table_handle_for_HANDLER(void) /*============================================*/ { row_prebuilt_t* prebuilt; + ut_a(0); /* the code has not been used or tested yet; to prevent + inadvertent usage we assert an error here */ + /* If current thd does not yet have a trx struct, create one. If the current handle does not yet have a prebuilt struct, create one. Update the trx pointers in the prebuilt struct. Normally @@ -452,6 +456,7 @@ ha_innobase::init_table_handle_for_HANDLER(void) prebuilt->read_just_key = FALSE; } +#endif /************************************************************************* Opens an InnoDB database. */ diff --git a/sql/ha_innobase.h b/sql/ha_innobase.h index 2c69018ed38..2804280575c 100644 --- a/sql/ha_innobase.h +++ b/sql/ha_innobase.h @@ -157,7 +157,8 @@ class ha_innobase: public handler void free_foreign_key_create_info(char* str); THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); - void init_table_handle_for_HANDLER(); /* TODO: NOT TESTED!!! */ + /* void init_table_handle_for_HANDLER(); Not tested or used yet, code + included for documentational purposes only */ longlong get_auto_increment(); }; From a101405b03fd5f5e1c7ac5195fde9ad236f6fbe8 Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Tue, 13 Aug 2002 01:22:27 +0300 Subject: [PATCH 8/8] os0thread.h, os0thread.c: Fix a critical portability bug introduced in the Windows version --- innobase/include/os0thread.h | 24 +++++++++++++----------- innobase/os/os0thread.c | 26 ++++++++++++-------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/innobase/include/os0thread.h b/innobase/include/os0thread.h index 95a3a95fb74..9459750719f 100644 --- a/innobase/include/os0thread.h +++ b/innobase/include/os0thread.h @@ -25,33 +25,37 @@ can wait inside InnoDB */ #ifdef __WIN__ typedef void* os_thread_t; +typedef ulint os_thread_id_t; /* In Windows the thread id + is an unsigned long int */ #else typedef pthread_t os_thread_t; +typedef os_thread_t os_thread_id_t; /* In Unix we use the thread + handle itself as the id of + the thread */ #endif -#define os_thread_id_t os_thread_t /* Define a function pointer type to use in a typecast */ typedef void* (*os_posix_f_t) (void*); /******************************************************************* -Compares two threads or thread ids for equality */ +Compares two thread ids for equality. */ ibool os_thread_eq( /*=========*/ /* out: TRUE if equal */ - os_thread_t a, /* in: OS thread or thread id */ - os_thread_t b); /* in: OS thread or thread id */ + os_thread_id_t a, /* in: OS thread or thread id */ + os_thread_id_t b); /* in: OS thread or thread id */ /******************************************************************** -Converts an OS thread or thread id to a ulint. It is NOT guaranteed that -the ulint is unique for the thread though! */ +Converts an OS thread id to a ulint. It is NOT guaranteed that the ulint is +unique for the thread though! */ ulint os_thread_pf( /*=========*/ /* out: unsigned long int */ - os_thread_t a); /* in: thread or thread id */ + os_thread_id_t a); /* in: thread or thread id */ /******************************************************************** Creates a new thread of execution. The execution starts from the function given. The start function takes a void* parameter @@ -69,10 +73,8 @@ os_thread_create( #endif void* arg, /* in: argument to start function */ - os_thread_id_t* thread_id); /* out: id of created - thread; currently this is - identical to the handle to - the thread */ + os_thread_id_t* thread_id); /* out: id of the created + thread */ /********************************************************************* A thread calling this function ends its execution. */ diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c index 9eb80cdf826..d137014a6af 100644 --- a/innobase/os/os0thread.c +++ b/innobase/os/os0thread.c @@ -19,14 +19,14 @@ Created 9/8/1995 Heikki Tuuri #include "srv0srv.h" /******************************************************************* -Compares two threads or thread ids for equality */ +Compares two thread ids for equality. */ ibool os_thread_eq( /*=========*/ /* out: TRUE if equal */ - os_thread_t a, /* in: OS thread or thread id */ - os_thread_t b) /* in: OS thread or thread id */ + os_thread_id_t a, /* in: OS thread or thread id */ + os_thread_id_t b) /* in: OS thread or thread id */ { #ifdef __WIN__ if (a == b) { @@ -44,13 +44,13 @@ os_thread_eq( } /******************************************************************** -Converts an OS thread or thread id to a ulint. It is NOT guaranteed that -the ulint is unique for the thread though! */ +Converts an OS thread id to a ulint. It is NOT guaranteed that the ulint is +unique for the thread though! */ ulint os_thread_pf( /*=========*/ - os_thread_t a) + os_thread_id_t a) { #ifdef UNIV_HPUX /* In HP-UX a pthread_t is a struct of 3 fields: field1, field2, @@ -64,15 +64,15 @@ os_thread_pf( /********************************************************************* Returns the thread identifier of current thread. Currently the thread -identifier is the thread handle itself. Note that in HP-UX pthread_t is -a struct of 3 fields. */ +identifier in Unix is the thread handle itself. Note that in HP-UX +pthread_t is a struct of 3 fields. */ os_thread_id_t os_thread_get_curr_id(void) /*=======================*/ { #ifdef __WIN__ - return(GetCurrentThread()); + return(GetCurrentThreadId()); #else return(pthread_self()); #endif @@ -95,10 +95,8 @@ os_thread_create( #endif void* arg, /* in: argument to start function */ - os_thread_id_t* thread_id) /* out: id of created - thread; currently this is - identical to the handle to - the thread */ + os_thread_id_t* thread_id) /* out: id of the created + thread */ { #ifdef __WIN__ os_thread_t thread; @@ -120,7 +118,7 @@ os_thread_create( ut_a(SetThreadPriority(thread, srv_query_thread_priority)); } - *thread_id = thread; + *thread_id = win_thread_id; return(thread); #else