summaryrefslogtreecommitdiff
path: root/sql/net_serv.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.5 into 10.6Marko Mäkelä2022-09-261-1/+3
|\
| * Merge 10.4 into 10.5Marko Mäkelä2022-09-261-1/+3
| |\
| | * Fix build without either ENABLED_DEBUG_SYNC or DBUG_OFFMarko Mäkelä2022-09-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are separate flags DBUG_OFF for disabling the DBUG facility and ENABLED_DEBUG_SYNC for enabling the DEBUG_SYNC facility. Let us allow debug builds without DEBUG_SYNC. Note: For CMAKE_BUILD_TYPE=Debug, CMakeLists.txt will continue to define ENABLED_DEBUG_SYNC.
* | | merge 10.5 to 10.6Vladislav Vaintroub2021-07-161-4/+16
|\ \ \ | |/ /
| * | MDEV-21916: COM_STMT_BULK_EXECUTE with RETURNING insert wrong valuesOleksandr Byelkin2021-07-151-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | The problem is that array binding uses net buffer to read parameters for each execution while each execiting with RETURNING write in the same buffer. Solution is to allocate new net buffer to avoid changing buffer we are reading from.
* | | MDEV-25602 get rid of __WIN__ in favor of standard _WIN32Vladislav Vaintroub2021-06-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | MDEV-24341 Innodb - do not block in foreground thread in log_write_up_to(Vladislav Vaintroub2021-02-141-2/+14
|/ /
* | Merge 10.4 into 10.5Marko Mäkelä2020-09-041-1/+2
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2020-09-031-1/+2
| |\
| | * Merge 10.1 into 10.2Marko Mäkelä2020-09-031-2/+3
| | |\
| | | * MDEV-22387: Do not pass null pointer to some memcpy()Marko Mäkelä2020-09-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a null pointer to a nonnull argument is not only undefined behaviour, but it also grants the compiler the permission to optimize away further checks whether the pointer is null. GCC -O2 at least starting with version 8 may do that, potentially causing SIGSEGV. These problems were caught in a WITH_UBSAN=ON build with the Bug#7024 test in main.view.
| | | * imporve clang buildEugene Kosov2019-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about deprecated `register` keyword. Too much warnings came from Mroonga and I gave up on it.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-08-011-0/+12
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2020-07-311-1/+13
| |\ \ \ | | |/ /
| | * | MDEV-14203: rpl.rpl_extra_col_master_myisam, ↵Sujatha2020-07-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpl.rpl_slave_load_tmpdir_not_exist failed in buildbot with a warning Problem: ======= rpl.rpl_slave_load_tmpdir_not_exist 'stmt' w3 [ fail ] Found warnings/errors in server log file! Test ended at 2017-09-27 20:34:55 [Warning] Master is configured to log replication events with checksum, but will not send such events to slaves that cannot process them ^ Found warnings in /mnt/buildbot/build/mariadb-10.2.10/mysql-test/var/3/log/mysqld.1.err ok Analysis: ======== When slave tries to connect to master 'get_master_version_and_clock' function is invoked to perform elaborated slave-master handshake. During this process slave server queries master server, to know if it is checksum aware and at the same time master is notified about its CRC-awareness. The master's side instant value of @@global.binlog_checksum is stored in the dump thread's uservar area as well as cached locally to become known in consensus by master and slave. Post hand-shake slave requests master for binlog dump. It sends 'COM_BINLOG_DUMP'. This command is sent to master by 'cli_advanced_command' call. If there is some temporary network failure during this request_dump call, 'end_server' is invoked to close the current connection between master and slave. Upon connection close the dump thread on the master gets terminated and it clears the 'uservar' data it got through master-slave handshake. The 'COM_BINLOG_DUMP' command is sent once again without master-slave handshake. Since the checksum data is not available with new dump thread a warning gets reported. Fix: === Upon network write error donot attempt reconnect, proceed to master-slave handshake. This ensures that master is aware of slave's capability to use checksums.
* | | | my_net_init(): Avoid reading uninitialized data in my_net_local_init()Marko Mäkelä2020-03-281-1/+3
| | | |
* | | | MDEV-21907: Fix some -Wconversion outside InnoDBMarko Mäkelä2020-03-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some .c and .cc files are compiled as part of Mariabackup. Enabling -Wconversion for InnoDB would also enable it for Mariabackup. The .h files are being included during InnoDB or Mariabackup compilation. Notably, GCC 5 (but not GCC 4 or 6 or later versions) would report -Wconversion for x|=y when the type is unsigned char. So, we will either write x=(uchar)(x|y) or disable the -Wconversion warning for GCC 5. bitmap_set_bit(), bitmap_flip_bit(), bitmap_clear_bit(), bitmap_is_set(): Always implement as inline functions.
* | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-101-11/+14
|/ / /
* | | 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
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | Merge 10.2 into 10.3Marko Mäkelä2018-08-031-1/+1
|\ \ \ \ | |/ / /
* | | | MDEV-16478: mysql_real_connect() from libmariadbd.so always crashOleksandr Byelkin2018-06-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Returned accidentally removed undefinition of MYSQL_SERVER in net_serv.cc inside embedded server (embedded server uses real_net_read/write only as a client) Prevented attempt to clean up embedded server if it was not initialized
* | | | Add likely/unlikely to speed up executionMonty2018-05-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added to: - if (error) - Lex - sql_yacc.yy and sql_yacc_ora.yy - In header files to alloc() calls - Added thd argument to thd_net_is_killed()
* | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-02-151-2/+6
|\ \ \ \ | |/ / /
| * | | Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-061-2/+6
| |\ \ \ | | |/ /
| | * | Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-1/+3
| | |\ \
| | | * | don't crash debug builds on "packets out of order"Sergei Golubchik2018-01-311-1/+3
| | | | | | | | | | | | | | | | | | | | only do it in EXTRA_DEBUG builds
* | | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* | | | | Merge branch 'bb-10.2-ext' into 10.3Sergei Golubchik2017-08-261-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-08-171-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.0' into 10.1Sergei Golubchik2017-08-081-1/+1
| | |\ \ \ | | | |/ /
| | | * | Merge remote-tracking branch 'origin/5.5' into 10.0Vicențiu Ciorbaru2017-07-251-1/+1
| | | |\ \ | | | | |/
| | | | * Merge remote-tracking branch 'mysql/5.5' into 5.5Sergei Golubchik2017-07-181-1/+1
| | | | |\
| | | | | * BUG#24807826: UINT3KORR SHOULD STOP READING FOUR INSTEAD OFKarthik Kamath2017-03-091-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | THREE BYTES ON X86 Analysis: ========= The macro uint3korr reads 4 bytes of data instead of 3 on on x86 machines. Multiple definitions were created for this macro for optimization in WIN32. The idea was to optimize reading of 3 byte ints by reading an ordinary int and masking away the unused byte. However this is an undefined behavior. It will be an issue unless users are aware of allocating an extra byte for using this macro. Fix: ==== Removing the definition which reads 4 bytes of data. The only definition of this macro would now read just 3 bytes of data thus prohibiting the usage of an extra byte. Note: ===== This is a backport of Patches #5 and #6 for Bug#17922198.
* | | | | | MDEV-13641 host errors are not reset after successful connection.Vladislav Vaintroub2017-08-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Compile mariabackup with its own copy of net_serv.ccSergei Golubchik2017-08-231-26/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use the server's version, that expects a valid THD. Modify net_serv.cc not not use any THD if MYSQL_SERVER isn't defined. This reverts commit aaddac5cd7b23795ee617ee6f8b5613eec343e79.
* | | | | | MDEV-11159 Server proxy protocol supportVladislav Vaintroub2017-08-221-7/+74
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | accept proxy protocol header from client connections. The new server variable 'proxy_protocol_networks' contains list of networks from which proxy header is accepted.
* | | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-12-291-2/+2
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-09-281-2/+2
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-09-271-2/+2
| | |\ \ \ | | | |/ /
| | | * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-09-111-3/+3
| | | |\ \ | | | | |/ | | | | | | | | | | 80% reverted
| | | | * BUG#23703568 - IS CLIENT LIBRARY SUPPOSED TO RETRY EINTR INDEFINITELY OR NOTThayumanavar S2016-07-251-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit#ebd24626ca38e7fa1e3da2acdcf88540be70fabe obsoleted the THREAD and THREAD_SAFE_CLIENT preprocessor symbols. This is not removed in the sql/net_serv.cc thereby the code that retries on EINTR became dead code. Remove the THREAD_SAFE_CLIENT preprocessor directive form sql/net_serv.cc. Also check errno for EINTR only if there is an error in preceding read call.
| | | | * Bug#17474166 - EXECUTING STATEMENT LIKE 'SHOW ENGINE INNODB'Praveenkumar Hulakund2013-10-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AND 'KILL SESSION' LEAD TO CRASH Analysis: -------- This situation occurs when the connection executes query "show engine innodb status" and this connection is killed by executing statement "kill <con>" by another connection. In function "innodb_show_status", function "stat_print" is called to print the status but return value of function is not checked. After killing connection, if write to connection fails then error is returned and same is set in Diagnostic area. Since FALSE is returned from "innodb_show_status" now, assert to check no error is set in function "set_eof_status" (called from my_eof) is failing. Fix: ---- Changed code to check return value of function "stat_print" in "innodb_show_status".
| | | | * Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-191-1/+1
| | | | |
| | | | * weave merge from mysql-5.1 to mysql-5.5Georgi Kodinov2011-02-081-1/+1
| | | | |\ | | | | | | | | | | | | | | | | | | Resolved an innodb conflict thanks to vasil.
| | | | | * Updating header copyright/README in source for 2011Karen Langford2011-01-251-1/+1
| | | | | |
| | | | * | Auto-merge mysql-5.1 -> mysql-5.5 for bug#58887.Dmitry Shulga2011-01-111-11/+1
| | | | |\ \ | | | | | |/