Skip to content

Commit d21d49a

Browse files
author
monty@mysql.com
committed
Merge with 4.0.19
2 parents 104fdf6 + e51887b commit d21d49a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+988
-440
lines changed

BitKeeper/etc/logging_ok

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ acurtis@pcgem.rdg.cyberkinetica.com
1010
administrador@light.hegel.local
1111
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
1212
akishkin@work.mysql.com
13+
antony@ltantony.dsl-verizon.net
1314
antony@ltantony.rdg.cyberkinetica.homeunix.net
1415
arjen@bitbike.com
1516
arjen@co3064164-a.bitbike.com
@@ -116,6 +117,7 @@ papa@gbichot.local
116117
paul@central.snake.net
117118
paul@ice.local
118119
paul@ice.snake.net
120+
paul@kite-hub.kitebird.com
119121
paul@teton.kitebird.com
120122
pem@mysql.com
121123
peter@linux.local
@@ -150,6 +152,7 @@ tfr@sarvik.tfr.cafe.ee
150152
tim@bitch.mysql.fi
151153
tim@black.box
152154
tim@hundin.mysql.fi
155+
tim@sand.box
153156
tim@threads.polyesthetic.msg
154157
tim@white.box
155158
tim@work.mysql.com

VC++Files/client/mysqlclient.dsp

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VC++Files/libmysqld/libmysqld.def

-152
This file was deleted.

extra/perror.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static HA_ERRORS ha_errlist[]=
7171
{ 136,"No more room in index file" },
7272
{ 137,"No more records (read after end of file)" },
7373
{ 138,"Unsupported extension used for table" },
74-
{ 139,"Too big row (>= 16 M)"},
74+
{ 139,"Too big row"},
7575
{ 140,"Wrong create options"},
7676
{ 141,"Duplicate unique key or constraint on write or update"},
7777
{ 142,"Unknown character set used"},

extra/replace.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,10 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
279279
length=(uint) strlen(name)+1;
280280
if (pa->length+length >= pa->max_length)
281281
{
282+
pa->max_length=(pa->length+length+MALLOC_OVERHEAD+PS_MALLOC-1)/PS_MALLOC;
283+
pa->max_length=pa->max_length*PS_MALLOC-MALLOC_OVERHEAD;
282284
if (!(new_pos= (byte*) my_realloc((gptr) pa->str,
283-
(uint) (pa->max_length+PS_MALLOC),
285+
(uint) pa->max_length,
284286
MYF(MY_WME))))
285287
DBUG_RETURN(1);
286288
if (new_pos != pa->str)
@@ -291,7 +293,6 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
291293
char*);
292294
pa->str=new_pos;
293295
}
294-
pa->max_length+=PS_MALLOC;
295296
}
296297
if (pa->typelib.count >= pa->max_count-1)
297298
{

innobase/include/lock0lock.h

+20-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ lock_table(
381381
/* out: DB_SUCCESS, DB_LOCK_WAIT,
382382
DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */
383383
ulint flags, /* in: if BTR_NO_LOCKING_FLAG bit is set,
384-
does nothing */
384+
does nothing;
385+
if LOCK_TABLE_EXP bits are set,
386+
creates an explicit table lock */
385387
dict_table_t* table, /* in: database table in dictionary cache */
386388
ulint mode, /* in: lock mode */
387389
que_thr_t* thr); /* in: query thread */
@@ -394,6 +396,14 @@ lock_is_on_table(
394396
/* out: TRUE if there are lock(s) */
395397
dict_table_t* table); /* in: database table in dictionary cache */
396398
/*************************************************************************
399+
Releases a table lock.
400+
Releases possible other transactions waiting for this lock. */
401+
402+
void
403+
lock_table_unlock(
404+
/*==============*/
405+
lock_t* lock); /* in: lock */
406+
/*************************************************************************
397407
Releases an auto-inc lock a transaction possibly has on a table.
398408
Releases possible other transactions waiting for this lock. */
399409

@@ -410,6 +420,14 @@ lock_release_off_kernel(
410420
/*====================*/
411421
trx_t* trx); /* in: transaction */
412422
/*************************************************************************
423+
Releases table locks, and releases possible other transactions waiting
424+
because of these locks. */
425+
426+
void
427+
lock_release_tables_off_kernel(
428+
/*===========================*/
429+
trx_t* trx); /* in: transaction */
430+
/*************************************************************************
413431
Cancels a waiting lock request and releases possible other transactions
414432
waiting behind it. */
415433

@@ -536,6 +554,7 @@ extern lock_sys_t* lock_sys;
536554
/* Lock types */
537555
#define LOCK_TABLE 16 /* these type values should be so high that */
538556
#define LOCK_REC 32 /* they can be ORed to the lock mode */
557+
#define LOCK_TABLE_EXP 80 /* explicit table lock */
539558
#define LOCK_TYPE_MASK 0xF0UL /* mask used to extract lock type from the
540559
type_mode field in a lock */
541560
/* Waiting lock flag */

innobase/include/row0mysql.h

+16
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,22 @@ row_lock_table_autoinc_for_mysql(
161161
row_prebuilt_t* prebuilt); /* in: prebuilt struct in the MySQL
162162
table handle */
163163
/*************************************************************************
164+
Unlocks a table lock possibly reserved by trx. */
165+
166+
void
167+
row_unlock_table_for_mysql(
168+
/*=======================*/
169+
trx_t* trx); /* in: transaction */
170+
/*************************************************************************
171+
Sets a table lock on the table mentioned in prebuilt. */
172+
173+
int
174+
row_lock_table_for_mysql(
175+
/*=====================*/
176+
/* out: error code or DB_SUCCESS */
177+
row_prebuilt_t* prebuilt); /* in: prebuilt struct in the MySQL
178+
table handle */
179+
/*************************************************************************
164180
Does an insert for MySQL. */
165181

166182
int

innobase/include/sync0sync.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void
218218
mutex_get_debug_info(
219219
/*=================*/
220220
mutex_t* mutex, /* in: mutex */
221-
char** file_name, /* out: file where requested */
221+
const char** file_name, /* out: file where requested */
222222
ulint* line, /* out: line where requested */
223223
os_thread_id_t* thread_id); /* out: id of the thread which owns
224224
the mutex */

innobase/include/trx0trx.h

+2
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ struct trx_struct{
421421
lock_t* auto_inc_lock; /* possible auto-inc lock reserved by
422422
the transaction; note that it is also
423423
in the lock list trx_locks */
424+
ulint n_tables_locked;/* number of table locks reserved by
425+
the transaction, stored in trx_locks */
424426
UT_LIST_NODE_T(trx_t)
425427
trx_list; /* list of transactions */
426428
UT_LIST_NODE_T(trx_t)

0 commit comments

Comments
 (0)