summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <jani@rhols221.adsl.netsonic.fi>2003-03-09 19:03:55 +0200
committerunknown <jani@rhols221.adsl.netsonic.fi>2003-03-09 19:03:55 +0200
commit64cf72900c4780e5bb32bd48dab7358dd0b08f62 (patch)
treea539bc0a4d491400c49093facc6e63911b519499
parent44c9a3893dc25de21dccd6aab7e1b1d75ec13642 (diff)
downloadmariadb-git-64cf72900c4780e5bb32bd48dab7358dd0b08f62.tar.gz
Made it possible to use --max-delayed-threads=0 in order to disable
INSERT DELAYED.
-rw-r--r--sql/mysqld.cc4
-rw-r--r--sql/sql_insert.cc3
2 files changed, 4 insertions, 3 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index a03c4f5db8b..a042b7f314b 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3770,9 +3770,9 @@ struct my_option my_long_options[] =
(gptr*) &max_connect_errors, (gptr*) &max_connect_errors, 0, GET_ULONG,
REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ~0L, 0, 1, 0},
{"max_delayed_threads", OPT_MAX_DELAYED_THREADS,
- "Don't start more than this number of threads to handle INSERT DELAYED statements.",
+ "Don't start more than this number of threads to handle INSERT DELAYED statements. This option does not yet have effect (on TODO), unless it is set to zero, which means INSERT DELAYED is not used.",
(gptr*) &max_insert_delayed_threads, (gptr*) &max_insert_delayed_threads,
- 0, GET_ULONG, REQUIRED_ARG, 20, 1, 16384, 0, 1, 0},
+ 0, GET_ULONG, REQUIRED_ARG, 20, 0, 16384, 0, 1, 0},
{"max_heap_table_size", OPT_MAX_HEP_TABLE_SIZE,
"Don't allow creation of heap tables bigger than this.",
(gptr*) &global_system_variables.max_heap_table_size,
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 7725808075a..5bf852afc32 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -140,7 +140,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
if ((lock_type == TL_WRITE_DELAYED &&
((specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) ||
thd->slave_thread)) ||
- (lock_type == TL_WRITE_CONCURRENT_INSERT && duplic == DUP_REPLACE))
+ (lock_type == TL_WRITE_CONCURRENT_INSERT && duplic == DUP_REPLACE) ||
+ !max_insert_delayed_threads)
lock_type=TL_WRITE;
if (lock_type == TL_WRITE_DELAYED)