summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert "MDEV-9293 Connector/C integration"Vladislav Vaintroub2016-08-191-1/+1
| | | | This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
* MDEV-9293 Connector/C integrationVladislav Vaintroub2016-08-191-1/+1
|
* Merge branch '10.1' into 10.2Sergei Golubchik2016-06-301-9/+12
|\
| * MDEV-10161: wsrep_sync_wait not enabled when set to 1 in config fileNirbhay Choubey2016-06-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Since wsrep_sync_wait & wsrep_causal_reads variables are related, they are always kept in sync whenever one of them changes. Same is tried on server start, where wsrep_sync_wait get updated based on wsrep_causal_reads' value. But, since wsrep_causal_reads is OFF by default, wsrep_sync_wait's value gets modified and loses its WSREP_SYNC_WAIT_BEFORE_READ bit. Fixed by syncing wsrep_sync_wait & wsrep_causal_reads values individually on server start in mysqld_get_one_option() based on command line arguments used.
| * MDEV-6699 : wsrep_node_name not automatically set to hostnameNirbhay Choubey2016-06-271-8/+0
| | | | | | | | | | | | Fixed by using hostname (glob_hostname) as default value for wsrep_node_name system variable. Added a test case.
| * Merge branch '10.0' into 10.1Sergei Golubchik2016-05-041-2/+3
| |\
| | * Fix crash due to heap corruption in main.shmmariadb-10.0.25Vladislav Vaintroub2016-04-281-1/+1
| | |
| | * Merge branch '5.5' into 10.0Sergei Golubchik2016-04-261-1/+2
| | |\
| | | * MDEV-9929 MariaDB segfaults on command "mysqld --version" with ignore-db-dir ↵Sergei Golubchik2016-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | option on /etc/my.cnf don't put command-line arguments into opt_ignore_db_dirs - it is supposed to contain a malloc()'ed accumulated list of all ignored dirs
| | | * MDEV-9493 --tc-heuristic-recover option values off by oneSergei Golubchik2016-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | fix typelib to match defines: #define TC_HEURISTIC_RECOVER_COMMIT 1 #define TC_HEURISTIC_RECOVER_ROLLBACK 2
* | | | various cleanupsMichael Widenius2016-06-301-2/+0
| | | |
* | | | Merge pull request #181 from ottok/ok-debpkg-10.2Sergey Vojtovich2016-06-141-1/+1
|\ \ \ \ | | | | | | | | | | General spell fixing in comments and strings
| * | | | General spell fixing in comments and stringsOtto Kekäläinen2016-06-081-1/+1
| | | | |
* | | | | MDEV-10098 main.create_delayed fails with ps-protocol: assertion ↵Sergei Golubchik2016-06-131-8/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `global_status_var.global_memory_used >= 0' failed Remove the assert. We cannot verify that global_memory_used value is valid (>=0) because some of updates are cached in individual THD's (e.g. THD1 can have +300 cached, while the other THD2 can have -300 cached. If the second THD exists before the first one, global_memory_used will be -300 temporarily). Instead add the assert just before the exit, when all THDs been already destroyed.
* | | | stop binlog background thread together with othersbb-fast-connectSergei Golubchik2016-06-041-0/+1
| | | | | | | | | | | | | | | | that fixes many rpl tests failures
* | | | cleanup: thread_countSergei Golubchik2016-06-041-24/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | move thread_count handling into THD: * increment thread_count in THD constructor * decrement thread_count in THD destructor * never modify thread_count directly!
* | | | decrement thead_count *after* THD is destroyedSergei Golubchik2016-06-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | because thread_count means just that: number of THDs and shutdown code looks at it to know when to free shared data structures that THD uses. This fixes random crashes in ~THD on shutdown
* | | | Reuse THD for new user connectionsMonty2016-06-041-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | | MDEV-9154 : Remove workarounds (mainly dynamic function loading)Vladislav Vaintroub2016-06-011-21/+3
| | | | | | | | | | | | | | | | for running obsolete versions of Windows
* | | | MDEV-6368: assertion xid_seqno > trx_sys_cur_xid_seqnoNirbhay Choubey2016-05-311-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Validate the specified wsrep_start_position value by also checking the return status of wsrep->sst_received. This also ensures that changes in wsrep_start_position is not allowed when the node is not in JOINING state. - Do not allow decrease in seqno within same UUID. - The initial checkpoint in SEs should be [0...:-1].
* | | | Final fixes for Memory_usedMonty2016-04-281-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change some static variables to dynamic to ensure that we don't do any memory allocations before server starts or stops - Print more memory information on SIGHUP. Fixed output. - Write out if memory was lost if run with --debug-at-exit - Fixed wrong #ifdef in sql_cache.cc
* | | | Merge commit 'd5822a3ad0657040114cdc185c6387b9eb3a12b2' into 10.2Monty2016-04-281-40/+60
|\ \ \ \ | |/ / /
| * | | Moved mysqld_server_initialized to before galera is initialized.Monty2016-04-281-3/+3
| | | |
| * | | Removed some not needed when doing delete thd, which caused warnings aboutMonty2016-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | wrong mutex usage from safe_mutex. Ensure that LOCK_status is always taken before LOCK_thread_count
| * | | Fixed wrong counting of global Memory_usedMonty2016-04-281-35/+50
| | | |
* | | | CleanupsMonty2016-04-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoid some realloc() during startup - Ensure that file_key_management_plugin frees it's memory early, even if it's linked statically. - Fixed compiler warnings from unused variables and missing destructors - Fixed wrong indentation
* | | | Merge branch '10.2' into bb-10.2-mdev9543Sergei Petrunia2016-04-071-3/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | - Make Window Functions errors use the MariaDB's extra error range. - Fix a trivial bug in check_error_mesg
| * | | | Added new range of MariaDB error messages, starting from 3000Monty2016-04-051-3/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by splitting variables.errmsg and locale.errmsg to variables.errmsg_extra and locale.errmsg_extra The ER() macros in unireg.h now looks more complex than before, but this isn't critical as most usage of them are with constants and the compiler will remove most of the test code.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-03-231-8/+0
|\ \ \ \ | |/ / /
| * | | MDEV-6058 MySQL Bug #11766693: LOG-SLOW-ADMIN-STATEMENTS ANDAlexey Botchkov2016-03-221-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOG-SLOW-SLAVE-STATEMENTS NOT DISPLAYED. These parameters were moved from the command line options to the system variables section. Treatment of the opt_log_slow_slave_statements changed to let the dynamic change of the variable.
* | | | thread cache: cleanup DBUG state when caching a threadSergei Golubchik2016-03-231-0/+5
| | | | | | | | | | | | | | | | this fixes 40 failures in mysql-test
* | | | Increase value of thread_cache_size to 32Monty2016-03-221-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added 5 minute timeout before automaticlally removing threads from thread cache. This solves a problem with jemalloc, which is slow with a small thread cache and also makes thread_cache big enough that most users doesn't have to touch it
* | | | Removed TABLE->sort to make it possible to have multiple active calls toMonty2016-03-221-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesort and init_read_record() for the same table. This will simplify code for WINDOW FUNCTIONS (MDEV-6115) - Filesort_info renamed to SORT_INFO and moved to filesort.h - filesort now returns SORT_INFO - init_read_record() now takes a SORT_INFO parameter. - unique declaration is moved to uniques.h - subselect caching of buffers is now more explicit than before - filesort_buffer is now reusable even if rec_length has changed. - filsort_free_buffers() and free_io_cache() calls are removed - Remove one malloc() when using get_addon_fields() Other things: - Added --debug-assert-on-not-freed-memory option to make it easier to debug some not-freed-memory issues.
* | | | MDEV-9058: protocol: COM_MULTI commandOleksandr Byelkin2016-03-221-1/+1
| | | | | | | | | | | | | | | | Fix of status variable name and order.
* | | | MDEV-9058: protocol: COM_MULTI command (part 1)Oleksandr Byelkin2016-03-181-1/+2
| | | | | | | | | | | | | | | | Adding a command from the end of avaliable commands numering space (254)
* | | | fix openssl memory leak in main threadVladislav Vaintroub2016-03-091-0/+3
| | | |
* | | | [MDEV-7978] Updated syntax for SHOW CREATE USERVicențiu Ciorbaru2016-03-081-0/+1
| | | |
* | | | [MDEV-7978] Update grammar for new syntaxVicențiu Ciorbaru2016-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | Extend the syntax accepted by the grammar to account for the new create user and alter user syntax.
* | | | Fixed change_user and func_misc in embeddedSergey Vojtovich2016-02-261-2/+2
| | | | | | | | | | | | | | | | First thread was getting id 0, while it is intended to get id 1.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-02-251-16/+11
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-02-231-16/+11
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.0Sergei Golubchik2016-02-151-15/+10
| | |\ \ | | | |/
| | | * MDEV-9314 fatal build error: viosslfactories.c:58:5: error: dereferencing ↵Sergei Golubchik2016-02-061-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | pointer to incomplete type ‘DH {aka struct dh_st} fixes for openssl that was built with -DOPENSSL_NO_DEPRECATED
| | | * If one compiled with too long MYSQL_SERVER_SUFFIX this caused a memoryMonty2016-01-291-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | overrun that caused some test to fail. Fixed by ensuring we don't overwrite "server_version"
| | * | MDEV-8427 main.connect fails on ppc64el in 10.0 as of 1a8cf15dSergei Golubchik2016-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Followup fix for bug#35074: update the second location where max_used_connections is calculated (to be like the first one).
* | | | Fix compilation10.2-sslVladislav Vaintroub2016-02-101-6/+6
| | | |
* | | | MDEV-6150 Speed up connection speed by moving creation of THD to new threadMonty2016-02-071-228/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 branch '10.1' into 10.2Monty2016-02-061-48/+40
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: VERSION cmake/plugin.cmake config.h.cmake configure.cmake plugin/server_audit/server_audit.c sql/sql_yacc.yy
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-01-251-2/+37
| |\ \ \ | | |/ /
| | * | Fixed bug in semi_sync replication tests.Monty2016-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that wait_for_slave_io_to_start reported that the io thread was ready, when it was still initializing. This caused test suite to continue too early, for example before the semi sync plugin was properly enabled. Fixed by introducing a new internal stage: "Preparing". Slave_IO_Running is now set to "Yes" only when all initializing is done and the IO thread is ready to read things from the master. The only test affected by this change is rpl_flsh_tbls, which got stuck in the preparing phase while trying to read the GTID position from a table. Fixed by having this test waiting for Preparing instead of Yes.