summaryrefslogtreecommitdiff
path: root/sql/sql_connect.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.5 into 10.6Marko Mäkelä2023-01-031-1/+1
|\
| * Merge 10.4 into 10.5Marko Mäkelä2023-01-031-1/+1
| |\
| | * Merge 10.3 into 10.4Marko Mäkelä2023-01-031-1/+1
| | |\
| | | * --skip-name-resolve=0 didn't workSergei Golubchik2023-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | custom code in `case OPT_SKIP_RESOLVE` was overriding the correct value from handle_options().
* | | | Merge 10.5 into 10.6Marko Mäkelä2022-12-131-1/+2
|\ \ \ \ | |/ / /
| * | | Merge 10.4 into 10.5Marko Mäkelä2022-12-131-1/+2
| |\ \ \ | | |/ /
| | * | Merge 10.3 into 10.4Marko Mäkelä2022-12-131-1/+2
| | |\ \ | | | |/
| | | * MDEV-12274: Too many connections warning in error log (#2213)Daniel Black2022-11-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the default warning level, aborted unauthenticated connections are in the error log. These errors frequently occur in production environments because cancelled connectiosn occur all the time when web pages are shutdown. Rather than flood our user's errors log with these ordinary messages, lets push them down to the warning level at log-warnings=4 level. Concept approved by Monty.
| * | | Merge branch '10.4' into 10.5Vladislav Vaintroub2022-11-211-1/+0
| |\ \ \ | | |/ /
| | * | MDEV-30055 shutdown_now_windows.test fails with "Assertion `unix_sock.fd >= ↵Vladislav Vaintroub2022-11-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | 0' failed." Remove DBUG_ASSERT that depends on timing.
* | | | MDEV-30055 - fix race condition in shutdown_debug.testVladislav Vaintroub2022-11-211-1/+0
| | | | | | | | | | | | | | | | Remove DBUG_ASSERT, that depends on timing/scheduling to succeed.
* | | | Merge branch '10.5' into 10.6Vladislav Vaintroub2022-09-071-8/+6
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | # Conflicts: # sql/sql_connect.cc # sql/threadpool_common.cc
| * | | Merge branch '10.4' into 10.5Vladislav Vaintroub2022-09-071-8/+6
| |\ \ \ | | |/ / | | | | | | | | | | | | # Conflicts: # sql/sql_connect.cc
| | * | MDEV-18353 - minor cleanupVladislav Vaintroub2022-09-071-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not repeat yourself. Instead of having the same DBUG_EXECUTE_IF code in threadpool and thread-per-connection, add this code to setup_connection_thread_globals() which is executed in all scheduling modes.
* | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2021-08-021-3/+11
|\ \ \ \ | |/ / /
| * | | Merge branch '10.4' into 10.5Oleksandr Byelkin2021-07-311-3/+11
| |\ \ \ | | |/ /
| | * | MDEV-18353 Shutdown may miss to wait for connection threadSergei Golubchik2021-07-241-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | * count CONNECT objects too * wait for all CONNECT objects to disappear (to be converted to THDs) before killing THDs away
* | | | MDEV-25602 get rid of __WIN__ in favor of standard _WIN32Vladislav Vaintroub2021-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixed the MySQL bug# 20338 about misuse of double underscore prefix __WIN__, which was old MySQL's idea of identifying Windows Replace it by _WIN32 standard symbol for targeting Windows OS (both 32 and 64 bit) Not that connect storage engine is not fixed in this patch (must be fixed in "upstream" branch)
* | | | Change CHARSET_INFO character set and collaction names to LEX_CSTRINGMonty2021-05-191-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removed 68 explict strlen() calls from the code. The following renames was done to ensure we don't use the old names when merging code from earlier releases, as using the new variables for print function could result in crashes: - charset->csname renamed to charset->cs_name - charset->name renamed to charset->coll_name Almost everything where mechanical changes except: - Changed to use the new Protocol::store(LEX_CSTRING..) when possible - Changed to use field->store(LEX_CSTRING*, CHARSET_INFO*) when possible - Changed to use String->append(LEX_CSTRING&) when possible Other things: - There where compiler issues with ensuring that all character set names points to the same string: gcc doesn't allow one to use integer constants when defining global structures (constant char * pointers works fine). To get around this, I declared defines for each character set name length.
* | | Merge branch 'bb-10.4-release' into bb-10.5-releaseSergei Golubchik2021-02-151-1/+1
|\ \ \ | |/ /
| * | Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-121-1/+1
| |\ \ | | |/ | | | | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| | * Merge branch '10.2' into 10.3Sergei Golubchik2021-02-011-1/+1
| | |\
| | | * MDEV-17852 Altered connection limits for user have no effectSergei Golubchik2021-01-111-1/+1
| | | | | | | | | | | | | | | | update mqh in struct user_conn after taking it from the cache
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-12-231-1/+1
| | |\ \ | | | |/
| | | * MDEV-23065 : Crash after setting wsrep_on to ON dynamically and reconnectJan Lindström2020-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | At end_connection make sure we have wsrep before trying to free connection assigned to it.
* | | | MDEV-19275 Provide SQL service to plugins.Alexey Botchkov2020-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Protocol_local fixed so it can be used now. Some Protocol:: methods made virtual so they can adapt. as well as net_ok and net_send_error functions. execute_sql_string function is exported to the plugins. To be changed with the mysql_use_result.
* | | | thd->m_transaction_psi was not properly cleared for new connectionsMonty2020-07-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happend when using XA transactions. I also added some extra asserts to ensure that m_transactions are properly cleared. Other things: - Removed set_time() from THD::init_for_queries() as dispatch_command() is already doing that. - Removed duplicate init_for_queries() from prepare_new_connection_state(). The init_for_queries() functions should only be called once per connection.
* | | | Move all thread cache specific code to a new classSergey Vojtovich2020-05-061-1/+2
| | | | | | | | | | | | | | | | | | | | Part of MDEV-18353 - Shutdown may miss to wait for connection thread
* | | | MDEV-22437 make THR_THD* variable thread_localEugene Kosov2020-05-051-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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ä2020-03-301-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-03-301-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-03-301-1/+1
| | |\ \ | | | |/
| | | * MDEV-21473 conflicts with async slave BF aborting (#1475)seppo2020-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If async slave thread (slave SQL handler), becomes a BF victim, it may occasionally happen that rollbacker thread is used to carry out the rollback instead of the async slave thread. This can happen, if async slave thread has flagged "idle" state when BF thread tries to figure out how to kill the victim. The issue was possible to test by using a galera cluster as slave for external master, and issuing high load of conflicting writes through async replication and directly against galera cluster nodes. However, a deterministic mtr test for the "conflict window" has not yet been worked on. The fix, in this patch makes sure that async slave thread state is never set to IDLE. This prevents the rollbacker thread to intervene. The wsrep_query_state change was refactored to happen by dedicated function to make controlling the idle state change in one place.
* | | | MDEV-21743 Split up SUPER privilege to smaller privilegesAlexander Barkov2020-03-101-3/+3
| | | |
* | | | cleanup: PSI key is *always* the first argumentSergei Golubchik2020-03-101-13/+13
| | | |
* | | | perfschema thread instrumentation related changesSergei Golubchik2020-03-101-7/+13
| | | |
* | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-101-9/+9
| | | |
* | | | MDEV-21702 Add a data type for privilegesAlexander Barkov2020-02-111-1/+1
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-061-7/+11
|\ \ \ \ | |/ / /
| * | | MDEV-19826 10.4 seems to crash with "pool-of-threads" (#1370)Teemu Ollakka2019-08-301-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MariaDB 10.4 was crashing when thread-handling was set to pool-of-threads and wsrep was enabled. There were two apparent reasons for the crash: - Connection handling in threadpool_common.cc was missing calls to control wsrep client state. - Thread specific storage which contains thread variables (THR_KEY_mysys) was not handled appropriately by wsrep patch when pool-of-threads was configured. This patch addresses the above issues in the following way: - Wsrep client state open/close was moved in thd_prepare_connection() and end_connection() to have common handling for one-thread-per-connection and pool-of-threads. - Thread local storage handling in wsrep patch was reworked by introducing set of wsrep_xxx_threadvars() calls which replace calls to THD store_globals()/reset_globals() and deal with thread handling specifics internally. Wsrep-lib was updated to version which relaxes internal concurrency related sanity checks. Rollback code from wsrep_rollback_process() was extracted to separate calls for better readability. Post rollback thread was removed as it was completely unused.
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-08-131-1/+2
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-07-021-1/+2
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2019-07-021-1/+2
| | |\ \ | | | |/
| | | * Merge 10.1 into 10.2Eugene Kosov2019-06-231-1/+2
| | | |\
| | | | * MDEV-18661 loading the audit plugin causes performance regression.Alexey Botchkov2019-06-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plugin fixed to not lock the LOCK_operations when not active. Server fixed to lock the LOCK_plugin less - do it once per thread and then only if a plugin was installed/uninstalled.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-05-231-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-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
| | | |\ \ | | | | |/
| | | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | | | |\