mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
Merge hundin:/my/mysql-4.0 into bitch.mysql.fi:/my/mysql-4.0
This commit is contained in:
commit
23e9db94fb
2 changed files with 10 additions and 5 deletions
|
@ -49343,12 +49343,14 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
|
Fixed query cache align data bug.
|
||||||
|
@item
|
||||||
Fixed mutex bug in replication when reading from master fails.
|
Fixed mutex bug in replication when reading from master fails.
|
||||||
@item
|
@item
|
||||||
Added missing mutex in @code{TRUNCATE TABLE}; This fixes some core
|
Added missing mutex in @code{TRUNCATE TABLE}; This fixes some core
|
||||||
dump/hangup problems when using @code{TRUNCATE TABLE}.
|
dump/hangup problems when using @code{TRUNCATE TABLE}.
|
||||||
@item
|
@item
|
||||||
Fixed bug in multi-table @code{DELETE} when optimiser uses only indices
|
Fixed bug in multi-table @code{DELETE} when optimiser uses only indices.
|
||||||
@item
|
@item
|
||||||
Fixed that @code{ALTER TABLE table_name RENAME new_table_name} is as fast
|
Fixed that @code{ALTER TABLE table_name RENAME new_table_name} is as fast
|
||||||
as @code{RENAME TABLE}.
|
as @code{RENAME TABLE}.
|
||||||
|
|
|
@ -2679,14 +2679,17 @@ my_bool Query_cache::move_by_type(byte **border,
|
||||||
*border += len;
|
*border += len;
|
||||||
*before = new_block;
|
*before = new_block;
|
||||||
/* If result writing complete && we have free space in block */
|
/* If result writing complete && we have free space in block */
|
||||||
ulong free_space = new_block->length - new_block->used;
|
ulong free_space= new_block->length - new_block->used;
|
||||||
|
free_space-= free_space % ALIGN_SIZE(1);
|
||||||
if (query->result()->type == Query_cache_block::RESULT &&
|
if (query->result()->type == Query_cache_block::RESULT &&
|
||||||
new_block->length > new_block->used &&
|
new_block->length > new_block->used &&
|
||||||
*gap + free_space > min_allocation_unit &&
|
*gap + free_space > min_allocation_unit &&
|
||||||
new_block->length - free_space > min_allocation_unit)
|
new_block->length - free_space > min_allocation_unit)
|
||||||
{
|
{
|
||||||
*border -= free_space;
|
*border-= free_space;
|
||||||
*gap += free_space;
|
*gap+= free_space;
|
||||||
|
DBUG_PRINT("qcache",
|
||||||
|
("rest of result free space added to gap (%lu)", *gap));
|
||||||
new_block->length -= free_space;
|
new_block->length -= free_space;
|
||||||
}
|
}
|
||||||
BLOCK_UNLOCK_WR(query_block);
|
BLOCK_UNLOCK_WR(query_block);
|
||||||
|
@ -2747,7 +2750,7 @@ my_bool Query_cache::join_results(ulong join_limit)
|
||||||
header->length() > join_limit)
|
header->length() > join_limit)
|
||||||
{
|
{
|
||||||
Query_cache_block *new_result_block =
|
Query_cache_block *new_result_block =
|
||||||
get_free_block(header->length() +
|
get_free_block(ALIGN_SIZE(header->length()) +
|
||||||
ALIGN_SIZE(sizeof(Query_cache_block)) +
|
ALIGN_SIZE(sizeof(Query_cache_block)) +
|
||||||
ALIGN_SIZE(sizeof(Query_cache_result)), 1, 0);
|
ALIGN_SIZE(sizeof(Query_cache_result)), 1, 0);
|
||||||
if (new_result_block != 0)
|
if (new_result_block != 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue