Michael Widenius
615d51b650
Speed up connection time:
...
-Change my_rnd() slightly to make it safer if two threads use it at the same time.
-Avoid some sprintf and strmov in vio.
-Changed thread_count to be automically incremented (instead of under LOCK_thread_count).
-Thread cache now uses LOCK_thread_cache instead of LOCK_thread_count.
-Moved delete thd out from LOCK_thread_count.
-Save some mysql_cond_broadcast(&COND_thread_count) calls.
-Removed call to getsockname() during connect.
-Initialize random generator without locks.
Other things:
-Added thread_safe_decrement32() and thread_safe_increment32()
-Removed sql_rnd_with_mutex() and get_thread_running()
Thanks to Yoshinori Matsunobu for the benchmark of connection speed and to
Domas Mituzas for the inspiration for many of the fixes.
include/violite.h:
Change desc to a string pointer
mysql-test/suite/perfschema/r/all_instances.result:
Added new mutex
mysys/my_rnd.c:
Change my_rnd() slightly to make it safer if two threads use it at the same time.
sql/event_scheduler.cc:
Changed thread_count to be automically incremented
Moved some safe things out from LOCK_thread_count.
Simplify deleting of THD for running thread.
sql/mysqld.cc:
Changed thread_count to be automically incremented
Thread cache now uses LOCK_thread_cache instead of LOCK_thread_count
Added delete_running_thd()
Moved delete thd out from LOCK_thread_count
More DBUG_ENTER
Only call mysql_cond_broadcast(&COND_thread_count) if thread_count is 0
Removed call to getsockname() (old not anymore needed check)
sql/mysqld.h:
Removed sql_rnd_with_mutex() (not needed anymore)
Removed not used function get_thread_running()
Added thread_safe_decrement32() and thread_safe_increment32()
Simplified dec_thread_running() and inc_thread_running()
sql/sql_class.cc:
Removed thd_lock_thread_count() and thd_unlock_thread_count()
Initialize random generator without locks
sql/sql_insert.cc:
Changed thread_count to be automically incremented
sql/sql_parse.cc:
Changed thread_count to be automically incremented
vio/vio.c:
Don't generate 'desc' with sprintf/strmov. Assign a pointer instead.
(Good enough as this is just for debugging)
2013-03-20 01:46:35 +02:00
..
2011-10-19 21:45:18 +02:00
2012-12-16 16:49:19 -08:00
2012-01-13 15:50:02 +01:00
2012-09-01 14:21:59 -07:00
2011-11-24 18:48:58 +02:00
2013-01-29 15:10:47 +01:00
2011-06-30 17:46:53 +02:00
2012-10-18 23:33:06 +02:00
2011-10-19 21:45:18 +02:00
2013-01-23 16:16:14 +01:00
2012-03-28 19:26:00 +02:00
2012-09-07 17:05:17 +03:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2011-11-03 19:17:05 +01:00
2011-06-30 17:46:53 +02:00
2013-01-23 16:18:09 +01:00
2011-11-03 19:17:05 +01:00
2013-01-29 15:10:47 +01:00
2012-01-13 15:50:02 +01:00
2012-01-13 15:50:02 +01:00
2012-01-13 15:50:02 +01:00
2011-11-03 19:17:05 +01:00
2011-11-03 19:17:05 +01:00
2013-03-20 01:46:35 +02:00
2011-06-30 17:46:53 +02:00
2013-01-23 16:16:14 +01:00
2011-07-02 22:08:51 +02:00
2012-06-14 20:05:31 +02:00
2013-01-29 15:10:47 +01:00
2013-01-29 15:10:47 +01:00
2013-01-23 16:16:14 +01:00
2012-09-01 14:21:59 -07:00
2013-01-29 15:10:47 +01:00
2012-09-01 14:21:59 -07:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2012-04-29 18:08:11 +05:00
2011-12-08 16:29:45 +04:00
2012-01-13 15:50:02 +01:00
2011-11-27 17:46:20 +01:00
2012-11-06 11:52:55 +02:00
2011-12-11 11:34:44 +02:00
2011-11-27 17:46:20 +01:00
2013-01-29 15:10:47 +01:00
2012-02-16 10:48:16 +01:00
2013-01-23 16:18:09 +01:00
2012-03-28 01:04:46 +02:00
2013-01-29 15:10:47 +01:00
2013-01-29 15:10:47 +01:00
2013-01-29 15:10:47 +01:00
2013-01-29 15:10:47 +01:00
2011-11-03 19:17:05 +01:00
2011-11-03 19:17:05 +01:00
2013-01-15 19:13:32 +01:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2012-05-04 07:16:38 +02:00
2012-12-17 10:56:26 +01:00
2013-02-26 01:20:17 +02:00
2013-02-26 01:20:17 +02:00
2012-12-23 23:37:11 +02:00
2012-09-28 14:01:17 +03:00
2013-01-29 15:10:47 +01:00
2013-01-29 15:10:47 +01:00
2013-01-15 19:07:46 +01:00
2013-01-15 19:07:46 +01:00
2013-02-26 01:20:17 +02:00
2012-01-13 15:50:02 +01:00
2013-02-26 01:20:17 +02:00
2013-02-04 17:25:10 +02:00
2013-02-26 01:20:17 +02:00
2013-02-26 01:20:17 +02:00
2013-02-26 01:20:17 +02:00
2013-01-07 20:21:05 +01:00
2013-01-15 19:07:46 +01:00
2013-01-15 19:07:46 +01:00
2013-01-15 19:07:46 +01:00
2013-01-15 19:07:46 +01:00
2013-02-26 01:20:17 +02:00
2013-02-26 01:20:17 +02:00
2011-12-11 11:34:44 +02:00
2011-11-03 19:17:05 +01:00
2012-12-17 10:56:26 +01:00
2011-11-03 19:17:05 +01:00
2012-12-23 23:37:11 +02:00
2012-05-08 14:27:44 +02:00
2011-11-03 19:17:05 +01:00
2013-01-29 15:10:47 +01:00
2012-08-24 14:02:32 +02:00
2013-01-29 15:10:47 +01:00
2013-01-29 15:10:47 +01:00
2013-01-29 15:10:47 +01:00
2012-12-16 16:49:19 -08:00
2011-06-30 17:46:53 +02:00
2013-01-29 15:10:47 +01:00
2012-12-05 20:47:21 +04:00
2012-04-18 13:14:05 +02:00
2012-01-13 15:50:02 +01:00
2011-11-03 19:17:05 +01:00
2012-12-13 23:05:12 -08:00
2012-02-17 12:19:38 +01:00
2012-07-17 21:52:08 +04:00
2012-07-17 21:52:08 +04:00
2012-01-13 15:50:02 +01:00
2012-04-05 23:07:18 +02:00
2012-07-12 15:32:35 +02:00
2011-05-20 01:38:42 +02:00
2011-06-30 17:46:53 +02:00
2013-03-20 01:46:35 +02:00
2013-03-20 01:46:35 +02:00
2013-01-23 16:16:14 +01:00
2011-12-13 17:44:19 +02:00
2011-12-13 17:44:19 +02:00
2012-02-21 20:51:56 +01:00
2013-01-20 14:06:33 +01:00
2013-01-29 15:10:47 +01:00
2013-01-28 15:13:39 +02:00
2013-02-26 01:20:17 +02:00
2012-05-04 07:16:38 +02:00
2012-10-08 19:40:30 +05:30
2012-02-17 12:19:38 +01:00
2012-05-04 07:16:38 +02:00
2012-05-04 07:16:38 +02:00
2011-11-03 19:17:05 +01:00
2012-01-13 15:50:02 +01:00
2011-06-30 17:46:53 +02:00
2012-06-14 20:05:31 +02:00
2011-06-30 17:46:53 +02:00
2011-11-03 19:17:05 +01:00
2013-01-23 16:16:14 +01:00
2012-07-10 21:23:00 +04:00
2013-01-29 15:10:47 +01:00
2011-11-22 18:04:38 +01:00
2012-08-24 15:29:01 +02:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:37:13 +02:00
2013-01-23 16:18:09 +01:00
2012-03-19 15:00:23 -07:00
2013-01-23 16:18:09 +01:00
2013-01-23 16:18:09 +01:00
2012-03-28 01:04:46 +02:00
2011-11-03 19:17:05 +01:00
2013-01-23 16:18:09 +01:00
2013-01-29 15:10:47 +01:00
2012-03-17 01:26:58 -07:00
2012-03-17 01:26:58 -07:00
2012-08-28 19:39:49 +03:00
2012-03-17 01:26:58 -07:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2013-01-29 15:10:47 +01:00
2012-10-03 01:44:54 +03:00
2013-01-23 16:18:09 +01:00
2011-06-30 17:46:53 +02:00
2013-01-23 16:18:09 +01:00
2012-08-22 11:40:39 +02:00
2012-12-21 00:12:37 +01:00
2012-11-02 10:43:52 +01:00
2012-12-16 16:49:19 -08:00
2012-12-18 11:56:00 +01:00
2011-06-30 17:46:53 +02:00
2012-07-31 19:29:07 +02:00
2013-01-23 16:19:37 +01:00
2012-09-28 02:06:56 +03:00
2012-03-28 01:04:46 +02:00
2012-03-28 01:04:46 +02:00
2013-01-29 15:10:47 +01:00
2012-04-05 12:01:52 +02:00
2013-01-23 16:18:09 +01:00
2011-06-30 17:46:53 +02:00
2013-01-15 19:13:32 +01:00
2013-01-15 19:13:32 +01:00
2013-01-29 15:10:47 +01:00
2011-11-24 18:48:58 +02:00
2012-11-09 10:11:20 +02:00
2012-11-09 10:11:20 +02:00
2013-01-29 15:10:47 +01:00
2011-11-24 18:48:58 +02:00
2013-01-23 16:19:37 +01:00
2011-06-30 17:46:53 +02:00
2011-11-03 19:17:05 +01:00
2011-06-30 17:46:53 +02:00
2012-01-13 15:50:02 +01:00
2013-01-23 16:16:14 +01:00
2013-01-23 16:18:09 +01:00
2013-01-29 15:10:47 +01:00
2013-01-15 19:16:29 +01:00
2013-01-29 15:10:47 +01:00
2013-01-10 00:58:36 +02:00
2012-03-05 21:55:25 +01:00
2011-06-30 17:46:53 +02:00
2011-11-03 19:17:05 +01:00
2011-11-03 19:17:05 +01:00
2013-01-23 16:16:14 +01:00
2012-07-13 22:17:32 +03:00
2011-11-03 19:17:05 +01:00
2013-03-20 01:46:35 +02:00
2013-01-29 15:10:47 +01:00
2012-02-28 18:53:05 +01:00
2013-01-15 19:07:46 +01:00
2012-05-28 11:14:43 +05:30
2013-01-29 15:10:47 +01:00
2011-11-21 19:13:14 +02:00
2011-11-21 19:13:14 +02:00
2012-08-21 08:46:32 +03:00
2011-06-30 17:46:53 +02:00
2013-01-29 15:10:47 +01:00
2011-11-03 19:17:05 +01:00
2013-01-23 16:16:14 +01:00
2011-06-30 17:46:53 +02:00
2012-03-17 01:26:58 -07:00
2011-11-03 19:17:05 +01:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2013-01-23 16:16:14 +01:00
2013-01-23 16:19:37 +01:00
2012-10-17 15:43:56 +03:00
2012-02-17 12:19:38 +01:00
2013-01-29 15:10:47 +01:00
2011-10-19 21:45:18 +02:00
2013-01-15 19:13:32 +01:00
2011-06-30 17:46:53 +02:00
2013-03-20 01:46:35 +02:00
2011-06-30 17:46:53 +02:00
2013-01-23 16:16:14 +01:00
2012-02-21 20:51:56 +01:00
2013-02-26 01:20:17 +02:00
2013-02-26 01:20:17 +02:00
2012-02-17 12:19:38 +01:00
2011-11-03 19:17:05 +01:00
2013-01-15 19:07:46 +01:00
2013-01-29 15:10:47 +01:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2012-02-15 18:08:08 +01:00
2011-06-30 17:46:53 +02:00
2013-03-20 01:46:35 +02:00
2011-11-22 18:04:38 +01:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2012-10-17 15:43:56 +03:00
2012-03-28 01:04:46 +02:00
2011-11-15 22:00:14 +04:00
2013-01-18 19:04:23 +01:00
2013-01-30 22:33:25 +01:00
2012-08-09 17:22:00 +02:00
2013-01-23 16:19:37 +01:00
2011-06-30 17:46:53 +02:00
2013-02-26 01:20:17 +02:00
2013-01-15 19:07:46 +01:00
2013-01-15 19:07:46 +01:00
2013-01-23 16:16:14 +01:00
2012-12-13 23:05:12 -08:00
2011-06-30 17:46:53 +02:00
2013-01-30 15:11:36 +01:00
2013-01-30 15:11:36 +01:00
2013-02-26 01:20:17 +02:00
2012-12-16 16:49:19 -08:00
2013-01-23 16:18:09 +01:00
2011-06-30 17:46:53 +02:00
2013-01-29 15:10:47 +01:00
2012-12-16 16:49:19 -08:00
2013-01-15 19:13:32 +01:00
2011-06-30 17:46:53 +02:00
2012-09-01 14:21:59 -07:00
2012-09-18 15:14:19 +03:00
2013-01-29 15:10:47 +01:00
2013-01-08 08:17:51 -08:00
2013-01-23 16:16:14 +01:00
2013-01-23 16:16:14 +01:00
2013-01-23 16:16:14 +01:00
2012-10-17 15:43:56 +03:00
2011-11-21 19:13:14 +02:00
2011-06-30 17:46:53 +02:00
2013-01-23 16:16:14 +01:00
2011-11-03 19:17:05 +01:00
2013-01-15 19:07:46 +01:00
2012-08-31 14:15:52 +02:00
2013-01-23 16:18:09 +01:00
2012-01-13 15:50:02 +01:00
2013-01-25 21:40:42 +02:00
2013-01-23 16:18:09 +01:00
2011-06-30 17:46:53 +02:00
2013-01-29 15:10:47 +01:00
2011-06-30 17:46:53 +02:00
2013-01-29 15:10:47 +01:00
2011-11-03 19:17:05 +01:00
2012-05-04 07:16:38 +02:00
2011-06-30 17:46:53 +02:00
2013-03-17 14:36:20 +02:00
2012-09-28 02:06:56 +03:00
2011-11-03 19:17:05 +01:00
2012-12-13 23:05:12 -08:00
2011-06-30 17:46:53 +02:00
2013-02-26 01:20:17 +02:00
2012-12-17 10:56:26 +01:00
2013-01-29 15:10:47 +01:00
2013-01-29 15:10:47 +01:00
2013-01-23 16:16:14 +01:00
2013-01-23 16:16:14 +01:00
2012-12-21 00:12:37 +01:00
2012-11-02 10:43:52 +01:00
2012-11-02 10:43:52 +01:00
2012-02-17 23:27:15 +01:00
2012-03-15 15:10:57 +06:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2013-01-29 15:10:47 +01:00
2011-12-11 11:34:44 +02:00
2012-01-13 15:50:02 +01:00
2013-01-29 15:10:47 +01:00
2013-01-23 16:16:14 +01:00
2012-06-25 18:17:24 +02:00
2012-03-17 01:26:58 -07:00
2012-02-17 12:19:38 +01:00