mariadb/mysys
Michael Widenius 4fe3425009 Added "pool-of-threads" handling (with libevent)
This is a backport of code from MySQL 6.0 with cleanups and extensions

The following new options are supported
configure options:
  --with-libevent                  ; Enable use of libevent, which is needed for pool of threads

mysqld options:
--thread-handling=pool-of-threads  ; Use a pool of threads to handle queries
--thread-pool-size=#               ; Define how many threads should be created to handle all queries
--extra-port=#                     ; Extra tcp port that uses the old one-thread-per-connection method
--extra-max-connections=#          ; Number of connections to accept to 'extra-port'
--test-ignore-wrong-options        ; Ignore setting an enum value to a wrong option (for mysql-test-run)



BUILD/SETUP.sh:
  Added libevents (and thus pool-of-threads) to max builds
CMakeLists.txt:
  Added libevent
Makefile.am:
  Added libevents
config/ac-macros/libevent.m4:
  Libevent code for configure
config/ac-macros/libevent_configure.m4:
  Libevent code for configure
configure.in:
  Added libevents
dbug/dbug.c:
  Added _db_is_pushed(); Needed for pool-of-threads code
extra/Makefile.am:
  Added libevents
extra/libevent:
  Libevent initial code
extra/libevent/CMakeLists.txt:
  Libevent initial code
extra/libevent/Makefile.am:
  Libevent initial code
extra/libevent/README:
  Libevent initial code
extra/libevent/WIN32-Code:
  Libevent initial code
extra/libevent/WIN32-Code/config.h:
  Libevent initial code
extra/libevent/WIN32-Code/misc.c:
  Libevent initial code
extra/libevent/WIN32-Code/misc.h:
  Libevent initial code
extra/libevent/WIN32-Code/tree.h:
  Libevent initial code
extra/libevent/WIN32-Code/win32.c:
  Libevent initial code
extra/libevent/buffer.c:
  Libevent initial code
extra/libevent/compat:
  Libevent initial code
extra/libevent/compat/sys:
  Libevent initial code
extra/libevent/compat/sys/_time.h:
  Libevent initial code
extra/libevent/compat/sys/queue.h:
  Libevent initial code
extra/libevent/compat/sys/tree.h:
  Libevent initial code
extra/libevent/devpoll.c:
  Libevent initial code
extra/libevent/epoll.c:
  Libevent initial code
extra/libevent/epoll_sub.c:
  Libevent initial code
extra/libevent/evbuffer.c:
  Libevent initial code
extra/libevent/evdns.c:
  Libevent initial code
extra/libevent/evdns.h:
  Libevent initial code
extra/libevent/event-config.h:
  Libevent initial code
extra/libevent/event-internal.h:
  Libevent initial code
extra/libevent/event.c:
  Libevent initial code
extra/libevent/event.h:
  Libevent initial code
extra/libevent/event_tagging.c:
  Libevent initial code
extra/libevent/evhttp.h:
  Libevent initial code
extra/libevent/evport.c:
  Libevent initial code
extra/libevent/evrpc-internal.h:
  Libevent initial code
extra/libevent/evrpc.c:
  Libevent initial code
extra/libevent/evrpc.h:
  Libevent initial code
extra/libevent/evsignal.h:
  Libevent initial code
extra/libevent/evutil.c:
  Libevent initial code
extra/libevent/evutil.h:
  Libevent initial code
extra/libevent/http-internal.h:
  Libevent initial code
extra/libevent/http.c:
  Libevent initial code
extra/libevent/kqueue.c:
  Libevent initial code
extra/libevent/log.c:
  Libevent initial code
extra/libevent/log.h:
  Libevent initial code
extra/libevent/min_heap.h:
  Libevent initial code
extra/libevent/poll.c:
  Libevent initial code
extra/libevent/select.c:
  Libevent initial code
extra/libevent/signal.c:
  Libevent initial code
extra/libevent/strlcpy-internal.h:
  Libevent initial code
extra/libevent/strlcpy.c:
  Libevent initial code
include/config-win.h:
  Libevent support
include/my_dbug.h:
  ADded _db_is_pushed
include/mysql.h.pp:
  Update to handle new prototypes
include/typelib.h:
  Split find_type_or_exit() into two functions
include/violite.h:
  Added vio_is_pending()
libmysqld/Makefile.am:
  Added libevent
mysql-test/include/have_pool_of_threads.inc:
  Added test for pool-of-threads
mysql-test/mysql-test-run.pl:
  Don't abort based on time and don't retry test cases when run under --gdb or --debug
mysql-test/r/crash_commit_before.result:
  USE GLOBAL for debug variable
mysql-test/r/have_pool_of_threads.require:
  Added test for pool-of-threads
mysql-test/r/pool_of_threads.result:
  Added test for pool-of-threads
mysql-test/r/subselect_debug.result:
  USE GLOBAL for debug variable
mysql-test/t/crash_commit_before.test:
  USE GLOBAL for debug variable
mysql-test/t/merge-big.test:
  USE GLOBAL for debug variable
mysql-test/t/pool_of_threads-master.opt:
  Added test for pool-of-threads
mysql-test/t/pool_of_threads.test:
  Added test for pool-of-threads
mysys/typelib.c:
  Split find_type_or_exit() into find_type_with_warning()
sql/Makefile.am:
  Added libevent
sql/handler.cc:
  Indentation fix.
  Fixed memory loss bug
  Fixed crash on exit when handler plugin failed
sql/mysql_priv.h:
  Added extra_max_connections and mysqld_extra_port
  Added extern functions from sql_connect.cc
sql/mysqld.cc:
  Added support for new mysqld options
  Added code for 'extra-port' and 'extra-max-connections'
  Split some functions into smaller pieces to be able to reuse code
  Added code for test-ignore-wrong-options
sql/scheduler.cc:
  Updated schduler code from MySQL 6.0
sql/scheduler.h:
  Updated schduler code from MySQL 6.0
sql/set_var.cc:
  Added support for changing "extra_max_connections"
sql/sql_class.cc:
  Iniitalize thread schduler options in THD
sql/sql_class.h:
  Added to extra_port and scheduler to 'THD'
sql/sql_connect.cc:
  Use thd->schduler to check number of connections and terminate connection
  Made some local functions global (for scheduler.cc)
vio/viosocket.c:
  Added 'vio_pending', needed for scheduler..c
2009-03-13 00:27:35 +02:00
..
.cvsignore
array.c wt_thd_lazy_init(), per-thread deadlock search depths and timeouts 2008-08-08 13:11:27 +02:00
base64.c BUG#28884 - maybe a problem with malloc into base64.c 2008-01-15 16:23:14 +04:00
ChangeLog Fix skipp -> skip once and for all. 2004-06-03 11:52:54 -05:00
charset-def.c Merge maint1.mysql.com:/data/localhome/tsmith/bk/maint/50 2007-06-21 20:55:37 +02:00
charset.c Bug#41084 full-text index added to custom UCA collation not working 2009-02-02 17:25:42 +04:00
checksum.c cleanup 2008-02-05 14:19:53 +01:00
CMakeLists.txt Merged 5.1 with maria 5.1 2008-10-10 18:28:41 +03:00
default.c Up-merge 5.0.66a-release changes (via 5.0) into 5.1. 2008-07-17 11:45:08 -06:00
default_modify.c Slow query log to file now displays queries with microsecond precission 2007-07-30 11:33:50 +03:00
errors.c Merged 5.1 with maria 5.1 2008-10-10 18:28:41 +03:00
hash.c Merge with base MySQL 5.1 2009-02-15 12:58:34 +02:00
lf_alloc-pin.c post-review fixes 2009-01-15 22:27:36 +01:00
lf_dynarray.c Windows fixes 2008-01-10 13:21:53 +01:00
lf_hash.c post-review fixes 2009-01-15 22:27:36 +01:00
list.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
make-ccc Remove unused (and incorrect) my_lread() and my_lwrite() 2006-09-14 23:29:44 -06:00
make-conf.c Many files: 2006-12-23 20:17:15 +01:00
Makefile.am WL#3262 add mutex lock order checking to safemutex (also called safe_mutex_deadlock_detector) 2008-12-03 00:02:52 +02:00
md5.c Avoid the name conflict between the system-provided "md5.h" and the MySQL one 2007-07-19 14:14:03 +02:00
mf_arr_appstr.c Bug #20748: Configuration files should not be read more than once 2007-11-07 15:23:50 -07:00
mf_brkhant.c Many files: 2006-12-23 20:17:15 +01:00
mf_cache.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_dirname.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_fn_ext.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_format.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_getdate.c Slow query log to file now displays queries with microsecond precission 2007-07-30 11:33:50 +03:00
mf_iocache.c Fixed compiler warnings 2008-01-13 00:30:38 +02:00
mf_iocache2.c Fixed compiler warnings in a lot of files 2008-02-13 21:27:12 +02:00
mf_keycache.c Bug#37302 (missing DBUG_RETURN macro in function "find_key_block" (5.0 only)) 2008-08-11 15:08:12 -06:00
mf_keycaches.c Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1 2007-06-27 17:49:12 +03:00
mf_loadpath.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_pack.c Merge from 5.0-bugteam local. 2008-08-18 13:11:55 -04:00
mf_path.c Slow query log to file now displays queries with microsecond precission 2007-07-30 11:33:50 +03:00
mf_qsort.c Fix for bug #31207: Test "join_nested" shows different strategy on IA64 2007-10-17 20:08:58 +04:00
mf_qsort2.c Many files: 2006-12-23 20:17:15 +01:00
mf_radix.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_same.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_sort.c Merge polly.(none):/home/kaa/src/maint/mysql-5.0-maint 2007-10-18 14:32:43 +04:00
mf_soundex.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_strip.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_tempdir.c Bug#38293 Libmysqld crash in mysql_library_init if language file missing 2008-11-19 13:57:23 +04:00
mf_tempfile.c Moved a lot of old bug fixes and safe cleanups from Maria 5.1 tree to 5.1 2007-10-11 18:07:40 +03:00
mf_unixpath.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mf_util.c Many files: 2006-12-23 20:17:15 +01:00
mf_wcomp.c Many files: 2006-12-23 20:17:15 +01:00
mf_wfile.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
mulalloc.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_access.c Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
my_aes.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_alarm.c Many files: 2006-12-23 20:17:15 +01:00
my_alloc.c Bug#38296 (low memory crash with many conditions in a query) 2008-08-11 10:10:00 -06:00
my_append.c Slow query log to file now displays queries with microsecond precission 2007-07-30 11:33:50 +03:00
my_atomic.c Moved a lot of old bug fixes and safe cleanups from Maria 5.1 tree to 5.1 2007-10-11 18:07:40 +03:00
my_bit.c Moved a lot of old bug fixes and safe cleanups from Maria 5.1 tree to 5.1 2007-10-11 18:07:40 +03:00
my_bitmap.c Fixed problems with ma_test2 and mi_test2 on high-byte-first system 2008-02-21 02:45:02 +02:00
my_chmod.c Added wrapper for chmod(): my_chmod() 2008-01-03 09:45:46 +02:00
my_chsize.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_clock.c Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
my_compress.c Fixed problems with ma_test2 and mi_test2 on high-byte-first system 2008-02-21 02:45:02 +02:00
my_conio.c Merge magare.gmz:/home/kgeorge/mysql/autopush/B29325-5.0-opt 2007-07-11 12:44:49 +03:00
my_copy.c Slow query log to file now displays queries with microsecond precission 2007-07-30 11:33:50 +03:00
my_crc32.c Many files: 2006-12-23 20:17:15 +01:00
my_create.c Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main 2008-03-13 23:35:52 +02:00
my_delete.c Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main 2007-12-16 17:03:44 +02:00
my_div.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_dup.c Fixed compiler warnings. 2007-03-22 20:32:07 +02:00
my_error.c Bugs fixed: 2008-01-07 18:54:41 +02:00
my_file.c Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
my_fopen.c Fixed several bugs in page CRC handling 2007-12-18 03:21:32 +02:00
my_fstream.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_gethostbyname.c Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-31 01:32:21 +01:00
my_gethwaddr.c mysys/my_gethwaddr.c 2007-08-09 14:56:57 +02:00
my_getncpus.c Windows fixes 2008-01-10 13:21:53 +01:00
my_getopt.c Merge with base MySQL 5.1 2009-02-15 12:58:34 +02:00
my_getpagesize.c Many files: 2006-12-23 20:17:15 +01:00
my_getsystime.c Merge mysql.com:/home/my/mysql-5.1 2008-04-28 19:24:05 +03:00
my_getwd.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_handler.c Added versioning of Maria index 2008-06-26 08:18:28 +03:00
my_handler_errors.h After merge fixes 2008-05-29 23:56:27 +03:00
my_init.c Merge with base MySQL 5.1 2009-02-15 12:58:34 +02:00
my_largepage.c Backport of my_malloc() changes from 5.1 to make it 64-bit safe on Unix platforms. 2007-08-29 19:20:18 +04:00
my_lib.c Merge polly.(none):/home/kaa/src/maint/mysql-5.0-maint 2007-10-18 14:32:43 +04:00
my_libwrap.c Many files: 2006-12-23 20:17:15 +01:00
my_lock.c Added versioning of Maria index 2008-06-26 08:18:28 +03:00
my_lockmem.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_malloc.c Backport of my_malloc() changes from 5.1 to make it 64-bit safe on Unix platforms. 2007-08-29 19:20:18 +04:00
my_memmem.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_messnc.c Many files: 2006-12-23 20:17:15 +01:00
my_mkdir.c Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
my_mmap.c Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
my_net.c Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
my_netware.c Many files: 2006-12-23 20:17:15 +01:00
my_new.cc Many files: 2006-12-23 20:17:15 +01:00
my_once.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_open.c Moved a lot of old bug fixes and safe cleanups from Maria 5.1 tree to 5.1 2007-10-11 18:07:40 +03:00
my_port.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_pread.c Changed all file names in maria to LEX_STRING and removed some calls to strlen() 2008-08-25 14:49:47 +03:00
my_pthread.c WL#3262 add mutex lock order checking to safemutex (also called safe_mutex_deadlock_detector) 2008-12-03 00:02:52 +02:00
my_quick.c Added casts to avoid compiler warnings and fixed a wrong type. 2007-05-31 17:45:22 +03:00
my_read.c Fix for Windows-specific bugs: 2008-02-02 00:01:31 +01:00
my_realloc.c Merge some changes from sql directory in 5.1 tree 2007-10-20 00:24:22 +03:00
my_redel.c Merge mysql.com:/home/svoj/devel/mysql/BUG25521/mysql-5.0-engines 2007-03-29 22:01:51 +05:00
my_rename.c Moved a lot of old bug fixes and safe cleanups from Maria 5.1 tree to 5.1 2007-10-11 18:07:40 +03:00
my_rnd.c windows fix: fix the #include directive 2007-12-14 09:47:00 +01:00
my_safehash.c Fixed compiler warnings 2007-08-22 10:56:10 +03:00
my_safehash.h Merged with mysql-5.1 main tree. 2007-07-02 20:45:15 +03:00
my_seek.c Fixed several bugs in page CRC handling 2007-12-18 03:21:32 +02:00
my_sleep.c WL#3262 add mutex lock order checking to safemutex (also called safe_mutex_deadlock_detector) 2008-12-03 00:02:52 +02:00
my_static.c post-review fixes 2009-01-15 22:27:36 +01:00
my_static.h Bug#35616: memory overrun on 64-bit linux on setting large values for keybuffer-size 2008-08-19 15:56:41 +02:00
my_symlink.c Bug#39102 valgrind build does not compile in realpath, which make DATA/INDEX DIR fail 2008-10-27 19:25:11 +04:00
my_symlink2.c Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines 2007-11-12 15:26:37 +04:00
my_sync.c Fixed several bugs in page CRC handling 2007-12-18 03:21:32 +02:00
my_thr_init.c Merge with mysql-maria tree 2009-02-19 11:01:25 +02:00
my_uuid.c Small fixes for pushbuild: compiler warnings, checking that partitioning is enabled when testing it. 2008-10-15 14:44:31 +02:00
my_vle.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_wincond.c fixes for hanging waiting_thread-t.c on windows 2008-10-21 16:10:04 +02:00
my_windac.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_winthread.c Windows fixes 2008-01-10 13:21:53 +01:00
my_write.c Minor changes. New description in SHOW ENGINES for Maria. 2008-01-31 23:17:50 +01:00
mysys_priv.h WL#3262 add mutex lock order checking to safemutex (also called safe_mutex_deadlock_detector) 2008-12-03 00:02:52 +02:00
ptr_cmp.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
queues.c Fix for server bug experienced in Maria (wrong "Truncated incorrect <var_name> 2008-02-18 23:29:39 +01:00
rijndael.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
safemalloc.c Merged 5.1 with maria 5.1 2008-10-10 18:28:41 +03:00
sha1.c Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
stacktrace.c merge fix from 5.0-bugteam 2008-09-16 15:23:07 +02:00
string.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
test_charset.c Fix doxygen warnings. 2007-08-15 17:43:08 +04:00
test_dir.c Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
test_fn.c Many files: 2006-12-23 20:17:15 +01:00
test_thr_mutex.c Add missing file: Testing of mutex-wrong-usage-detector 2008-12-03 00:09:37 +02:00
test_xml.c Many files: 2006-12-23 20:17:15 +01:00
testhash.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
thr_alarm.c Avoid compilation problem on AIX. 2008-04-28 13:41:12 -04:00
thr_lock.c Fix for Bug#40311 Assert in MARIA_RECORD_POS during pushbuild 2 test: 2008-12-22 02:17:37 +02:00
thr_mutex.c Merge with mysql-maria tree 2009-02-19 11:01:25 +02:00
thr_rwlock.c wt needs to use its own implementation of rwlocks with 2008-10-24 12:34:08 +02:00
tree.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
trie.c WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
typelib.c Added "pool-of-threads" handling (with libevent) 2009-03-13 00:27:35 +02:00
waiting_threads.c compilation fixes 2009-01-19 16:27:49 +01:00
wqueue.c Debug code fixed. 2008-04-21 17:43:38 +03:00