summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | |
* | | | Merge 10.0.14 into 10.1Sergei Golubchik2014-10-157-119/+155
|\ \ \ \ | |/ / /
| * | | 5.5 mergeSergei Golubchik2014-09-232-557/+0
| |\ \ \ | | |/ /
| * | | MDEV-6274 Collation usage statisticsAlexander Barkov2014-08-111-1/+50
| | | | | | | | | | | | | | | | | | | | Adding collation usage statistics into the feedback plugin I_S table.
| * | | 5.5.39 mergeSergei Golubchik2014-08-072-3/+9
| |\ \ \ | | |/ /
| | * | mysql-5.5.39 mergeSergei Golubchik2014-08-022-3/+9
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | ~40% bugfixed(*) applied ~40$ bugfixed reverted (incorrect or we're not buggy) ~20% bugfixed applied, despite us being not buggy (*) only changes in the server code, e.g. not cmakefiles
| | | * Bug#18207212 : FILE NAME IS NOT ESCAPED IN BINLOG FOR LOAD DATA INFILE STATEMENTNeeraj Bisht2014-05-151-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Load_log_event::print_query() function does not put escape character in file name for "LOAD DATA INFILE" statement. Analysis: When we have "'" in our file name for "LOAD DATA INFILE" statement, Load_log_event::print_query() function does not put escape character in our file name. This one result that when we show binary-log, we get file name without escape character. Solution: To put escape character when we have "'" in file name, for this instead of using simple memcpy() to put file-name, we will use pretty_print_str().
| | | * Backport from trunk:Tor Didriksen2014-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#18187290 ISSUE WITH BUILDING MYSQL USING CMAKE 2.8.12 We want to upgrade to VS2013 on Windows. In order to do this, we need to upgrade to cmake 2.8.12 This has introduced some incompatibilities for .pdb files, and "make install" no longer works. To reproduce: cmake --build . --target package --config debug The fix: Rather than installing .pdb files for static libraries, we use the /Z7 flag to store symbolic debugging information in the .obj files.
| * | | MDEV-6485 Hard-coded paths in the source cannot be opt-outSergei Golubchik2014-08-031-6/+5
| | | | | | | | | | | | | | | | | | | | when looking for my.cnf files: if DEFAULT_SYSCONFDIR (or INSTALL_SYSCONFDIR) is specified (for rpms it always is), use that instead of hardcoded /etc path.
| * | | Fixed problem with very slow shutdown when using 100,000 MyISAM tables with ↵Michael Widenius2014-07-191-65/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | delay_key_write Reason for the problem was that the hash of changed files in the key cache was too small (was 128). Fixed by making the hash size larger and changeable. - Introduced key-cache-file-hash-size (default 512) for MyISAM and aria_pagecache_file_hash_size (default 512) for Aria. - Added new status variable "Feature_delay_key_write" which counts number of tables opened that are using delay_key_write mysql-test/r/features.result: Added test of Feature_delay_key_write mysql-test/r/key_cache.result: Updated tests as the number of blocks has changed mysql-test/r/mysqld--help.result: Updated result mysql-test/suite/maria/maria3.result: Updated result mysql-test/suite/sys_vars/r/key_cache_file_hash_size_basic.result: Test new variable mysql-test/suite/sys_vars/t/aria_pagecache_file_hash_size_basic.test: Test new variable mysql-test/suite/sys_vars/t/key_cache_file_hash_size_basic.test: Test new variable mysql-test/t/features.test: Added test of Feature_delay_key_write mysql-test/t/key_cache.test: Updated tests as the number of blocks has changed mysys/mf_keycache.c: Made CHANGED_BLOCKS_HASH dynamic sql/handler.cc: Updated call to init_key_cache() sql/mysqld.cc: Added "Feature_delay_key_write" Added support for key-cache-file-hash-size sql/mysqld.h: Added support for key-cache-file-hash-size sql/sql_class.h: Added feature_files_opened_with_delayed_keys sql/sys_vars.cc: Added key_cache_file_hash_size storage/maria/ha_maria.cc: Added pagecache_file_hash_size Added counting of files with delay_key_write storage/maria/ma_checkpoint.c: Fixed compiler warning storage/maria/ma_pagecache.c: Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable storage/maria/ma_pagecache.h: Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable storage/maria/ma_rt_test.c: Updated parameters for init_pagecache() storage/maria/ma_test1.c: Updated parameters for init_pagecache() storage/maria/ma_test2.c: Updated parameters for init_pagecache() storage/maria/ma_test3.c: Updated parameters for init_pagecache() storage/maria/maria_chk.c: Updated parameters for init_pagecache() storage/maria/maria_ftdump.c: Updated parameters for init_pagecache() storage/maria/maria_pack.c: Updated parameters for init_pagecache() storage/maria/maria_read_log.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_consist.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_rwconsist.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_rwconsist2.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_single.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_multithread-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_noflush-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_nologs-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_purge-t.c: Updated parameters for init_pagecache() storage/myisam/ha_myisam.cc: Added counting of files with delay_key_write storage/myisam/mi_check.c: Updated call to init_key_cache() storage/myisam/mi_test1.c: Updated call to init_key_cache() storage/myisam/mi_test2.c: Updated call to init_key_cache() storage/myisam/mi_test3.c: Updated call to init_key_cache() storage/myisam/mi_test_all.sh: Fixed broken test storage/myisam/myisam_ftdump.c: Updated call to init_key_cache() storage/myisam/myisamchk.c: Updated call to init_key_cache() storage/myisam/myisamlog.c: Updated call to init_key_cache()
| * | | MDEV-6039 - WebScaleSQL patchesSergey Vojtovich2014-06-181-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop spawning dummy threads on client library initialization Let's revert the fix for Bug#24507. To quote Monty from 2006: "After 1/2 a year, when all glibc versions are updated, we can delete this code." Note: The upstream glibc bug was fixed in 2006.
| * | | MDEV-6314 - Compile/run MariaDB with ASanSergey Vojtovich2014-06-101-1/+1
| | | | | | | | | | | | | | | | Fixed some compilation errors/warnings with ASan.