1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-25 17:25:02 +03:00
Files
mariadb/sql
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
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
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
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-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-29 15:10:47 +01:00
2011-06-30 17:46:53 +02:00
2011-06-30 17:46:53 +02:00
2012-01-13 15:50:02 +01:00
2011-11-27 17:46:20 +01: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-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-23 23:37:11 +02: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-04 17:25:10 +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-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
2011-11-03 19:17:05 +01:00
2012-12-23 23:37:11 +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-01-13 15:50:02 +01:00
2011-11-03 19:17:05 +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
2013-03-20 01:46:35 +02:00
2013-03-20 01:46:35 +02:00
2012-02-21 20:51:56 +01:00
2013-01-29 15:10:47 +01:00
2012-05-04 07:16:38 +02: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
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-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
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-03-17 01:26:58 -07:00
2013-01-29 15:10:47 +01:00
2011-06-30 17:46:53 +02:00
2012-08-22 11:40:39 +02: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
2013-01-23 16:19:37 +01: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
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:18:09 +01:00
2013-01-29 15:10:47 +01:00
2013-01-29 15:10:47 +01:00
2013-01-10 00:58:36 +02: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
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
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
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:19:37 +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
2012-02-21 20:51:56 +01:00
2013-02-26 01:20:17 +02:00
2013-02-26 01:20:17 +02: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
2012-03-28 01:04:46 +02: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
2011-06-30 17:46:53 +02: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-16 16:49:19 -08:00
2013-01-15 19:13:32 +01:00
2011-06-30 17:46:53 +02:00
2013-01-29 15:10:47 +01:00
2013-01-08 08:17:51 -08: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
2012-01-13 15:50:02 +01: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
2011-11-03 19:17:05 +01:00
2013-02-26 01:20:17 +02:00
2013-01-29 15:10:47 +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
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
2012-03-17 01:26:58 -07:00