Commit c531b432 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

merge with 3.23.52

parents ae1ec6e1 a101405b
...@@ -80,5 +80,5 @@ EOF ...@@ -80,5 +80,5 @@ EOF
fi fi
else else
echo "commit failed because '$BK_STATUS', sorry life is hard..." echo "commit failed because '$BK_STATUS', you may need to re-clone..."
fi fi
...@@ -50831,6 +50831,7 @@ users use this code as the rest of the code and because of this we are ...@@ -50831,6 +50831,7 @@ users use this code as the rest of the code and because of this we are
not yet 100% confident in this code. not yet 100% confident in this code.
@menu @menu
* News-3.23.53:: Changes in release 3.23.53
* News-3.23.52:: Changes in release 3.23.52 * News-3.23.52:: Changes in release 3.23.52
* News-3.23.51:: Changes in release 3.23.51 (31 May 2002) * News-3.23.51:: Changes in release 3.23.51 (31 May 2002)
* News-3.23.50:: Changes in release 3.23.50 (21 Apr 2002) * News-3.23.50:: Changes in release 3.23.50 (21 Apr 2002)
...@@ -50887,8 +50888,15 @@ not yet 100% confident in this code. ...@@ -50887,8 +50888,15 @@ not yet 100% confident in this code.
* News-3.23.0:: Changes in release 3.23.0 (05 Aug 1999: Alpha) * News-3.23.0:: Changes in release 3.23.0 (05 Aug 1999: Alpha)
@end menu @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
@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 @appendixsubsec Changes in release 3.23.52
@itemize @bullet @itemize @bullet
@item @item
Fixed problem with @code{UNSIGNED BIGINT} on AIX. Fixed problem with @code{UNSIGNED BIGINT} on AIX.
...@@ -25,33 +25,37 @@ can wait inside InnoDB */ ...@@ -25,33 +25,37 @@ can wait inside InnoDB */
#ifdef __WIN__ #ifdef __WIN__
typedef void* os_thread_t; typedef void* os_thread_t;
typedef ulint os_thread_id_t; /* In Windows the thread id
is an unsigned long int */
#else #else
typedef pthread_t os_thread_t; 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 #endif
#define os_thread_id_t os_thread_t
/* Define a function pointer type to use in a typecast */ /* Define a function pointer type to use in a typecast */
typedef void* (*os_posix_f_t) (void*); typedef void* (*os_posix_f_t) (void*);
/******************************************************************* /*******************************************************************
Compares two threads or thread ids for equality */ Compares two thread ids for equality. */
ibool ibool
os_thread_eq( os_thread_eq(
/*=========*/ /*=========*/
/* out: TRUE if equal */ /* out: TRUE if equal */
os_thread_t a, /* in: OS thread or thread id */ os_thread_id_t a, /* in: OS thread or thread id */
os_thread_t b); /* 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 Converts an OS thread id to a ulint. It is NOT guaranteed that the ulint is
the ulint is unique for the thread though! */ unique for the thread though! */
ulint ulint
os_thread_pf( os_thread_pf(
/*=========*/ /*=========*/
/* out: unsigned long int */ /* 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 Creates a new thread of execution. The execution starts from
the function given. The start function takes a void* parameter the function given. The start function takes a void* parameter
...@@ -69,10 +73,8 @@ os_thread_create( ...@@ -69,10 +73,8 @@ os_thread_create(
#endif #endif
void* arg, /* in: argument to start void* arg, /* in: argument to start
function */ function */
os_thread_id_t* thread_id); /* out: id of created os_thread_id_t* thread_id); /* out: id of the created
thread; currently this is thread */
identical to the handle to
the thread */
/********************************************************************* /*********************************************************************
A thread calling this function ends its execution. */ A thread calling this function ends its execution. */
......
...@@ -19,14 +19,14 @@ Created 9/8/1995 Heikki Tuuri ...@@ -19,14 +19,14 @@ Created 9/8/1995 Heikki Tuuri
#include "srv0srv.h" #include "srv0srv.h"
/******************************************************************* /*******************************************************************
Compares two threads or thread ids for equality */ Compares two thread ids for equality. */
ibool ibool
os_thread_eq( os_thread_eq(
/*=========*/ /*=========*/
/* out: TRUE if equal */ /* out: TRUE if equal */
os_thread_t a, /* in: OS thread or thread id */ os_thread_id_t a, /* in: OS thread or thread id */
os_thread_t b) /* in: OS thread or thread id */ os_thread_id_t b) /* in: OS thread or thread id */
{ {
#ifdef __WIN__ #ifdef __WIN__
if (a == b) { if (a == b) {
...@@ -44,13 +44,13 @@ os_thread_eq( ...@@ -44,13 +44,13 @@ os_thread_eq(
} }
/******************************************************************** /********************************************************************
Converts an OS thread or thread id to a ulint. It is NOT guaranteed that Converts an OS thread id to a ulint. It is NOT guaranteed that the ulint is
the ulint is unique for the thread though! */ unique for the thread though! */
ulint ulint
os_thread_pf( os_thread_pf(
/*=========*/ /*=========*/
os_thread_t a) os_thread_id_t a)
{ {
#ifdef UNIV_HPUX #ifdef UNIV_HPUX
/* In HP-UX a pthread_t is a struct of 3 fields: field1, field2, /* In HP-UX a pthread_t is a struct of 3 fields: field1, field2,
...@@ -64,15 +64,15 @@ os_thread_pf( ...@@ -64,15 +64,15 @@ os_thread_pf(
/********************************************************************* /*********************************************************************
Returns the thread identifier of current thread. Currently the thread Returns the thread identifier of current thread. Currently the thread
identifier is the thread handle itself. Note that in HP-UX pthread_t is identifier in Unix is the thread handle itself. Note that in HP-UX
a struct of 3 fields. */ pthread_t is a struct of 3 fields. */
os_thread_id_t os_thread_id_t
os_thread_get_curr_id(void) os_thread_get_curr_id(void)
/*=======================*/ /*=======================*/
{ {
#ifdef __WIN__ #ifdef __WIN__
return(GetCurrentThread()); return(GetCurrentThreadId());
#else #else
return(pthread_self()); return(pthread_self());
#endif #endif
...@@ -95,11 +95,8 @@ os_thread_create( ...@@ -95,11 +95,8 @@ os_thread_create(
#endif #endif
void* arg, /* in: argument to start void* arg, /* in: argument to start
function */ function */
os_thread_id_t* thread_id __attribute__((unused))) os_thread_id_t* thread_id) /* out: id of the created
/* out: id of created thread */
thread; currently this is
identical to the handle to
the thread */
{ {
#ifdef __WIN__ #ifdef __WIN__
os_thread_t thread; os_thread_t thread;
...@@ -121,7 +118,7 @@ os_thread_create( ...@@ -121,7 +118,7 @@ os_thread_create(
ut_a(SetThreadPriority(thread, srv_query_thread_priority)); ut_a(SetThreadPriority(thread, srv_query_thread_priority));
} }
*thread_id = thread; *thread_id = win_thread_id;
return(thread); return(thread);
#else #else
......
...@@ -259,7 +259,7 @@ convert_error_code_to_mysql( ...@@ -259,7 +259,7 @@ convert_error_code_to_mysql(
extern "C" { extern "C" {
/***************************************************************** /*****************************************************************
Prints info of a THD object (== user session thread) to the 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! */ the prototype for this function! */
void void
...@@ -404,6 +404,9 @@ ha_innobase::update_thd( ...@@ -404,6 +404,9 @@ ha_innobase::update_thd(
return(0); 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 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 call index_read_idx() etc. Actually, we can let the cursor stay open even
...@@ -411,14 +414,15 @@ over a transaction commit! Then you should call this before every operation, ...@@ -411,14 +414,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 fecth next etc. This function inits the necessary things even after a
transaction commit. */ transaction commit. */
/* TODO: THIS CODE HAS NOT BEEN TESTED!!! */
void void
ha_innobase::init_table_handle_for_HANDLER(void) ha_innobase::init_table_handle_for_HANDLER(void)
/*============================================*/ /*============================================*/
{ {
row_prebuilt_t* prebuilt; 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 current thd does not yet have a trx struct, create one.
If the current handle does not yet have a prebuilt struct, create If the current handle does not yet have a prebuilt struct, create
one. Update the trx pointers in the prebuilt struct. Normally one. Update the trx pointers in the prebuilt struct. Normally
...@@ -458,6 +462,7 @@ ha_innobase::init_table_handle_for_HANDLER(void) ...@@ -458,6 +462,7 @@ ha_innobase::init_table_handle_for_HANDLER(void)
prebuilt->read_just_key = FALSE; prebuilt->read_just_key = FALSE;
} }
#endif
/************************************************************************* /*************************************************************************
Opens an InnoDB database. */ Opens an InnoDB database. */
...@@ -2509,6 +2514,7 @@ ha_innobase::rnd_pos( ...@@ -2509,6 +2514,7 @@ ha_innobase::rnd_pos(
Stores a reference to the current row to 'ref' field of the handle. Note 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 that in the case where we have generated the clustered index for the
table, the function parameter is illogical: we MUST ASSUME that 'record' 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 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 it. We just guess that the row id must be for the record where the handle
was positioned the last time. */ was positioned the last time. */
......
...@@ -164,7 +164,8 @@ class ha_innobase: public handler ...@@ -164,7 +164,8 @@ class ha_innobase: public handler
void free_foreign_key_create_info(char* str); void free_foreign_key_create_info(char* str);
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type); 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(); longlong get_auto_increment();
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment