1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-22 17:44:29 +03:00

Merge chilla.local:/home/mydev/mysql-5.1-amain

into  chilla.local:/home/mydev/mysql-5.1-axmrg
This commit is contained in:
unknown
2007-07-22 21:04:53 +02:00
14 changed files with 114 additions and 17 deletions

View File

@@ -2355,7 +2355,13 @@ static bool update_frm_version(TABLE *table)
int result= 1;
DBUG_ENTER("update_frm_version");
if (table->s->mysql_version != MYSQL_VERSION_ID)
/*
No need to update frm version in case table was created or checked
by server with the same version. This also ensures that we do not
update frm version for temporary tables as this code doesn't support
temporary tables.
*/
if (table->s->mysql_version == MYSQL_VERSION_ID)
DBUG_RETURN(0);
strxmov(path, table->s->normalized_path.str, reg_ext, NullS);

View File

@@ -878,10 +878,14 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
query_cache_size= query_cache_size_arg;
ulong new_query_cache_size= init_cache();
DBUG_EXECUTE("check_querycache",check_integrity(0););
STRUCT_LOCK(&structure_guard_mutex);
m_cache_status= Query_cache::NO_FLUSH_IN_PROGRESS;
/*
Must not call check_integrity() with
m_cache_status != Query_cache::NO_FLUSH_IN_PROGRESS.
It would wait forever.
*/
DBUG_EXECUTE("check_querycache",check_integrity(1););
pthread_cond_signal(&COND_cache_status_changed);
STRUCT_UNLOCK(&structure_guard_mutex);
@@ -4025,6 +4029,10 @@ my_bool Query_cache::check_integrity(bool locked)
Query_cache_block * block = first_block;
do
{
/* When checking at system start, there is no block. */
if (!block)
break;
DBUG_PRINT("qcache", ("block 0x%lx, type %u...",
(ulong) block, (uint) block->type));
// Check allignment

View File

@@ -6333,11 +6333,9 @@ view_err:
{
VOID(pthread_mutex_lock(&LOCK_open));
wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
table->file->ha_external_lock(thd, F_WRLCK);
VOID(pthread_mutex_unlock(&LOCK_open));
alter_table_manage_keys(table, table->file->indexes_are_disabled(),
alter_info->keys_onoff);
table->file->ha_external_lock(thd, F_UNLCK);
VOID(pthread_mutex_unlock(&LOCK_open));
error= ha_commit_stmt(thd);
if (ha_commit(thd))
error= 1;