summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* Manual merge from mysql-next-mr.Alexander Nozdrin2009-12-1727-379/+640
|\ | | | | | | | | | | Conflicts: - mysys/charset.c - mysys/my_thr_init.c
| * Merge mysql-next-mr (revno 2939) --> mysql-next-mr-marcMarc Alff2009-12-172-9/+64
| |\
| * \ Merge mysql-next-mr (revno 2942) --> mysql-next-mr-marcMarc Alff2009-12-164-24/+14
| |\ \
| * \ \ Merge mysql-next-mr (revno 2936) --> mysql-next-mr-marcMarc Alff2009-12-112-5/+12
| |\ \ \
| * | | | WL#2360 Performance schemaMarc Alff2009-12-0927-376/+637
| | | | | | | | | | | | | | | | | | | | | | | | | Part III: mysys instrumentation
* | | | | Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-12-171-1/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - storage/myisam/mi_packrec.c
| * \ \ \ \ Automerge from mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2009-12-171-1/+5
| |\ \ \ \ \
| | * \ \ \ \ merge mysql-5.0-bugteam to mysql-5.1-bugteamSatya B2009-12-171-1/+5
| | |\ \ \ \ \
| | | * | | | | Fix for Bug#37408 - Compressed MyISAM files should not require/use mmap()Satya B2009-12-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compressed myisam files are opened, they are always memory mapped sometimes causing memory swapping problems. When we mmap the myisam compressed tables of size greater than the memory available, the kswapd0 process utilization is very high consuming 30-40% of the cpu. This happens only with linux kernels older than 2.6.9 With newer linux kernels, we don't have this problem of high cpu consumption and this option may not be required. The option 'myisam_mmap_size' is added to limit the amount of memory used for memory mapping of myisam files. This option is not dynamic. The default value on 32 bit system is 4294967295 bytes and on 64 bit system it is 18446744073709547520 bytes. Note: Testcase only tests the option variable. The actual bug has be to tested manually. include/my_global.h: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() define SIZE_T_MAX include/myisam.h: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() declare 'myisam_mmap_size' and 'myisam_mmap_used' variables and the mutex THR_LOCK_myisam_mmap myisam/mi_packrec.c: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() add 'myisam_mmap_size' option which limits the memory available to mmap of myisam files myisam/mi_static.c: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() declare 'myisam_mmap_size' and 'myisam_mmap_used' variables and the mutex THR_LOCK_myisam_mmap myisam/myisamdef.h: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() move MEMMAP_EXTRA_MARGIN to myisam.h so that it can be used in mysqld.cc mysql-test/r/variables.result: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() Testcase for BUG#37408 to test the myisam_mmap_size option mysql-test/t/variables.test: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() Testcase for BUG#37408 to test the myisam_mmap_size option mysys/my_thr_init.c: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() intialize the lock THR_LOCK_myisam_mmap sql/mysqld.cc: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() add the 'myisam_mmap_size' option sql/set_var.cc: Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap() add the 'myisam_mmap_size' to the SHOW VARIABLES list
* | | | | | | | Auto-merge from mysql-next-mr-summit0.3.Alexander Nozdrin2009-12-162-9/+64
|\ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ | |/| | | | | |
| * | | | | | | Merge to latest mysql-next-mrMikael Ronstrom2009-12-164-24/+14
| |\ \ \ \ \ \ \ | | | |_|_|_|_|/ | | |/| | | | |
| * | | | | | | MergeMikael Ronstrom2009-12-146-20/+120
| |\ \ \ \ \ \ \ | | | |_|_|_|_|/ | | |/| | | | |
| * | | | | | | Merged in WL#5105Mikael Ronstrom2009-11-271-0/+24
| |\ \ \ \ \ \ \
| | * | | | | | | WL#5105, review fixMikael Ronstrom2009-11-201-5/+5
| | | | | | | | |
| | * | | | | | | WL#5105, Optimize ptr_cmp on Solaris by using memcmp instead of native ptr_cmpMikael Ronstrom2009-11-201-0/+24
| | |\ \ \ \ \ \ \
| | | * | | | | | | WL#5105, ptr_cmp optimised on Solaris, more efficient to use memcmp on ↵Mikael Ronstrom2009-09-231-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solaris than native impl.
| * | | | | | | | | Merge WL#5137 to mysql-next-mrMikael Ronstrom2009-11-271-9/+40
| |\ \ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ WL#5137, Remove hash calculation from LOCK_open in open_tableMikael Ronstrom2009-11-201-9/+40
| | |\ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / | | |/| | | | | | | |
| | | * | | | | | | | Review comments for LOCK_open patchMikael Ronstrom2009-11-101-10/+16
| | | | | | | | | | |
| | | * | | | | | | | A minor change to MySQL's hash where calculation of hash can be done ↵Mikael Ronstrom2009-10-091-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | separately to avoid doing it under contended mutex locks
* | | | | | | | | | | Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-12-164-55/+79
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / / |/| | | | | | / / / / | | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - include/my_no_pthread.h - mysql-test/r/sp-ucs2.result - sql/log.cc - sql/sql_acl.cc - sql/sql_yacc.yy
| * | | | | | | | | Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.Alexey Kopytov2009-12-163-54/+59
| |\ \ \ \ \ \ \ \ \ | | | |_|_|_|_|/ / / | | |/| | | | | | |
| | * | | | | | | | Bug#49134 5.1 server segfaults with 2byte collation fileAlexander Barkov2009-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: add_collation did not check that cs->number is smaller than the number of elements in the array all_charsets[], so server could crash when loading an Index.xml file with a collation ID greater the number of elements (for example when downgrading from 5.5). Fix: adding a condition to check that cs->number is not out of valid range.
| | * | | | | | | | Bug #45058 init_available_charsets uses double checked lockingStaale Smedseng2009-12-123-53/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As documented in the bug report, the double checked locking pattern has inherent issues, and cannot guarantee correct initialization. This patch replaces the logic in init_available_charsets() with the use of pthread_once(3). A wrapper function, my_pthread_once(), is introduced and is used in lieu of direct calls to init_available_charsets(). Related defines MY_PTHREAD_ONCE_* are also introduced. For the Windows platform, the implementation in lp:sysbench is ported. For single-thread use, a simple define calls the function and sets the pthread_once control variable. Charset initialization is modified to use my_pthread_once(). include/my_no_pthread.h: Dummy my_pthread_once() for single thread use. include/my_pthread.h: Declaration for new function my_pthread_once(). mysys/charset.c: Logic in init_available_charsets() is simplified. Using my_pthread_once() for all calls to this func. mysys/my_winthread.c: Windows implementation of my_pthread_once().
| * | | | | | | | | Auto-merge from mysql-trunk.Alexander Nozdrin2009-12-161-10/+0
| |\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.Alexey Kopytov2009-12-111-1/+20
| |\ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / | | |/| | | | | | | |
| | * | | | | | | | | Merge from 5.0Staale Smedseng2009-12-061-1/+20
| | |\ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|/ / | | | |/| | | | | | |
* | | | | | | | | | | Auto-merge from mysql-trunk.Alexander Nozdrin2009-12-161-10/+0
|\ \ \ \ \ \ \ \ \ \ \ | | |_|_|/ / / / / / / | |/| | | | | | | | |
| * | | | | | | | | | Remove .cvsignore files (attempt #2).Alexander Nozdrin2009-12-161-10/+0
| |/ / / / / / / / /
* | | | | | | | | | Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-12-123-14/+14
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / | | | | | | | | / / | |_|_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - extra/comp_err.c - mysql-test/collections/default.experimental - mysql-test/r/archive.result - mysql-test/r/select.result - mysql-test/suite/binlog/r/binlog_unsafe.result - mysql-test/suite/binlog/t/binlog_unsafe.test - mysql-test/suite/rpl/t/disabled.def - mysql-test/t/archive.test - mysql-test/t/select.test - sql/item.cc - sql/item.h - sql/item_timefunc.cc - sql/sql_base.cc - sql/sql_delete.cc - sql/sql_load.cc - sql/sql_partition.cc - sql/sql_table.cc - storage/innobase/handler/ha_innodb.cc - vio/vio.c
| * | | | | | | | Manual merge from mysql-trunk.Alexander Nozdrin2009-12-1141-563/+1560
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - client/mysqltest.cc - mysql-test/collections/default.experimental - mysql-test/suite/rpl/t/disabled.def - sql/mysqld.cc - sql/opt_range.cc - sql/sp.cc - sql/sql_acl.cc - sql/sql_partition.cc - sql/sql_table.cc
| * \ \ \ \ \ \ \ \ Automerge of mysql-5.1-bugteam into mysql-trunk-merge.Alexey Kopytov2009-12-011-2/+2
| |\ \ \ \ \ \ \ \ \ | | | |/ / / / / / / | | |/| | | | | | |
| | * | | | | | | | Move DBG_* macros to after the variable declaration section in aKent Boortz2009-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | block, might expand to function calls (Bug#48331)
| * | | | | | | | | Manual merge from the mysql-5.1-bugteam.Alexey Kopytov2009-11-241-1/+1
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / /
| | * | | | | | | | Additional fix for bug #45613: handle failures from my_hash_insertGeorgi Kodinov2009-11-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing for presence of stuff in a hash inside the function that's filling in the hash creates chicken-and-egg type of problems. This results in test suite failures in mysql-pe in debug mode and adds bad initialization dependency in 5.1. Fixed by removing the debug code.
| | * | | | | | | | mergeKristofer Pettersson2009-11-201-0/+1
| | |\ \ \ \ \ \ \ \
| | | * | | | | | | | Bug#45613 handle failures from my_hash_insertKristofer Pettersson2009-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all my_hash_insert() calls are checked for return value. This patch adds appropriate checks and failure responses where needed. mysys/hash.c: * Debug hook for testing failures in my_hash_insert()
| | * | | | | | | | | mergeGeorgi Kodinov2009-11-201-1/+1
| | |\ \ \ \ \ \ \ \ \
| | | * | | | | | | | | Use C comments in C codeunknown2009-11-051-1/+1
| | | | | | | | | | | |
| * | | | | | | | | | | Manual merge from the mysql-5.1-bugteam.Alexey Kopytov2009-11-241-11/+11
| |\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / /
| | * | | | | | | | | | Bug#46043 mysqld --skip-innodb does not skip InnoDBKristofer Pettersson2009-11-091-11/+11
| | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The prefix --skip- didn't work on 64 bit big endian machines because of how the value pointer was casted. mysys/my_getopt.c: * Use the interface! The value pointer must correspond to the type mask or it will break on big endian platforms.
* | | | | | | | | | | Auto-merge from mysql-next-mr.Alexander Nozdrin2009-12-101-3/+45
|\ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|/ | |/| | | | | | | | |
| * | | | | | | | | | WL#2360 Performance schemaMarc Alff2009-12-041-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part II, engines instrumentation
* | | | | | | | | | | Bug#47756 Setting 2byte collation ID with 'set names' crashes the serverAlexander Barkov2009-12-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is not actually related to 2byte collation IDs. The same crash happens if you change the collation ID in mysql-test/str_data/Index.xml to a value smaller than 256. Crash happened in SQL parser, because the "ident_map" and "state_map" arrays were not initialized in loadable utf8 collations. Fix: adding proper initialization of the "ident_map" and "state_map" members for loadable utf8 collations.
* | | | | | | | | | | Auto-merge from mysql-next-mr.Alexander Nozdrin2009-12-042-3/+31
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / /
| * | | | | | | | | | Merge mysql-next-mr (revno 2927) --> mysql-next-mr-marcMarc Alff2009-12-021-9/+32
| |\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | WL#2360 Performance schemaMarc Alff2009-11-302-3/+31
| | |_|_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part 1: Instrumentation interface
* | | | | | | | | | | Manual merge from mysql-next-mr.Alexander Nozdrin2009-12-021-9/+32
|\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - sql/sql_yacc.yy
| * | | | | | | | | | Manual resolving for the following filesAndrei Elkin2009-12-011-9/+32
| |\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Text conflict in mysql-test/collections/default.experimental Text conflict in mysql-test/r/show_check.result Text conflict in mysql-test/r/sp-code.result Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result Text conflict in mysql-test/suite/rpl/t/disabled.def Text conflict in mysql-test/t/show_check.test Text conflict in mysys/my_delete.c Text conflict in sql/item.h Text conflict in sql/item_cmpfunc.h Text conflict in sql/log.cc Text conflict in sql/mysqld.cc Text conflict in sql/repl_failsafe.cc Text conflict in sql/slave.cc Text conflict in sql/sql_parse.cc Text conflict in sql/sql_table.cc Text conflict in sql/sql_yacc.yy Text conflict in storage/myisam/ha_myisam.cc Corrected results for stm_auto_increment_bug33029.reject 2009-12-01 20:01:49.000000000 +0300 <andrei> @@ -42,9 +42,6 @@ <andrei> RETURN i; <andrei> END// <andrei> CALL p1(); <andrei> -Warnings: <andrei> -Note 1592 Statement may not be safe to log in statement format. <andrei> -Note 1592 Statement may not be safe to log in statement format. There should be indeed no Note present because there is in fact autoincrement top-level query in sp() that triggers inserting in yet another auto-inc table. (todo: alert DaoGang to improve the test).
| | * | | | | | | | | merging from 5.1 to rep+2 starting at gca(5.1, next-mr) == ↵Andrei Elkin2009-11-302-2/+7
| | |\ \ \ \ \ \ \ \ \ | | | | |/ / / / / / / | | | |/| | | | | | | | | | | | | | | | | | build@mysql.com-20091104182209-iui387z35159aoyw