diff --git a/.bzrignore b/.bzrignore index 68d45ea93b0..f757e602563 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1139,3 +1139,4 @@ libmysqld/gcalc_slicescan.cc libmysqld/gcalc_tools.cc sql/share/errmsg.sys sql/share/mysql +install_manifest.txt diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result index 2ec6c91f7d5..bb4d783ccf4 100644 --- a/mysql-test/suite/innodb/r/innodb.result +++ b/mysql-test/suite/innodb/r/innodb.result @@ -1685,7 +1685,7 @@ count(*) drop table t1; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; variable_value -511 +ok SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; variable_value 16384 diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index c2309c0fcd6..d57a52a2362 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -1339,7 +1339,7 @@ drop table t1; # Test for testable InnoDB status variables. This test # uses previous ones(pages_created, rows_deleted, ...). ---replace_result 512 511 2047 511 +--replace_result 511 ok 512 ok 2047 ok 513 ok SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted'; diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 20e5e115687..aaf1936afe1 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -15,6 +15,7 @@ KILL_MYSQLD=1; MYSQLD= niceness=0 +nowatch=0 mysqld_ld_preload= mysqld_ld_library_path= @@ -44,16 +45,18 @@ usage () { cat < guard_size) + { + real_stack_size -= guard_size; + if (real_stack_size < stacksize) + { + if (global_system_variables.log_warnings) + sql_print_warning("Asked for %zu thread stack, but got %zu", + stacksize, real_stack_size); + stacksize= real_stack_size; + } + } + } +#endif + +#if defined(__ia64__) || defined(__ia64) + stacksize /= 2; +#endif + return stacksize; +} + + static void start_signal_handler(void) { int error; @@ -2862,15 +2926,7 @@ static void start_signal_handler(void) #if !defined(HAVE_DEC_3_2_THREADS) pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM); (void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED); -#if defined(__ia64__) || defined(__ia64) - /* - Peculiar things with ia64 platforms - it seems we only have half the - stack size in reality, so we have to double it here - */ - pthread_attr_setstacksize(&thr_attr,my_thread_stack_size*2); -#else - pthread_attr_setstacksize(&thr_attr,my_thread_stack_size); -#endif + (void) my_setstacksize(&thr_attr,my_thread_stack_size); #endif mysql_mutex_lock(&LOCK_thread_count); @@ -4694,37 +4750,9 @@ int mysqld_main(int argc, char **argv) unireg_abort(1); // Will do exit init_signals(); -#if defined(__ia64__) || defined(__ia64) - /* - Peculiar things with ia64 platforms - it seems we only have half the - stack size in reality, so we have to double it here - */ - pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size*2); -#else - pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size); -#endif -#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE - { - /* Retrieve used stack size; Needed for checking stack overflows */ - size_t stack_size= 0; - pthread_attr_getstacksize(&connection_attrib, &stack_size); -#if defined(__ia64__) || defined(__ia64) - stack_size/= 2; -#endif - /* We must check if stack_size = 0 as Solaris 2.9 can return 0 here */ - if (stack_size && stack_size < my_thread_stack_size) - { - if (global_system_variables.log_warnings) - sql_print_warning("Asked for %llu thread stack, but got %zu", - my_thread_stack_size, stack_size); -#if defined(__ia64__) || defined(__ia64) - my_thread_stack_size= stack_size*2; -#else - my_thread_stack_size= stack_size; -#endif - } - } -#endif + + my_thread_stack_size= my_setstacksize(&connection_attrib, + my_thread_stack_size); (void) thr_setconcurrency(concurrency); // 10 by default