summaryrefslogtreecommitdiff
path: root/include/mysql/psi/mysql_socket.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.1 into 10.2Marko Mäkelä2020-07-141-8/+16
|\
| * MDEV-22173: socket accept - test for failureDaniel Black2020-07-061-8/+16
| | | | | | | | | | | | | | | | | | | | accept might return an error, including SOCKET_EAGAIN/ SOCKET_EINTR. The caller, usually handle_connections_sockets can these however and invalid file descriptor isn't something to call fcntl on. Thanks to Etienne Guesnet (ATOS) for diagnosis, sample patch description and testing.
* | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-01-201-6/+12
|\ \ | |/
| * Merge branch 'merge-perfschema-5.6' into 10.1Oleksandr Byelkin2020-01-191-6/+12
| |\
| | * 5.6.47Oleksandr Byelkin2020-01-191-6/+12
| | |
| | * 5.6.31Sergei Golubchik2016-06-211-5/+5
| | |
| | * perfschema 5.6.10 initial commit.Sergei Golubchik2014-05-071-0/+1161
| | | | | | | | include/mysql/psi/*
* | 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
| |
* | MDEV-17373 Windows: application verifier stop "Attempt to use an unknown SOCKET"Vladislav Vaintroub2018-10-051-2/+2
| |
* | Merge branch '10.1' into 10.2Sergei Golubchik2018-06-211-0/+6
|\ \ | |/
| * Merge branch '10.0-galera' into 10.1Vicențiu Ciorbaru2018-06-121-0/+6
| |\
| | * MDEV-8743: mysqld port/socket - FD_CLOEXEC if no SOCK_CLOEXECDaniel Black2018-04-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In MDEV-8743, the port/socket of mysqld was changed to set FD_CLOEXEC. The existing mysql_socket_socket function already set that with SOCK_CLOEXEC when the socket was created. So here we move the fcntl functionality to the mysql_socket_socket as port/socket are the only callers. Preprocessor checks of SOCK_CLOEXEC cannot be done as its a 0 if not there and SOCK_CLOEXEC (being the value of the enum in bits/socket_type.h) Preprocesssor logic for arithmetic and non-arithmetic defines are hard/nonportable/ugly to read. As such we just check in my_global.h and define HAVE_SOCK_CLOEXEC if we have it. There was a disparity in behaviour between defined(WITH_WSREP) and not depending on the OS, so the WITH_WSREP condition was removed from setting calling fcntl. All sockets are now maked SOCK_CLOEXEC/FD_CLOEXEC. strace of mysqld with SOCK_CLOEXEC: socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_TCP) = 10 write(2, "180419 14:52:40 [Note] Server socket created on IP: '127.0.0.1'.\n", 65180419 14:52:40 [Note] Server socket created on IP: '127.0.0.1'. ) = 65 setsockopt(10, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 bind(10, {sa_family=AF_INET, sin_port=htons(16020), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 listen(10, 150) = 0 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_TCP) = 11 write(2, "180419 14:52:40 [Note] Server socket created on IP: '127.0.0.1'.\n", 65180419 14:52:40 [Note] Server socket created on IP: '127.0.0.1'. ) = 65 setsockopt(11, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 bind(11, {sa_family=AF_INET, sin_port=htons(16021), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 listen(11, 150) = 0 socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 12 unlink("/home/dan/repos/build-mariadb-server-10.0/mysql-test/var/tmp/mysqld.1.sock") = -1 ENOENT (No such file or directory) setsockopt(12, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 umask(000) = 006 bind(12, {sa_family=AF_UNIX, sun_path="/home/dan/repos/build-mariadb-server-10.0/mysql-test/var/tmp/mysqld.1.sock"}, 110) = 0 umask(006) = 000 listen(12, 150) = 0
| | * Merge tag 'mariadb-10.0.23' into 10.0-galeraNirbhay Choubey2015-12-191-2/+2
| | |\
| | * | Add close-on-exec flag to open(), socket(), accept() & fopen().Nirbhay Choubey2015-06-241-1/+23
| | | |
* | | | Fix many -Wconversion warnings.Marko Mäkelä2017-03-071-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define my_thread_id as an unsigned type, to avoid mismatch with ulonglong. Change some parameters to this type. Use size_t in a few more places. Declare many flag constants as unsigned to avoid sign mismatch when shifting bits or applying the unary ~ operator. When applying the unary ~ operator to enum constants, explictly cast the result to an unsigned type, because enum constants can be treated as signed. In InnoDB, change the source code line number parameters from ulint to unsigned type. Also, make some InnoDB functions return a narrower type (unsigned or uint32_t instead of ulint; bool instead of ibool).
* | | | MDEV-6150 Speed up connection speed by moving creation of THD to new threadMonty2016-02-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | | Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2015-12-291-2/+4
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-211-2/+2
| |\ \ \ | | | |/ | | |/|
| | * | Correct comments before mysql_socket_{g|s}etfd to refer to the right functionDaniel Black2015-12-111-2/+2
| | |/
| * | Fix warning about unused variable if FD_CLOEXEC is not definedVladislav Vaintroub2015-11-241-0/+2
| | |
* | | cmake: remove unused checks, options, and symbolsSergei Golubchik2015-11-231-1/+1
|/ /
* | compilation failures on WindowsSergei Golubchik2015-07-231-0/+4
| |
* | Merge branch '10.0-galera' into 10.1Nirbhay Choubey2015-07-141-1/+23
|/
* Temporary commit of 10.0-mergeMichael Widenius2013-03-261-77/+101
|
* Temporary commit of merge of MariaDB 10.0-base and MySQL 5.6Michael Widenius2012-08-011-0/+1137