Below is the list of changes that have just been committed into a local
5.1 repository of dkatz. When dkatz does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-10-25 20:56:55-04:00, dkatz@stripped +4 -0
Bug#28785 thread-handling not displayed properly in SHOW VARIABLES
mysql-test/r/no-threads.result@stripped, 2007-10-25 20:56:50-04:00, dkatz@stripped +3 -0
Test that we are in the 'no-threads' thread_handling mode.
mysql-test/t/no-threads.test@stripped, 2007-10-25 20:56:50-04:00, dkatz@stripped +1 -0
Test that we are in the 'no-threads' thread_handling mode.
sql/mysqld.cc@stripped, 2007-10-25 20:56:50-04:00, dkatz@stripped +3 -2
Changes to make global_system_variables.thread_handling be zero based, instead of 1 based.
sql/scheduler.h@stripped, 2007-10-25 20:56:50-04:00, dkatz@stripped +1 -1
Changed the enum to start at 0, to match the array elements in thread_handling_names in mysqld.cc
diff -Nrup a/mysql-test/r/no-threads.result b/mysql-test/r/no-threads.result
--- a/mysql-test/r/no-threads.result 2007-02-23 06:13:52 -05:00
+++ b/mysql-test/r/no-threads.result 2007-10-25 20:56:50 -04:00
@@ -4,3 +4,6 @@ select 1+1;
select 1+2;
1+2
3
+SHOW GLOBAL VARIABLES LIKE 'thread_handling';
+Variable_name Value
+thread_handling no-threads
diff -Nrup a/mysql-test/t/no-threads.test b/mysql-test/t/no-threads.test
--- a/mysql-test/t/no-threads.test 2007-02-23 06:13:52 -05:00
+++ b/mysql-test/t/no-threads.test 2007-10-25 20:56:50 -04:00
@@ -3,3 +3,4 @@
#
select 1+1;
select 1+2;
+SHOW GLOBAL VARIABLES LIKE 'thread_handling';
diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc
--- a/sql/mysqld.cc 2007-10-19 17:20:35 -04:00
+++ b/sql/mysqld.cc 2007-10-25 20:56:50 -04:00
@@ -7741,12 +7741,13 @@ mysqld_get_one_option(int optid,
break;
}
case OPT_ONE_THREAD:
- global_system_variables.thread_handling= 2;
+ global_system_variables.thread_handling=
+ SCHEDULER_ONE_THREAD_PER_CONNECTION;
break;
case OPT_THREAD_HANDLING:
{
global_system_variables.thread_handling=
- find_type_or_exit(argument, &thread_handling_typelib, opt->name);
+ find_type_or_exit(argument, &thread_handling_typelib, opt->name)-1;
break;
}
case OPT_FT_BOOLEAN_SYNTAX:
diff -Nrup a/sql/scheduler.h b/sql/scheduler.h
--- a/sql/scheduler.h 2007-02-23 06:13:52 -05:00
+++ b/sql/scheduler.h 2007-10-25 20:56:50 -04:00
@@ -40,7 +40,7 @@ public:
enum scheduler_types
{
- SCHEDULER_ONE_THREAD_PER_CONNECTION=1,
+ SCHEDULER_ONE_THREAD_PER_CONNECTION=0,
SCHEDULER_NO_THREADS,
SCHEDULER_POOL_OF_THREADS
};