Commit ab165ae6 authored by Alexander Nozdrin's avatar Alexander Nozdrin

Merge next-mr -> next-mr-bugfixing.

parents fc195708 f4a1177c
...@@ -1781,6 +1781,14 @@ sub environment_setup { ...@@ -1781,6 +1781,14 @@ sub environment_setup {
$ENV{'HA_EXAMPLE_SO'}="'".$plugin_filename."'"; $ENV{'HA_EXAMPLE_SO'}="'".$plugin_filename."'";
$ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=;EXAMPLE=".$plugin_filename.";"; $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=;EXAMPLE=".$plugin_filename.";";
} }
else
{
# Some ".opt" files use some of these variables, so they must be defined
$ENV{'EXAMPLE_PLUGIN'}= "";
$ENV{'EXAMPLE_PLUGIN_OPT'}= "";
$ENV{'HA_EXAMPLE_SO'}= "";
$ENV{'EXAMPLE_PLUGIN_LOAD'}= "";
}
# ---------------------------------------------------- # ----------------------------------------------------
# Add the path where mysqld will find mypluglib.so # Add the path where mysqld will find mypluglib.so
......
...@@ -180,8 +180,6 @@ NULL mysqltest_db1 trg5 DELETE NULL mysqltest_db1 t1 0 NULL SET @a = 5 ROW BEFOR ...@@ -180,8 +180,6 @@ NULL mysqltest_db1 trg5 DELETE NULL mysqltest_db1 t1 0 NULL SET @a = 5 ROW BEFOR
DROP USER mysqltest_dfn@localhost; DROP USER mysqltest_dfn@localhost;
DROP USER mysqltest_inv@localhost; DROP USER mysqltest_inv@localhost;
DROP DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1;
Warnings:
Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.
DELETE FROM mysql.user WHERE User LIKE 'mysqltest_%'; DELETE FROM mysql.user WHERE User LIKE 'mysqltest_%';
DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%'; DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%';
DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%'; DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%';
......
...@@ -12,11 +12,11 @@ let $MYSQLD_DATADIR= `select @@datadir`; ...@@ -12,11 +12,11 @@ let $MYSQLD_DATADIR= `select @@datadir`;
drop table if exists t1; drop table if exists t1;
create table t1 (a int) engine=myisam; create table t1 (a int) engine=myisam;
--remove_file $MYSQLD_DATADIR/test/t1.MYI --remove_file $MYSQLD_DATADIR/test/t1.MYI
--error 1051,6 --error ER_BAD_TABLE_ERROR,6
drop table t1; drop table t1;
create table t1 (a int) engine=myisam; create table t1 (a int) engine=myisam;
--remove_file $MYSQLD_DATADIR/test/t1.MYD --remove_file $MYSQLD_DATADIR/test/t1.MYD
--error 1105,6,29 --error ER_BAD_TABLE_ERROR,6,29
drop table t1; drop table t1;
--error 1051 --error ER_BAD_TABLE_ERROR
drop table t1; drop table t1;
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* /**
@file
These functions handle keyblock cacheing for ISAM and MyISAM tables. These functions handle keyblock cacheing for ISAM and MyISAM tables.
One cache can handle many files. One cache can handle many files.
...@@ -36,7 +37,9 @@ ...@@ -36,7 +37,9 @@
blocks_unused is the sum of never used blocks in the pool and of currently blocks_unused is the sum of never used blocks in the pool and of currently
free blocks. blocks_used is the number of blocks fetched from the pool and free blocks. blocks_used is the number of blocks fetched from the pool and
as such gives the maximum number of in-use blocks at any time. as such gives the maximum number of in-use blocks at any time.
*/
/*
Key Cache Locking Key Cache Locking
================= =================
...@@ -761,6 +764,13 @@ void end_key_cache(KEY_CACHE *keycache, my_bool cleanup) ...@@ -761,6 +764,13 @@ void end_key_cache(KEY_CACHE *keycache, my_bool cleanup)
(ulong) keycache->global_cache_r_requests, (ulong) keycache->global_cache_r_requests,
(ulong) keycache->global_cache_read)); (ulong) keycache->global_cache_read));
/*
Reset these values to be able to detect a disabled key cache.
See Bug#44068 (RESTORE can disable the MyISAM Key Cache).
*/
keycache->blocks_used= 0;
keycache->blocks_unused= 0;
if (cleanup) if (cleanup)
{ {
pthread_mutex_destroy(&keycache->cache_lock); pthread_mutex_destroy(&keycache->cache_lock);
...@@ -1344,7 +1354,11 @@ static void unreg_request(KEY_CACHE *keycache, ...@@ -1344,7 +1354,11 @@ static void unreg_request(KEY_CACHE *keycache,
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->next_used);
DBUG_ASSERT(!block->prev_used); DBUG_ASSERT(!block->prev_used);
if (! --block->requests) /*
Unregister the request, but do not link erroneous blocks into the
LRU ring.
*/
if (!--block->requests && !(block->status & BLOCK_ERROR))
{ {
my_bool hot; my_bool hot;
if (block->hits_left) if (block->hits_left)
...@@ -1426,8 +1440,7 @@ static void wait_for_readers(KEY_CACHE *keycache, ...@@ -1426,8 +1440,7 @@ static void wait_for_readers(KEY_CACHE *keycache,
#ifdef THREAD #ifdef THREAD
struct st_my_thread_var *thread= my_thread_var; struct st_my_thread_var *thread= my_thread_var;
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
DBUG_ASSERT(!(block->status & (BLOCK_ERROR | BLOCK_IN_FLUSH | DBUG_ASSERT(!(block->status & (BLOCK_IN_FLUSH | BLOCK_CHANGED)));
BLOCK_CHANGED)));
DBUG_ASSERT(block->hash_link); DBUG_ASSERT(block->hash_link);
DBUG_ASSERT(block->hash_link->block == block); DBUG_ASSERT(block->hash_link->block == block);
/* Linked in file_blocks or changed_blocks hash. */ /* Linked in file_blocks or changed_blocks hash. */
...@@ -2211,9 +2224,9 @@ restart: ...@@ -2211,9 +2224,9 @@ restart:
thread might change the block->hash_link value thread might change the block->hash_link value
*/ */
error= my_pwrite(block->hash_link->file, error= my_pwrite(block->hash_link->file,
block->buffer+block->offset, block->buffer + block->offset,
block->length - block->offset, block->length - block->offset,
block->hash_link->diskpos+ block->offset, block->hash_link->diskpos + block->offset,
MYF(MY_NABP | MY_WAIT_IF_FULL)); MYF(MY_NABP | MY_WAIT_IF_FULL));
keycache_pthread_mutex_lock(&keycache->cache_lock); keycache_pthread_mutex_lock(&keycache->cache_lock);
...@@ -2537,7 +2550,6 @@ uchar *key_cache_read(KEY_CACHE *keycache, ...@@ -2537,7 +2550,6 @@ uchar *key_cache_read(KEY_CACHE *keycache,
reg1 BLOCK_LINK *block; reg1 BLOCK_LINK *block;
uint read_length; uint read_length;
uint offset; uint offset;
uint status;
int page_st; int page_st;
if (MYSQL_KEYCACHE_READ_START_ENABLED()) if (MYSQL_KEYCACHE_READ_START_ENABLED())
...@@ -2581,9 +2593,11 @@ uchar *key_cache_read(KEY_CACHE *keycache, ...@@ -2581,9 +2593,11 @@ uchar *key_cache_read(KEY_CACHE *keycache,
do do
{ {
/* Cache could be disabled in a later iteration. */ /* Cache could be disabled in a later iteration. */
if (!keycache->can_be_used) if (!keycache->can_be_used)
{
KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache cannot be used"));
goto no_key_cache; goto no_key_cache;
}
/* Start reading at the beginning of the cache block. */ /* Start reading at the beginning of the cache block. */
filepos-= offset; filepos-= offset;
/* Do not read beyond the end of the cache block. */ /* Do not read beyond the end of the cache block. */
...@@ -2652,7 +2666,7 @@ uchar *key_cache_read(KEY_CACHE *keycache, ...@@ -2652,7 +2666,7 @@ uchar *key_cache_read(KEY_CACHE *keycache,
} }
/* block status may have added BLOCK_ERROR in the above 'if'. */ /* block status may have added BLOCK_ERROR in the above 'if'. */
if (!((status= block->status) & BLOCK_ERROR)) if (!(block->status & BLOCK_ERROR))
{ {
#ifndef THREAD #ifndef THREAD
if (! return_buffer) if (! return_buffer)
...@@ -2678,14 +2692,22 @@ uchar *key_cache_read(KEY_CACHE *keycache, ...@@ -2678,14 +2692,22 @@ uchar *key_cache_read(KEY_CACHE *keycache,
remove_reader(block); remove_reader(block);
/* Error injection for coverage testing. */
DBUG_EXECUTE_IF("key_cache_read_block_error",
block->status|= BLOCK_ERROR;);
/* Do not link erroneous blocks into the LRU ring, but free them. */
if (!(block->status & BLOCK_ERROR))
{
/* /*
Link the block into the LRU ring if it's the last submitted Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block. request for the block. This enables eviction for the block.
*/ */
unreg_request(keycache, block, 1); unreg_request(keycache, block, 1);
}
if (status & BLOCK_ERROR) else
{ {
free_block(keycache, block);
error= 1; error= 1;
break; break;
} }
...@@ -2719,6 +2741,7 @@ uchar *key_cache_read(KEY_CACHE *keycache, ...@@ -2719,6 +2741,7 @@ uchar *key_cache_read(KEY_CACHE *keycache,
} }
goto end; goto end;
} }
KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache not initialized"));
no_key_cache: no_key_cache:
/* Key cache is not used */ /* Key cache is not used */
...@@ -2739,6 +2762,7 @@ end: ...@@ -2739,6 +2762,7 @@ end:
dec_counter_for_resize_op(keycache); dec_counter_for_resize_op(keycache);
keycache_pthread_mutex_unlock(&keycache->cache_lock); keycache_pthread_mutex_unlock(&keycache->cache_lock);
} }
DBUG_PRINT("exit", ("error: %d", error ));
DBUG_RETURN(error ? (uchar*) 0 : start); DBUG_RETURN(error ? (uchar*) 0 : start);
} }
...@@ -2947,19 +2971,27 @@ int key_cache_insert(KEY_CACHE *keycache, ...@@ -2947,19 +2971,27 @@ int key_cache_insert(KEY_CACHE *keycache,
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
} /* end of if (!(block->status & BLOCK_ERROR)) */ } /* end of if (!(block->status & BLOCK_ERROR)) */
remove_reader(block); remove_reader(block);
/* Error injection for coverage testing. */
DBUG_EXECUTE_IF("key_cache_insert_block_error",
block->status|= BLOCK_ERROR; errno=EIO;);
/* Do not link erroneous blocks into the LRU ring, but free them. */
if (!(block->status & BLOCK_ERROR))
{
/* /*
Link the block into the LRU ring if it's the last submitted Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block. request for the block. This enables eviction for the block.
*/ */
unreg_request(keycache, block, 1); unreg_request(keycache, block, 1);
}
error= (block->status & BLOCK_ERROR); else
{
if (error) free_block(keycache, block);
error= 1;
break; break;
}
buff+= read_length; buff+= read_length;
filepos+= read_length+offset; filepos+= read_length+offset;
...@@ -3251,14 +3283,24 @@ int key_cache_write(KEY_CACHE *keycache, ...@@ -3251,14 +3283,24 @@ int key_cache_write(KEY_CACHE *keycache,
*/ */
remove_reader(block); remove_reader(block);
/* Error injection for coverage testing. */
DBUG_EXECUTE_IF("key_cache_write_block_error",
block->status|= BLOCK_ERROR;);
/* Do not link erroneous blocks into the LRU ring, but free them. */
if (!(block->status & BLOCK_ERROR))
{
/* /*
Link the block into the LRU ring if it's the last submitted Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block. request for the block. This enables eviction for the block.
*/ */
unreg_request(keycache, block, 1); unreg_request(keycache, block, 1);
}
if (block->status & BLOCK_ERROR) else
{ {
/* Pretend a "clean" block to avoid complications. */
block->status&= ~(BLOCK_CHANGED);
free_block(keycache, block);
error= 1; error= 1;
break; break;
} }
...@@ -3342,8 +3384,9 @@ static void free_block(KEY_CACHE *keycache, BLOCK_LINK *block) ...@@ -3342,8 +3384,9 @@ static void free_block(KEY_CACHE *keycache, BLOCK_LINK *block)
{ {
KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block", KEYCACHE_DBUG_PRINT("free_block",
("block %u to be freed, hash_link %p", ("block %u to be freed, hash_link %p status: %u",
BLOCK_NUMBER(block), block->hash_link)); BLOCK_NUMBER(block), block->hash_link,
block->status));
/* /*
Assert that the block is not free already. And that it is in a clean Assert that the block is not free already. And that it is in a clean
state. Note that the block might just be assigned to a hash_link and state. Note that the block might just be assigned to a hash_link and
...@@ -3425,10 +3468,14 @@ static void free_block(KEY_CACHE *keycache, BLOCK_LINK *block) ...@@ -3425,10 +3468,14 @@ static void free_block(KEY_CACHE *keycache, BLOCK_LINK *block)
if (block->status & BLOCK_IN_EVICTION) if (block->status & BLOCK_IN_EVICTION)
return; return;
/* Error blocks are not put into the LRU ring. */
if (!(block->status & BLOCK_ERROR))
{
/* Here the block must be in the LRU ring. Unlink it again. */ /* Here the block must be in the LRU ring. Unlink it again. */
DBUG_ASSERT(block->next_used && block->prev_used && DBUG_ASSERT(block->next_used && block->prev_used &&
*block->prev_used == block); *block->prev_used == block);
unlink_block(keycache, block); unlink_block(keycache, block);
}
if (block->temperature == BLOCK_WARM) if (block->temperature == BLOCK_WARM)
keycache->warm_blocks--; keycache->warm_blocks--;
block->temperature= BLOCK_COLD; block->temperature= BLOCK_COLD;
...@@ -3517,8 +3564,7 @@ static int flush_cached_blocks(KEY_CACHE *keycache, ...@@ -3517,8 +3564,7 @@ static int flush_cached_blocks(KEY_CACHE *keycache,
(BLOCK_READ | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_IN_USE)); (BLOCK_READ | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_IN_USE));
block->status|= BLOCK_IN_FLUSHWRITE; block->status|= BLOCK_IN_FLUSHWRITE;
keycache_pthread_mutex_unlock(&keycache->cache_lock); keycache_pthread_mutex_unlock(&keycache->cache_lock);
error= my_pwrite(file, error= my_pwrite(file, block->buffer+block->offset,
block->buffer+block->offset,
block->length - block->offset, block->length - block->offset,
block->hash_link->diskpos+ block->offset, block->hash_link->diskpos+ block->offset,
MYF(MY_NABP | MY_WAIT_IF_FULL)); MYF(MY_NABP | MY_WAIT_IF_FULL));
...@@ -3545,7 +3591,6 @@ static int flush_cached_blocks(KEY_CACHE *keycache, ...@@ -3545,7 +3591,6 @@ static int flush_cached_blocks(KEY_CACHE *keycache,
right queue anyway. right queue anyway.
*/ */
link_to_file_list(keycache, block, file, 1); link_to_file_list(keycache, block, file, 1);
} }
block->status&= ~BLOCK_IN_FLUSH; block->status&= ~BLOCK_IN_FLUSH;
/* /*
...@@ -3581,7 +3626,7 @@ static int flush_cached_blocks(KEY_CACHE *keycache, ...@@ -3581,7 +3626,7 @@ static int flush_cached_blocks(KEY_CACHE *keycache,
/* /*
flush all key blocks for a file to disk, but don't do any mutex locks. Flush all key blocks for a file to disk, but don't do any mutex locks.
SYNOPSIS SYNOPSIS
flush_key_blocks_int() flush_key_blocks_int()
...@@ -3746,7 +3791,6 @@ restart: ...@@ -3746,7 +3791,6 @@ restart:
{ {
/* It's a temporary file */ /* It's a temporary file */
DBUG_ASSERT(!(block->status & BLOCK_REASSIGNED)); DBUG_ASSERT(!(block->status & BLOCK_REASSIGNED));
/* /*
free_block() must not be called with BLOCK_CHANGED. Note free_block() must not be called with BLOCK_CHANGED. Note
that we must not change the BLOCK_CHANGED flag outside of that we must not change the BLOCK_CHANGED flag outside of
...@@ -4457,8 +4501,8 @@ static void keycache_debug_print(const char * fmt,...) ...@@ -4457,8 +4501,8 @@ static void keycache_debug_print(const char * fmt,...)
va_start(args,fmt); va_start(args,fmt);
if (keycache_debug_log) if (keycache_debug_log)
{ {
VOID(vfprintf(keycache_debug_log, fmt, args)); (void) vfprintf(keycache_debug_log, fmt, args);
VOID(fputc('\n',keycache_debug_log)); (void) fputc('\n',keycache_debug_log);
} }
va_end(args); va_end(args);
} }
......
...@@ -169,7 +169,6 @@ SUFFIXES = .sh ...@@ -169,7 +169,6 @@ SUFFIXES = .sh
-e 's!@''ZLIB_LIBS''@!@ZLIB_LIBS@!' \ -e 's!@''ZLIB_LIBS''@!@ZLIB_LIBS@!' \
-e 's!@''LIBS''@!@LIBS@!' \ -e 's!@''LIBS''@!@LIBS@!' \
-e 's!@''WRAPLIBS''@!@WRAPLIBS@!' \ -e 's!@''WRAPLIBS''@!@WRAPLIBS@!' \
-e 's!@''innodb_system_libs''@!@innodb_system_libs@!' \
-e 's!@''openssl_libs''@!@openssl_libs@!' \ -e 's!@''openssl_libs''@!@openssl_libs@!' \
-e 's!@''VERSION''@!@VERSION@!' \ -e 's!@''VERSION''@!@VERSION@!' \
-e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
......
...@@ -202,7 +202,7 @@ $flags->{libs} = ...@@ -202,7 +202,7 @@ $flags->{libs} =
$flags->{libs_r} = $flags->{libs_r} =
[@ldflags,@lib_r_opts,'@ZLIB_DEPS@','@LIBS@','@openssl_libs@']; [@ldflags,@lib_r_opts,'@ZLIB_DEPS@','@LIBS@','@openssl_libs@'];
$flags->{embedded_libs} = $flags->{embedded_libs} =
[@ldflags,@lib_e_opts,'@LIBDL@','@ZLIB_DEPS@','@LIBS@','@WRAPLIBS@','@innodb_system_libs@','@openssl_libs@']; [@ldflags,@lib_e_opts,'@LIBDL@','@ZLIB_DEPS@','@LIBS@','@WRAPLIBS@','@openssl_libs@'];
$flags->{include} = ["-I$pkgincludedir"]; $flags->{include} = ["-I$pkgincludedir"];
$flags->{cflags} = [@{$flags->{include}},split(" ",'@CFLAGS@')]; $flags->{cflags} = [@{$flags->{include}},split(" ",'@CFLAGS@')];
......
...@@ -107,7 +107,7 @@ fi ...@@ -107,7 +107,7 @@ fi
libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@" libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ " libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@ " libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@ "
embedded_libs=" $ldflags -L$pkglibdir -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @innodb_system_libs@ @openssl_libs@ " embedded_libs=" $ldflags -L$pkglibdir -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
if [ -r "$pkglibdir/libmygcc.a" ]; then if [ -r "$pkglibdir/libmygcc.a" ]; then
# When linking against the static library with a different version of GCC # When linking against the static library with a different version of GCC
......
...@@ -907,6 +907,9 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) ...@@ -907,6 +907,9 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
remove_db_from_cache(db); remove_db_from_cache(db);
pthread_mutex_unlock(&LOCK_open); pthread_mutex_unlock(&LOCK_open);
Drop_table_error_handler err_handler(thd->get_internal_handler());
thd->push_internal_handler(&err_handler);
error= -1; error= -1;
/* /*
We temporarily disable the binary log while dropping the objects We temporarily disable the binary log while dropping the objects
...@@ -939,6 +942,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) ...@@ -939,6 +942,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
error = 0; error = 0;
reenable_binlog(thd); reenable_binlog(thd);
} }
thd->pop_internal_handler();
} }
if (!silent && deleted>=0) if (!silent && deleted>=0)
{ {
......
...@@ -9831,12 +9831,12 @@ static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_ ...@@ -9831,12 +9831,12 @@ static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_
static MYSQL_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment, static MYSQL_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
"Data file autoextend increment in megabytes", "Data file autoextend increment in megabytes",
NULL, NULL, 64L, 1L, 1000L, 0); NULL, NULL, 8L, 1L, 1000L, 0);
static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size, static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
NULL, NULL, 1024*1024*1024L, 5*1024*1024L, LONGLONG_MAX, 1024*1024L); NULL, NULL, 128*1024*1024L, 5*1024*1024L, LONGLONG_MAX, 1024*1024L);
static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
...@@ -9856,12 +9856,12 @@ static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads, ...@@ -9856,12 +9856,12 @@ static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads,
static MYSQL_SYSVAR_ULONG(read_io_threads, innobase_read_io_threads, static MYSQL_SYSVAR_ULONG(read_io_threads, innobase_read_io_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of background read I/O threads in InnoDB.", "Number of background read I/O threads in InnoDB.",
NULL, NULL, 8, 1, 64, 0); NULL, NULL, 4, 1, 64, 0);
static MYSQL_SYSVAR_ULONG(write_io_threads, innobase_write_io_threads, static MYSQL_SYSVAR_ULONG(write_io_threads, innobase_write_io_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of background write I/O threads in InnoDB.", "Number of background write I/O threads in InnoDB.",
NULL, NULL, 8, 1, 64, 0); NULL, NULL, 4, 1, 64, 0);
static MYSQL_SYSVAR_LONG(force_recovery, innobase_force_recovery, static MYSQL_SYSVAR_LONG(force_recovery, innobase_force_recovery,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
...@@ -9871,17 +9871,17 @@ static MYSQL_SYSVAR_LONG(force_recovery, innobase_force_recovery, ...@@ -9871,17 +9871,17 @@ static MYSQL_SYSVAR_LONG(force_recovery, innobase_force_recovery,
static MYSQL_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size, static MYSQL_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"The size of the buffer which InnoDB uses to write log to the log files on disk.", "The size of the buffer which InnoDB uses to write log to the log files on disk.",
NULL, NULL, 16*1024*1024L, 256*1024L, LONG_MAX, 1024); NULL, NULL, 8*1024*1024L, 256*1024L, LONG_MAX, 1024);
static MYSQL_SYSVAR_LONGLONG(log_file_size, innobase_log_file_size, static MYSQL_SYSVAR_LONGLONG(log_file_size, innobase_log_file_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Size of each log file in a log group.", "Size of each log file in a log group.",
NULL, NULL, 128*1024*1024L, 1*1024*1024L, LONGLONG_MAX, 1024*1024L); NULL, NULL, 5*1024*1024L, 1*1024*1024L, LONGLONG_MAX, 1024*1024L);
static MYSQL_SYSVAR_LONG(log_files_in_group, innobase_log_files_in_group, static MYSQL_SYSVAR_LONG(log_files_in_group, innobase_log_files_in_group,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of log files in the log group. InnoDB writes to the files in a circular fashion. Value 3 is recommended here.", "Number of log files in the log group. InnoDB writes to the files in a circular fashion. Value 3 is recommended here.",
NULL, NULL, 3, 2, 100, 0); NULL, NULL, 2, 2, 100, 0);
static MYSQL_SYSVAR_LONG(mirrored_log_groups, innobase_mirrored_log_groups, static MYSQL_SYSVAR_LONG(mirrored_log_groups, innobase_mirrored_log_groups,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
......
...@@ -69,14 +69,16 @@ do { \ ...@@ -69,14 +69,16 @@ do { \
#define STRUCT_FLD(name, value) value #define STRUCT_FLD(name, value) value
#endif #endif
static const ST_FIELD_INFO END_OF_ST_FIELD_INFO = /* Don't use a static const variable here, as some C++ compilers (notably
{STRUCT_FLD(field_name, NULL), HPUX aCC: HP ANSI C++ B3910B A.03.65) can't handle it. */
STRUCT_FLD(field_length, 0), #define END_OF_ST_FIELD_INFO \
STRUCT_FLD(field_type, MYSQL_TYPE_NULL), {STRUCT_FLD(field_name, NULL), \
STRUCT_FLD(value, 0), STRUCT_FLD(field_length, 0), \
STRUCT_FLD(field_flags, 0), STRUCT_FLD(field_type, MYSQL_TYPE_NULL), \
STRUCT_FLD(old_name, ""), STRUCT_FLD(value, 0), \
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}; STRUCT_FLD(field_flags, 0), \
STRUCT_FLD(old_name, ""), \
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}
/* /*
Use the following types mapping: Use the following types mapping:
......
...@@ -408,7 +408,8 @@ it is read. */ ...@@ -408,7 +408,8 @@ it is read. */
/* Minimize cache-miss latency by moving data at addr into a cache before /* Minimize cache-miss latency by moving data at addr into a cache before
it is read or written. */ it is read or written. */
# define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3) # define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3)
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* Sun Studio includes sun_prefetch.h as of version 5.9 */
#elif (defined(__SUNPRO_C) && __SUNPRO_C >= 0x590) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590)
# include <sun_prefetch.h> # include <sun_prefetch.h>
#if __SUNPRO_C >= 0x550 #if __SUNPRO_C >= 0x550
# undef UNIV_INTERN # undef UNIV_INTERN
......
...@@ -465,11 +465,9 @@ rm -fr $RBR%{_datadir}/sql-bench ...@@ -465,11 +465,9 @@ rm -fr $RBR%{_datadir}/sql-bench
# will appreciate that, as all services usually offer this. # will appreciate that, as all services usually offer this.
ln -s %{_sysconfdir}/init.d/mysql $RPM_BUILD_ROOT%{_sbindir}/rcmysql ln -s %{_sysconfdir}/init.d/mysql $RPM_BUILD_ROOT%{_sbindir}/rcmysql
# Touch the place where the my.cnf config file and mysqlmanager.passwd # Touch the place where the my.cnf config file might be located
# (MySQL Instance Manager password file) might be located
# Just to make sure it's in the file list and marked as a config file # Just to make sure it's in the file list and marked as a config file
touch $RBR%{_sysconfdir}/my.cnf touch $RBR%{_sysconfdir}/my.cnf
touch $RBR%{_sysconfdir}/mysqlmanager.passwd
%pre server %pre server
# Check if we can safely upgrade. An upgrade is only safe if it's from one # Check if we can safely upgrade. An upgrade is only safe if it's from one
...@@ -667,7 +665,6 @@ fi ...@@ -667,7 +665,6 @@ fi
%doc %attr(644, root, man) %{_mandir}/man1/mysql_upgrade.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_upgrade.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlman.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqlman.1*
%doc %attr(644, root, man) %{_mandir}/man8/mysqlmanager.8*
%doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqltest.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqltest.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_tzinfo_to_sql.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_tzinfo_to_sql.1*
...@@ -677,7 +674,6 @@ fi ...@@ -677,7 +674,6 @@ fi
%doc %attr(644, root, man) %{_mandir}/man1/replace.1* %doc %attr(644, root, man) %{_mandir}/man1/replace.1*
%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf %ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
%ghost %config(noreplace,missingok) %{_sysconfdir}/mysqlmanager.passwd
%attr(755, root, root) %{_bindir}/innochecksum %attr(755, root, root) %{_bindir}/innochecksum
%attr(755, root, root) %{_bindir}/my_print_defaults %attr(755, root, root) %{_bindir}/my_print_defaults
...@@ -709,7 +705,6 @@ fi ...@@ -709,7 +705,6 @@ fi
%attr(755, root, root) %{_sbindir}/mysqld %attr(755, root, root) %{_sbindir}/mysqld
%attr(755, root, root) %{_sbindir}/mysqld-debug %attr(755, root, root) %{_sbindir}/mysqld-debug
%attr(755, root, root) %{_sbindir}/mysqlmanager
%attr(755, root, root) %{_sbindir}/rcmysql %attr(755, root, root) %{_sbindir}/rcmysql
%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql %attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql
...@@ -865,7 +860,12 @@ fi ...@@ -865,7 +860,12 @@ fi
%changelog %changelog
* Fri Aug 28 2009 Joerg Bruehe <joerg.bruehe@sun.com> * Fri Aug 28 2009 Joerg Bruehe <joerg.bruehe@sun.com>
- Merge up form 5.1 to 5.4: Remove handling for the InnoDB plugin. - Merge up from 5.1 to 5.4: Remove handling for the InnoDB plugin.
* Thu Aug 27 2009 Joerg Bruehe <joerg.bruehe@sun.com>
- This version does not contain the "Instance manager", "mysqlmanager":
Remove it from the spec file so that packaging succeeds.
* Mon Aug 24 2009 Jonathan Perkin <jperkin@sun.com> * Mon Aug 24 2009 Jonathan Perkin <jperkin@sun.com>
......
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