summaryrefslogtreecommitdiff
path: root/sql/sql_connect.h
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-26325 Shutdown hangs whenever named pipes were used for connections.Vladislav Vaintroub2021-08-121-1/+4
| | | | | This was a regression introduced in MDEV-18353, where to CONNECT objects were incorrectly counted for named pipes.
* Merge branch '10.4' into 10.5Oleksandr Byelkin2021-07-311-2/+11
|\
| * MDEV-18353 Shutdown may miss to wait for connection threadSergei Golubchik2021-07-241-0/+3
| | | | | | | | | | | | * count CONNECT objects too * wait for all CONNECT objects to disappear (to be converted to THDs) before killing THDs away
* | MDEV-22437 make THR_THD* variable thread_localEugene Kosov2020-05-051-1/+1
| | | | | | | | | | | | | | Now all access goes through _current_thd() and set_current_thd() functions. Some functions like THD::store_globals() can not fail now.
* | Merge 10.4 into 10.5Marko Mäkelä2019-05-231-1/+1
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
| |\
| | * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | Maintain connection_count atomicallySergey Vojtovich2019-05-211-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed LOCK_connection_count. Removed duplicate denied_connections and connection_errors_max_connection increment from create_new_thread(). Another increment done by CONNECT::close_with_error(). Simplified away CONNECT::thread_count_incremented. Now close_with_error() is always called with connection_count incremented. Part of MDEV-19515 - Improve connect speed
* | | | Simplified away scheduler_functions::end_thread()Sergey Vojtovich2019-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code properly integrated into callers instead. do_handle_one_connection(): no need to reset thd and thd->thread_stack as they're not updated by cache_thread(). Part of MDEV-19515 - Improve connect speed
* | | | Moved vio allocation to connection threadSergey Vojtovich2019-05-211-8/+14
| | | | | | | | | | | | | | | | Part of MDEV-19515 - Improve connect speed
* | | | Simplified away CONNECT::real_idSergey Vojtovich2019-05-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It was wrong anyway, as it may not get updated by the time created thread reads it. And it was 0 for cached threads. Part of MDEV-19515 - Improve connect speed
* | | | Simplified away CONNECT::extra_portSergey Vojtovich2019-05-211-2/+0
| | | | | | | | | | | | | | | | Part of MDEV-19515 - Improve connect speed
* | | | Simplified away CONNECT::hostSergey Vojtovich2019-05-211-2/+1
|/ / / | | | | | | | | | Part of MDEV-19515 - Improve connect speed
* | | MDEV-13641 host errors are not reset after successful connection.Vladislav Vaintroub2017-08-251-1/+4
| | | | | | | | | | | | | | | | | | Fixed thd_set_peer_addr() to propagate host error count from ip_to_hostname() to check_connection(), which tests this count to clear errors affter successful authentication.
* | | Enusure that my_global.h is included firstMichael Widenius2017-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added sql/mariadb.h file that should be included first by files in sql directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables that must be done before my_global.h is included) - Removed a lot of include my_global.h from include files - Removed include's of some files that my_global.h automatically includes - Removed duplicated include's of my_sys.h - Replaced include my_config.h with my_global.h
* | | MDEV-11159 Server proxy protocol supportVladislav Vaintroub2017-08-221-0/+1
| | | | | | | | | | | | | | | | | | accept proxy protocol header from client connections. The new server variable 'proxy_protocol_networks' contains list of networks from which proxy header is accepted.
* | | MDEV-13245 Add struct AUTHIDAlexander Barkov2017-07-051-1/+0
|/ /
* | Reuse THD for new user connectionsMonty2016-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - To ensure that mallocs are marked for the correct THD, even if it's allocated in another thread, I added the thread_id to the THD constructor - Added st_my_thread_var to thr_lock_info_init() to avoid a call to my_thread_var - Moved things from THD::THD() to THD::init() - Moved some things to THD::cleanup() - Added THD::free_connection() and THD::reset_for_reuse() - Added THD to CONNECT::create_thd() - Added THD::thread_dbug_id and st_my_thread_var->dbug_id. These are needed to ensure that we have a constant thread_id used for debugging with a THD, even if it changes thread_id (=connection_id) - Set variables.pseudo_thread_id in constructor. Removed not needed sets.
* | Fix compilation10.2-sslVladislav Vaintroub2016-02-101-1/+1
| |
* | MDEV-6150 Speed up connection speed by moving creation of THD to new threadMonty2016-02-071-1/+36
|/ | | | | | | | | | | | | | | | Creating a CONNECT object on client connect and pass this to the working thread which creates the THD. Split LOCK_thread_count to different mutexes Added LOCK_thread_start to syncronize threads Moved most usage of LOCK_thread_count to dedicated functions Use next_thread_id() instead of thread_id++ Other things: - Thread id now starts from 1 instead of 2 - Added cast for thread_id as thread id is now of type my_thread_id - Made THD->host const (To ensure it's not changed) - Removed some DBUG_PRINT() about entering/exiting mutex as these was already logged by mutex code - Fixed that aborted_connects and connection_errors_internal are counted in all cases - Don't take locks for current_linfo when we set it (not needed as it was 0 before)
* mysql-5.5.18 mergeSergei Golubchik2011-11-031-1/+1
|\
| * Updated/added copyright headersKent Boortz2011-06-301-1/+1
| |
* | merge with 5.3Sergei Golubchik2011-10-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
* | post-merge fixes.Sergei Golubchik2011-07-021-0/+2
| | | | | | | | | | most tests pass. 5.3 merge is next
* | 5.5-mergeSergei Golubchik2011-07-021-2/+4
|\ \ | |/
| * mergeMikael Ronstrom2011-03-041-1/+1
| |\
| | * Bug#11765108 (Bug#58036) client utf32, utf16, ucs2 should be disallowed, ↵Alexander Barkov2011-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | they crash server Problem: ucs2 was correctly disallowed in "SET NAMES" only, while mysql_real_connect() and mysql_change_user() still allowed to use ucs2, which made server crash. Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user(). @ sql/set_var.cc Using new function. @ sql/sql_acl.cc - Return error if character set initialization failed - Getting rid of pointer aliasing: Initialize user_name to NULL, to avoid double free(). @ sql/sql_connect.cc - in case of unsupported client character set send error and return true - in case of success return false @ sql/sql_connect.h - changing return type for thd_init_client_charset() to bool, to return errors to the caller @ sql/sql_parse.h - introducing a new function, to reuse in all places where we need to check client character set. @ tests/mysql_client_test.c Adding test
| * | Simplify interface to connect methods in serverMikael Ronström2011-02-101-0/+2
| |/
| * merge of mysql-5.5 into mysql-5.5-wl1054Georgi Kodinov2010-09-201-0/+3
| |\
| * | WL#1054: Pluggable authentication supportGeorgi Kodinov2010-08-091-0/+4
| | | | | | | | | | | | | | | Merged the implementation to a new base tree.
* | | lots of post-merge changesSergei Golubchik2011-04-251-0/+8
| | |
* | | merge.Sergei Golubchik2010-11-251-4/+14
| |/ |/| | | | | | | | | checkpoint. does not compile.
* | WL#5363: Thread Pool Service InterfaceMats Kindahl2010-06-071-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to allow thread schedulers to be dynamically loaded, it is necessary to make the following changes to the server: - Two new service interfaces - Modifications to InnoDB to inform the thread scheduler of state changes. - Changes to the VIO subsystem for checking if data is available on a socket. - Elimination of remains of the old thread pool implementation. The two new service interfaces introduces are: my_thread_scheduler A service interface to register a thread scheduler. thd_wait A service interface to inform thread scheduler that the thread is about to start waiting. In addition, the patch adds code that: - Add a call to thd_wait for table locks in mysys thd_lock.c by introducing a set function that can be used to set a callback to be used when waiting on a lock and resuming from waiting. - Calling the mysys set function from the server to set the callbacks correctly.
* WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-0/+43
This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h