summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.0-galera' into 10.1Nirbhay Choubey2015-07-143-6/+8
|
* - Renaming variables so that they don't shadow others (After this patch one ↵Monty2015-07-065-18/+13
| | | | | | | | | | | | | | | | | | | | | | | can compile with -Wshadow and get much fewer warnings) - Changed ER(ER_...) to ER_THD(thd, ER_...) when thd was known or if there was many calls to current_thd in the same function. - Changed ER(ER_..) to ER_THD_OR_DEFAULT(current_thd, ER...) in some places where current_thd is not necessary defined. - Removing calls to current_thd when we have access to thd Part of this is optimization (not calling current_thd when not needed), but part is bug fixing for error condition when current_thd is not defined (For example on startup and end of mysqld) Notable renames done as otherwise a lot of functions would have to be changed: - In JOIN structure renamed: examined_rows -> join_examined_rows record_count -> join_record_count - In Field, renamed new_field() to make_new_field() Other things: - Added DBUG_ASSERT(thd == tmp_thd) in Item_singlerow_subselect() just to be safe. - Removed old 'tab' prefix in JOIN_TAB::save_explain_data() and use members directly - Added 'thd' as argument to a few functions to avoid calling current_thd.
* my_aes_get_size()Sergei Golubchik2015-06-021-1/+1
| | | | | return unsigned, not signed. return a value large enough for GCM
* MDEV-8126 encryption for temp filesSergei Golubchik2015-06-023-4/+82
| | | | IO_CACHE tempfiles encryption
* always use my_b_pread() instead of mysql_file_pread()Sergei Golubchik2015-06-021-0/+6
| | | | when working with IO_CACHE's, don't access IO_CACHE::file directly
* my_b_fill, inline my_b_* functions instead of hairy macrosSergei Golubchik2015-06-021-55/+0
|
* misc IO_CACHE cleanupsSergei Golubchik2015-06-022-185/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | * remove unused (and not implemented) WRITE_NET type * remove cast in my_b_write() macro. my_b_* macros are function-like, casts are responsibility of the caller * replace hackish _my_b_write(info,0,0) with the explicit my_b_flush_io_cache() in my_b_write_byte() * remove unused my_b_fill_cache() * replace pbool -> my_bool * make internal IO_CACHE functions static * reformat comments, correct typos, remove obsolete comments (ISAM) * assert valid cache type in init_functions() * use IO_ROUND_DN() macro where appropriate * remove unused DBUG_EXECUTE_IF in _my_b_cache_write() * remove unnecessary __attribute__((unused)) * fix goto error in parse_file.cc * remove redundant reinit_io_cache() in uniques.cc * don't do reinit_io_cache() if the cache was not initialized in ma_check.c * extract duplicate functionality from various _my_b_*_read functions into a common wrapper. Same for _my_b_*_write * create _my_b_cache_write_r instead of having if's in _my_b_cache_write (similar to existing _my_b_cache_read and _my_b_cache_read_r) * don't call mysql_file_write() from my_b_flush_io_cache(), call info->write_function() instead
* cleanup: LOAD DATA replication support in IO_CACHESergei Golubchik2015-06-021-13/+1
| | | | | | | | | | | | | | | | remove some 14-year old code that added support for LOAD DATA replication to IO_CACHE: * three callbacks, of which only two were actually used and that were only needed for LOAD DATA replication but were tested in every IO_CACHE instance * an additional opaque void * argument in IO_CACHE, also only used for LOAD DATA replication, but present everywhere * the code to close IO_CACHE prematurely in LOAD DATA to have these callbacks called in the correct order and a long comment explaining what will happen if IO_CACHE is not closed prematurely * a variable to track whether IO_CACHE was closed prematurely (to avoid double-closing it)
* Merge tag 'mariadb-10.0.19' into 10.1Sergei Golubchik2015-06-012-78/+9
|\
| * remove unused file and unnecessary #includeSergei Golubchik2015-05-031-68/+0
| |
* | small cleanupSergei Golubchik2015-04-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | * my_aes.h doesn't compile without my_global.h * typo in a comment * redundant condition * if encryption plugin fails, there's no encryption_key_manager at plugin deinit time * encryption plugin tests must run when plugin.so is present, not when a plugin is active (otherwise the test will be skipped when plugin fails to initialize).
* | MDEV-6650 - LINT_INIT emits code in non-debug buildsSergey Vojtovich2015-03-161-2/+1
| | | | | | | | | | Replaced all references to LINT_INIT with UNINIT_VAR and LINT_INIT_STRUCT. Removed LINT_INIT macro.
* | Merge branch '10.0' into 10.1Sergei Golubchik2015-03-071-1/+1
|\ \ | |/
| * MDEV-7530 !includedir reads files in random orderSergei Golubchik2015-02-251-1/+1
| |
* | Replaced lf-hash element_size hack with initializer function.Sergey Vojtovich2015-03-042-24/+26
| |
* | MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"Sergey Vojtovich2015-03-041-7/+13
| | | | | | | | Extended lf-hash implementation to accept user defined hash function.
* | MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"Sergey Vojtovich2015-03-041-1/+10
| | | | | | | | | | Added initializer callback to lf-hash. Needed to initialize properly non-POD types.
* | MDEV-6479 stack traces in 10.1Sergei Golubchik2015-02-282-4/+18
| | | | | | | | | | | | Take into account that PIE binaries are loaded at some offset, so addresses cannot be directly resolved with addr2line. Find this offset and subtract it before resolving an address.
* | encryption keys serviceSergei Golubchik2015-02-101-1/+0
| |
* | encryption key management plugin apiSergei Golubchik2015-02-101-7/+0
| |
* | Push for testing of encryptionMonty2015-02-103-4/+11
| |
* | --getopt-prefix-matching command-line optionSergei Golubchik2015-02-101-2/+21
| |
* | small cleanup of my_default.cSergei Golubchik2015-02-101-3/+3
| |
* | MDEV-7177 - Server hangs on shutdown after InnoDB error (main.plugin_loaderrSergey Vojtovich2015-02-051-39/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fails in buildbot) There was a race condition in timer functionality of query timeouts. Race was as following: main thread: init_thr_timers() timer handler thread: my_thread_init() main thread: end_thr_timer()/timer_thread_state= ABORTING timer handler thread: timer_thread_state= RUNNING, continue normal op main thread: waits indefinitely for timer handler thread to go down The original idea of the fix is to set RUNNING state in main thread, before starting timer handler thread. But it didn't survive further cleanups: - removed "timer_thread_state" and used "thr_timer_inited" for this purpose - removed unused "timer_thread_running" - removed code responisble for "timer handler thread" shutdown synchronization, use pthread_join() instead.
* | compiler warningsSergei Golubchik2015-01-311-1/+1
| |
* | Merge branch '10.0' into merge-wipSergei Golubchik2015-01-314-60/+55
|\ \ | |/
| * 5.5 mergeSergei Golubchik2015-01-213-35/+18
| |\
| | * Fixed a couple of compiler warnings.Sergey Vojtovich2014-12-191-5/+8
| | |
| | * mysql-5.5.41 mergeSergei Golubchik2014-12-191-23/+1
| | |\
| | | * Bug #18808072 MYSQLBINLOG USES LOCALTIME() TO PRINT EVENTS, CAUSES KERNEL ↵Venkatesh Duggirala2014-10-081-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MUTEX CONTENTION Problem: For every event read, mysqlbinlog calls localtime() which in turn calls stat(/etc/localtime) which is causing kernel mutex contention. Analysis and Fix: localtime() calls stat(/etc/localtime) for every instance of the call where as localtime_r() the reentrant version was optimized to store the read only tz internal structure. Hence it will not call stat(/etc/localtime). It will call only once at the beginning. The mysql server is calling localtime_r() and mysqlbinlog tool is one place where we are still using localtime(). Once the process (mysqlbinlog) is started if timezone is changed it will be not picked up the the process and it will continue with the same values as the beginning of the process. This behavior is in-lined with mysql server. Also adding localtime_r() and gmtime_r() support for windows.
| | * | MDEV-4010 Deadlock on concurrent INSERT .. SELECT into an Aria table with ↵Michael Widenius2014-12-151-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statement binary logging There was a bug in lock handling when mixing INSERT ... SELECT on the same table. mysql-test/suite/maria/insert_select.result: Test case for MDEV_4010 mysql-test/suite/maria/insert_select.test: Test case for MDEV_4010 mysys/thr_lock.c: We wrongly alldoed TL_WRITE_CONCURRENT_INSERT when there was a TL_READ_NO_INSERT lock
| | * | MDEV-6939 : Dots in file names of configuration filesNirbhay Choubey2014-10-292-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use fn_ext2() (backported from 10.0) to get the file extension from last occurrence of FN_EXTCHAR ('.') instead.
| * | | rename st_my_thread_var::opt_info -> st_my_thread_var::keycache_linkSergei Golubchik2015-01-191-12/+12
| | | |
| * | | Fixed MDEV-7314: Deadlock when doing insert-select with AriaMichael Widenius2015-01-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/suite/maria/insert_select.result: Added test case mysql-test/suite/maria/insert_select.test: Added test case mysys/thr_lock.c: Ensure we don't allow concurrent_insert when a read_no_write lock is in use
| * | | Return to original stage after mysql_lock_tablesMichael Widenius2015-01-181-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stage "Filling schema table" is now properly shown in 'show processlist' mysys/mf_keycache.c: Simple cleanup with more comments sql/lock.cc: Return to original stage after mysql_lock_tables Made 'Table lock' as a true stage sql/sql_show.cc: Restore original stage after get_schema_tables_result
* | | | MDEV-7437 remove suport for "atomics" with rwlocksSergei Golubchik2015-01-134-81/+52
| | | |
* | | | MDEV-7325 make lf_hash_delete(), lf_hash_search(), and lf_hash_iterator() ↵Sergei Golubchik2015-01-121-23/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | never to return OOM if lf_hash_delete() and lf_hash_search() cannot create a new bucket because of OOM, they'll start the search from the parent bucket. As for lf_hash_iterate() - it only ever uses bucket number 0, so if it cannot create *that* bucket, the hash must surely be empty.
* | | | MDEV-7324 - Lock-free hash for table definition cacheSergey Vojtovich2014-12-281-4/+12
| | | |
* | | | lf_hash_iterate() functionSergei Golubchik2014-12-281-12/+71
| | | |
* | | | lf_hash changes, in lfind()Sergei Golubchik2014-12-281-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | casts, etc real changes are: * remove one retry, it is enough to check for DELETED after the key is read * advance 'head' pointer when we see a dummy node to have shorter retries
* | | | Cherry pick dynamic array changes from commit:Sergey Vojtovich2014-12-052-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 85fd3d901311688e18ffce92ffc78129e5625791 Author: Monty <monty@mariadb.org> Date: Fri Aug 29 14:07:43 2014 +0300 my_alloc.c - Changed 0x%lx -> %p array.c: - Static (preallocated) buffer can now be anywhere my_sys.h - Define MY_INIT_BUFFER_USED sql_delete.cc & sql_lex.cc - Use memroot when allocating classes (avoids call to current_thd) sql_explain.h: - Use preallocated buffers sql_explain.cc: - Use preallocated buffers and memroot sql_select.cc: - Use multi_alloc_root() instead of many alloc_root() - Update calls to Explain
* | | | MDEV-7004 - Merge scalability fixes from 10.0-powerSergey Vojtovich2014-12-051-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All callers of open_cached_file() use 2 characters prefix. Allocating memory for such short string is an overkill. Store it on IO_CACHE structure instead. All callers of open_cached_file() use mysql_tmpdir as dir. No need to allocate memory for it since it is constant and available till server shutdown. This reduces number of allocations from 31 to 27 per OLTP RO transaction.
* | | | cleanup: s/const CHARSET_INFO/CHARSET_INFO/Sergei Golubchik2014-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | as CHARSET_INFO is already const, using const on it is redundant and results in compiler warnings (on Windows)
* | | | cleanup: ptr_cmpSergei Golubchik2014-12-041-10/+10
| | | | | | | | | | | | | | | | | | | | 1. don't cast size_t* to int* 2. remove long obsolete register specifier
* | | | Merge branch '10.0' into bb-10.1-mergeSergei Golubchik2014-12-021-1/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .bzrignore VERSION cmake/plugin.cmake debian/dist/Debian/control debian/dist/Ubuntu/control mysql-test/r/join_outer.result mysql-test/r/join_outer_jcl6.result mysql-test/r/null.result mysql-test/r/old-mode.result mysql-test/r/union.result mysql-test/t/join_outer.test mysql-test/t/null.test mysql-test/t/old-mode.test mysql-test/t/union.test packaging/rpm-oel/mysql.spec.in scripts/mysql_config.sh sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_cond.cc sql/item_cmpfunc.h sql/lock.cc sql/sql_select.cc sql/sql_show.cc sql/sql_update.cc sql/sql_yacc.yy storage/innobase/buf/buf0flu.cc storage/innobase/fil/fil0fil.cc storage/innobase/include/srv0srv.h storage/innobase/lock/lock0lock.cc storage/tokudb/CMakeLists.txt storage/xtradb/buf/buf0flu.cc storage/xtradb/fil/fil0fil.cc storage/xtradb/include/srv0srv.h storage/xtradb/lock/lock0lock.cc support-files/mysql.spec.sh
| * | | MDEV-7116: Dynamic column hangs/segfaultsunknown2014-11-171-1/+0
| | | | | | | | | | | | | | | | Going to 'create_new_string:' caused double freeing alloc_plan (there and at 'end:').
| * | | MDEV-6939 : Dots in file names of configuration filesNirbhay Choubey2014-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use fn_ext2() to get the file extension from last occurrence of FN_EXTCHAR ('.') instead. Also made some cosmetic changes in mysys/mf_fn_ext.c.
| * | | mysys/mf_fn_ext.c: typos & indentsNirbhay Choubey2014-10-291-6/+8
| | | |
* | | | MDEV-6939 : Dots in file names of configuration filesNirbhay Choubey2014-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Use fn_ext2() to get the file extension from last occurrence of FN_EXTCHAR ('.') instead.
* | | | mysys/mf_fn_ext.c: typos & indentsNirbhay Choubey2014-10-291-6/+8
| | | |