summaryrefslogtreecommitdiff
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* Accept innodb_flush_method values previously allowed on Unix onlyVladislav Vaintroub2011-06-162-5/+11
| | | | | | | | | | map them to corresponding Windows CreateFile flags, O_DSYNC=>FILE_FLAG_WRITE_THROUGH ALL_O_DIRECT=>FILE_FLAG_NO_BUFFERING Ability to specify innodb_flush_method=O_DSYNC fixes MySQL Bug#31876 (InnoDB commit performance slow on Windows XP), by removing an extra FlushFileBuffers() call overhead.
* fix mismergeVladislav Vaintroub2011-06-122-19/+12
|
* mergeVladislav Vaintroub2011-06-121-42/+1
|\
| * Backport fix for MySQL bug #56405 :Vladislav Vaintroub2011-06-122-42/+23
| | | | | | | | use native windows condition variables and rwlocks in mysys, if Windows supports it.
* | mergeVladislav Vaintroub2011-06-123-194/+181
|\ \
| * | Fix XtraDB LPBug #714143 : Vladislav Vaintroub2011-06-124-290/+178
| |/ | | | | | | | | | | | | | | | | Windows native async io is disabled. The patch uses completion ports for asynchronous IO notification , instead of formerly used notification via event . This also removes the limit of 64 async IOs per background IO thread (this limit was forced by using WaitForMultipleObjects in previous AIO implementation)
* | mergeVladislav Vaintroub2011-06-1210-405/+502
|\ \
| * \ Backport scalability improvements for innodb on Windows , MySQL bug #52102Vladislav Vaintroub2011-06-1210-405/+502
| |\ \ | | |/ | |/| | | | (http://blogs.innodb.com/wp/2010/09/mysql-5-5-innodb-performance-improvements-on-windows/)
| | * improve Innodb locking primitives on Windows (MySQL Bug#52102, and fix ↵Vladislav Vaintroub2011-06-0420-775/+931
| |/ | | | | | | OS_FILE_LIMIT - on Windows it is about 16 millions
* | Backport Fix for Bug#24509 - 2048 file descriptor limit on windows needs ↵Vladislav Vaintroub2011-06-126-11/+78
|/ | | | | | | | | | | | | | increasing. The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open file is stored in the my_file_info struct, along with a flag for append mode (because the Windows API does not support opening files in append mode in all cases) The default max open files has been increased to 16384 and can be increased further by setting --max-open-files=<value> during the server start. Noteworthy benefit of this patch is that it removes limits from the table_cache size - allowing for more simultaneus users
* Merge with 5.1 to get in fix wrong setpriority() callMichael Widenius2011-05-261-0/+2
|\
| * Disable call to setpriority() in pbxt. This caused mysqld to run with nice ↵Michael Widenius2011-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | priority -19, which was far from optimal. mysql-test/suite/innodb/r/innodb_bug60049.result: Updated results mysql-test/suite/innodb/t/innodb_bug60049.test: Force global.innodb_fast_shutdown to 0 as test require it mysql-test/suite/innodb_plugin/t/innodb_bug60049.test: Force global.innodb_fast_shutdown to 0 as test require it storage/pbxt/src/pthread_xt.cc: Disable call to setpriority()
* | Small CMake fixes :Vladislav Vaintroub2011-05-151-0/+1
| | | | | | | | | | | | | | - add version info for the client library, dynamic plugins and some utilities - do not recompile client library sources 3 times (for mysqlclient , mysqlclient_notls and libmysql) One time is sufficient, so get rid of mysqlclient_notls, and link static client library to the shared. - remove incremental linking flag
* | mergeVladislav Vaintroub2011-05-146-1/+13
|\ \
| * | Fix bugs found by application verifier : Vladislav Vaintroub2011-05-141-0/+1
| | | | | | | | | | | | | | | - Fix active lock in freed memory in ha_archive (share mutex was not released prior to free()) - Do not attempt vio_fastsend or vio_keepalive on named pipes and shared memory.
| * | Fix PBXT bugs found while testing with Application Verifier : Vladislav Vaintroub2011-05-144-0/+12
| | | | | | | | | | | | | | | | | | | | | LPBUG#782269 : critical sections are initialized twice in xt_xn_init_db() LPBUG#782431: active lock in memory released by xt_ind_exit() LPBUG#782433 : xt_heap_release() does not release spinlock hp->h_lock initialized in xt_heap_new(). LPBUG#782435: xt_exit_row_locks() tries to release unallocated locks
| * | LPBUG#782269 : Fixed double initialization of condition variables in PBXT.Vladislav Vaintroub2011-05-131-1/+0
| | |
* | | Made test-unit run in parlallel. This was achived by having all aria tests ↵Michael Widenius2011-05-1318-124/+310
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that uses temporary files to create the temporary file in an unique tempdirectory. aria_chk now returns 1 if one got any warnings during check and 2 if one got errors. lp:728919 maria_chk should fail on all detected corruptions mysql-test/lib/My/SafeProcess.pm: Removed ^M lines from the file storage/maria/ma_check.c: Fixed indentation storage/maria/maria_chk.c: aria_chk now returns 1 if one got any warnings during check and 2 if one got errors. storage/maria/unittest/ma_control_file-t.c: Use unique sub directory for test results storage/maria/unittest/ma_maria_log_cleanup.c: Added help function create_tmpdir() storage/maria/unittest/ma_pagecache_consist.c: Use unique sub directory for test results storage/maria/unittest/ma_pagecache_rwconsist.c: Use unique sub directory for test results storage/maria/unittest/ma_pagecache_rwconsist2.c: Use unique sub directory for test results storage/maria/unittest/ma_pagecache_single.c: Use unique sub directory for test results storage/maria/unittest/ma_test_all-t: Use unique sub directory for test results storage/maria/unittest/ma_test_loghandler-t.c: Use unique sub directory for test results storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: Use unique sub directory for test results remove delete of files that are already deleted by maria_log_remove() storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Use unique sub directory for test results storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Use unique sub directory for test results storage/maria/unittest/ma_test_loghandler_multithread-t.c: Use unique sub directory for test results storage/maria/unittest/ma_test_loghandler_noflush-t.c: Use unique sub directory for test results remove delete of files that are already deleted by maria_log_remove() storage/maria/unittest/ma_test_loghandler_nologs-t.c: Use unique sub directory for test results storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Use unique sub directory for test results remove delete of files that are already deleted by maria_log_remove() storage/maria/unittest/ma_test_loghandler_purge-t.c: Use unique sub directory for test results support-files/compiler_warnings.supp: Supress some warnings unittest/unit.pl: Run 4 unittests in parallel
* | small enhancement of the create table options feature:Sergei Golubchik2011-05-101-33/+36
| | | | | | | | | | no unnecessary casting from void*, more type safety. typos fixed.
* | Fix Windows embedded warningsVladislav Vaintroub2011-05-101-3/+4
| |
* | Automatic merge with 5.1Michael Widenius2011-05-083-0/+6
|\ \ | |/
| * Improved 'make test-unit' time slightlyMichael Widenius2011-05-053-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | storage/maria/unittest/ma_test_loghandler-t.c: Don't sync during test storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Don't sync during test storage/maria/unittest/ma_test_loghandler_multithread-t.c: Don't sync during test unittest/mysys/bitmap-t.c: Don't test all bit combinations (not needed) unittest/mysys/thr_template.c: Remove sleep as old bug should be fixed nowadays unittest/mysys/waiting_threads-t.c: Only run test with --big unittest/mytap/tap.c: Print total time at end of test. unittest/unit.pl: Use TAP::Harness instead of Test::Harness (recommended according to manual) Add times to tests.
* | Automatic merge with 5.1Michael Widenius2011-05-041-1/+1
|\ \ | |/
| * Fixed compiler warningMichael Widenius2011-05-041-1/+1
| |
* | Automatic merge with MariaDB 5.1Michael Widenius2011-05-034-6/+5
|\ \ | |/
| * Automatic mergeMichael Widenius2011-05-032-4/+2
| |\
| | * Fixed after-merge failures found by buildbotMichael Widenius2011-05-032-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/suite/funcs_1/r/is_columns_is.result: Updated test results mysql-test/suite/pbxt/r/client_xml.result: Updated test results mysys/Makefile.am: Added back my_port.c storage/xtradb/buf/buf0buddy.c: Removed not used variables storage/xtradb/fil/fil0fil.c: Added casts to fix compiler warnings
| * | Fix Xtradb compile error on Win64 - conversion between pointers of different ↵Vladislav Vaintroub2011-05-031-1/+1
| | | | | | | | | | | | size
| * | Fix compile errors:Vladislav Vaintroub2011-05-021-1/+2
| |/ | | | | | | | | - from xtradb merge - portability error in bitmap-t.c ( variable size array in non-portable)
* | Merge with MariaDB 5.1Michael Widenius2011-05-03141-1447/+3401
|\ \ | |/
| * Merge with xtradb fixesMichael Widenius2011-05-0258-875/+1233
| |\
| | * Merge XtraDB from Percona Server 5.1.56-12.7 into MariaDB-5.1.unknown2011-04-2958-875/+1233
| | |
| * | Merge with MySQL 5.1.57/58Michael Widenius2011-05-0283-572/+2168
| |\ \ | | |/ | |/| | | | Moved some BSD string functions from Unireg
| | * mergeMattias Jonsson2011-04-206-12/+12
| | |\
| | | * Bug#11766249 bug#59316: PARTITIONING AND INDEX_MERGE MEMORY LEAKMattias Jonsson2011-03-256-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When executing row-ordered-retrieval index merge, the handler was cloned, but it used the wrong memory root, so instead of allocating memory on the thread/query's mem_root, it used the table's mem_root, resulting in non released memory in the table object, and was not freed until the table was closed. Solution was to ensure that memory used during cloning of a handler was allocated from the correct memory root. This was implemented by fixing handler::clone() to also take a name argument, so it can be used with partitioning. And in ha_partition only allocate the ha_partition's ref, and call the original ha_partition partitions clone() and set at cloned partitions. Fix of .bzrignore on Windows with VS 2010
| | * | Merge mysql-5.1-innodb -> mysql-5.1Vasil Dimov2011-04-0414-129/+234
| | |\ \
| | | * | Bug#11877216 InnoDB too eager to commit suicide on a busy serverMarko Mäkelä2011-03-307-28/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sync_array_print_long_waits(): Return the longest waiting thread ID and the longest waited-for lock. Only if those remain unchanged between calls in srv_error_monitor_thread(), increment fatal_cnt. Otherwise, reset fatal_cnt. Background: There is a built-in watchdog in InnoDB whose purpose is to kill the server when some thread is stuck waiting for a mutex or rw-lock. Before this fix, the logic was flawed. The function sync_array_print_long_waits() returns TRUE if it finds a lock wait that exceeds 10 minutes (srv_fatal_semaphore_wait_threshold). The function srv_error_monitor_thread() will kill the server if this happens 10 times in a row (fatal_cnt reaches 10), checked every 30 seconds. This is wrong, because this situation does not mean that the server is hung. If the server is very busy for a little over 15 minutes, it will be killed. Consider this example. Thread T1 is waiting for mutex M. Some time later, threads T2..Tn start waiting for the same mutex M. If T1 keeps waiting for 600 seconds, fatal_cnt will be incremented to 1. So far, so good. Now, if M is granted to T1, the server was obviously not stuck. But, T2..Tn keeps waiting, and their wait time will be longer than 600 seconds. If 5 minutes later, some Tn has still been waiting for more than 10 minutes for the mutex M, the server can be killed, even though it is not stuck. rb:622 approved by Jimmy Yang
| | | * | Store the '\0'-terminated query in row->trx_queryVasil Dimov2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This problem was introduced in marko.makela@oracle.com-20100514130815-ym7j7cfu88ro6km4 and is probably the reason for the following valgrind warning: from http://bugs.mysql.com/52691 , http://bugs.mysql.com/file.php?id=16880 : Version: '5.6.3-m5-valgrind-max-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution ==14947== Thread 18: ==14947== Conditional jump or move depends on uninitialised value(s) ==14947== at 0x4A06318: __GI_strlen (mc_replace_strmem.c:284) ==14947== by 0x9F3D7A: fill_innodb_trx_from_cache(trx_i_s_cache_struct*, THD*, TABLE*) (i_s.cc:591) ==14947== by 0x9F4D7D: trx_i_s_common_fill_table(THD*, TABLE_LIST*, Item*) (i_s.cc:1238) ==14947== by 0x7689F3: get_schema_tables_result(JOIN*, enum_schema_table_state) (sql_show.cc:6745) ==14947== by 0x715A75: JOIN::exec() (sql_select.cc:2861) ==14947== by 0x7185BD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3609) ==14947== by 0x70E823: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:319) ==14947== by 0x6F2305: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4557) ==14947== by 0x6EAED4: mysql_execute_command(THD*) (sql_parse.cc:2135) ==14947== by 0x6F44C9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5597) ==14947== by 0x6E864B: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1093) ==14947== by 0x6E785E: do_command(THD*) (sql_parse.cc:815) ==14947== by 0x6C18DD: do_handle_one_connection(THD*) (sql_connect.cc:771) ==14947== by 0x6C146E: handle_one_connection (sql_connect.cc:707) ==14947== by 0x30E1807760: start_thread (pthread_create.c:301) ==14947== by 0x35EA670F: ??? ==14947== Uninitialised value was created by a heap allocation ==14947== at 0x4A0515D: malloc (vg_replace_malloc.c:195) ==14947== by 0xB4B948: mem_area_alloc (mem0pool.c:385) ==14947== by 0xB4A27C: mem_heap_create_block (mem0mem.c:333) ==14947== by 0xB4A530: mem_heap_add_block (mem0mem.c:446) ==14947== by 0xB0D2A4: mem_heap_alloc (mem0mem.ic:186) ==14947== by 0xB0D9C2: ha_storage_put_memlim (ha0storage.c:118) ==14947== by 0xA479D8: fill_trx_row (trx0i_s.c:521) ==14947== by 0xA490E9: fetch_data_into_cache (trx0i_s.c:1319) ==14947== by 0xA491BA: trx_i_s_possibly_fetch_data_into_cache (trx0i_s.c:1352) ==14947== by 0x9F4CE7: trx_i_s_common_fill_table(THD*, TABLE_LIST*, Item*) (i_s.cc:1221) ==14947== by 0x7689F3: get_schema_tables_result(JOIN*, enum_schema_table_state) (sql_show.cc:6745) ==14947== by 0x715A75: JOIN::exec() (sql_select.cc:2861) ==14947== by 0x7185BD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3609) ==14947== by 0x70E823: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:319) ==14947== by 0x6F2305: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4557) ==14947== by 0x6EAED4: mysql_execute_command(THD*) (sql_parse.cc:2135) ==14947== by 0x6F44C9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5597) ==14947== by 0x6E864B: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1093) ==14947== by 0x6E785E: do_command(THD*) (sql_parse.cc:815) ==14947== by 0x6C18DD: do_handle_one_connection(THD*) (sql_connect.cc:771) ==14947== by 0x6C146E: handle_one_connection (sql_connect.cc:707) ==14947== by 0x30E1807760: start_thread (pthread_create.c:301) ==14947== by 0x35EA670F: ??? (gdb) bt #0 0x0000000004a06318 in _vgrZU_libcZdsoZa___GI_strlen (str=0x3026bfa0 "insert into `blobtest` set `data`='pkefxxpkalpabzgrczlxefkreqljeqbvzrcnhvhsjsfnvxzjsltfuincffigdkmhvvcmnseluzgbtedrfmxvnrdmzesbinjgwvharkpgjplrlnqudfidbqwgbykupycxzyikzqincnsjrxgncqzlgyqwjdbjulztgsffxpjgymsnntdibvklwqylmwhsmdskmllxuwafabdjnwlyofknwuixiyrgnplmerfdewgizkdhznitesfqepsqbbwkdepkmjoseyxjofmmjaqdipwopfrwidmhqbtovdslvayxcnpewzhppeetblccppniamezibuoinvlxkafpcmozawtplfpepxwlwhymsuraezcwvjqzwogsozodlsfzjiyrcaljjhqwdrcjawvelhefzzaexvcbyorlcyupqwgjuamiqpiputtndjwcsuyzdfhuxswuowhrzdvriwrxqmcqthvzzzvivbabbnhdbtcfdtgssvmirrcddnytnctcvqplwytxxzxelldhwahalzxvgynaiwjyezhxqhlsqudngekocfvlbqprxqhyhwbaomgqiwkpfguohuvlnhtrsszgacxhhzeppyqwfwabiqzgyzkperiidyunrykopysvlcxwhrcboetjltawdjergalsfvaxncmzoznryumrjmncvhvxqvqhhbznnifkguuiffmlrbmgwtzvnuwlaguixqadkupfhasbbxnwkrvsfhrqanfmvjtzfqodtutkjlxfcogtsjywrdgmzgszjtsmimaelsveayqrwviqwwefeziuaqsqpauxpnzhaxjtkdfvvodniwezskbxfxszyniyzkzxngcfwgjlyrlskmrzxqnptwlilsxybuguafxxkvryyjrnkhhcmxuusitaflaiuxjhyfnzkahlgmaszujqmfdhyppdnpweqanmvzgjfyzjolbmprhnuuxextcaxzicfvsuochprmlf"...) at mc_replace_strmem.c:284 #1 0x00000000009f3d7b in fill_innodb_trx_from_cache (cache=0x1462440, thd=0x2a495000, table=0x2a422500) at /home/sbester/build/bzr/mysql-trunk/storage/innobase/handler/i_s.cc:591 #2 0x00000000009f4d7e in trx_i_s_common_fill_table (thd=0x2a495000, tables=0x2a4c3ec0) at /home/sbester/build/bzr/mysql-trunk/storage/innobase/handler/i_s.cc:1238 #3 0x00000000007689f4 in get_schema_tables_result (join=0x30f90c40, executed_place=PROCESSED_BY_JOIN_EXEC) at /home/sbester/build/bzr/mysql-trunk/sql/sql_show.cc:6745 #4 0x0000000000715a76 in JOIN::exec (this=0x30f90c40) at /home/sbester/build/bzr/mysql-trunk/sql/sql_select.cc:2861 #5 0x00000000007185be in mysql_select (thd=0x2a495000, rref_pointer_array=0x2a497590, tables=0x2a4c3ec0, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x30319720, unit=0x2a496d28, select_lex=0x2a497378) at /home/sbester/build/bzr/mysql-trunk/sql/sql_select.cc:3609 #6 0x000000000070e824 in handle_select (thd=0x2a495000, lex=0x2a496c78, result=0x30319720, setup_tables_done_option=0) at /home/sbester/build/bzr/mysql-trunk/sql/sql_select.cc:319 #7 0x00000000006f2306 in execute_sqlcom_select (thd=0x2a495000, all_tables=0x2a4c3ec0) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:4557 #8 0x00000000006eaed5 in mysql_execute_command (thd=0x2a495000) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:2135 #9 0x00000000006f44ca in mysql_parse (thd=0x2a495000, rawbuf=0x30d80060 "select * from innodb_trx", length=24, parser_state=0x35ea5540) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:5597 #10 0x00000000006e864c in dispatch_command (command=COM_QUERY, thd=0x2a495000, packet=0x30bb4e31 "select * from innodb_trx", packet_length=24) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:1093 #11 0x00000000006e785f in do_command (thd=0x2a495000) at /home/sbester/build/bzr/mysql-trunk/sql/sql_parse.cc:815 #12 0x00000000006c18de in do_handle_one_connection (thd_arg=0x2a495000) at /home/sbester/build/bzr/mysql-trunk/sql/sql_connect.cc:771 #13 0x00000000006c146f in handle_one_connection (arg=0x2a495000) at /home/sbester/build/bzr/mysql-trunk/sql/sql_connect.cc:707 #14 0x00000030e1807761 in start_thread (arg=0x35ea6710) at pthread_create.c:301 #15 0x00000030e14e14ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 (gdb) frame 1 #1 0x00000000009f3d7b in fill_innodb_trx_from_cache (cache=0x1462440, thd=0x2a495000, table=0x2a422500) at /home/sbester/build/bzr/mysql-trunk/storage/innobase/handler/i_s.cc:591 591 row->trx_query_cs); (gdb) list 586 if (row->trx_query) { 587 /* store will do appropriate character set 588 conversion check */ 589 fields[IDX_TRX_QUERY]->store( 590 row->trx_query, strlen(row->trx_query), 591 row->trx_query_cs); 592 fields[IDX_TRX_QUERY]->set_notnull(); 593 } else { 594 fields[IDX_TRX_QUERY]->set_null(); 595 }
| | | * | Bug#11849231 inflateInit() invoked without initializing all memoryMarko Mäkelä2011-03-153-45/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the zlib documentation, next_in and avail_in must be initialized before invoking inflateInit or inflateInit2. Furthermore, the zalloc function must clear the allocated memory. btr_copy_zblob_prefix(): Replace the d_stream parameter with buf,len and return the copied length. page_zip_decompress(): Invoke inflateInit2 a little later. page_zip_zalloc(): Rename from page_zip_alloc(). Invoke mem_heap_zalloc() instead of mem_heap_alloc(). rb:619 approved by Jimmy Yang
| | | * | Merge mysql-5.1 -> mysql-5.1-innodbVasil Dimov2011-03-0210-27/+172
| | | |\ \ | | | | |/
| | | * | Bug #58549 Race condition in buf_LRU_drop_page_hash_for_tablespace()Marko Mäkelä2011-02-285-52/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and compressed tables buf_LRU_drop_page_hash_for_tablespace(): after releasing and reacquiring the buffer pool mutex, do not dereference any block descriptor pointer that is not known to be a pointer to an uncompressed page frame (type buf_block_t; state == BUF_BLOCK_FILE_PAGE). Also, defer the acquisition of the block_mutex until it is needed. buf_page_get_gen(): Add mode == BUF_GET_IF_IN_POOL_PEEK for buffer-fixing a block without making it young in the LRU list. buf_page_get_gen(), buf_page_init(), buf_LRU_block_remove_hashed_page(): Set bpage->state = BUF_BLOCK_ZIP_FREE before buf_buddy_free(bpage), so that similar race conditions might be detected a little easier. btr_search_drop_page_hash_when_freed(): Use BUF_GET_IF_IN_POOL_PEEK when dropping the hash indexes. rb://528 approved by Jimmy Yang
| | | * | Fix BUG#11798085 - INCORRECT INTEGER TYPES USED IN CALCULATION RESULTVasil Dimov2011-02-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IN OVERFLOW Do not assign the result of the difference to a signed variable and checking whether it is negative afterwards because this limits the max diff to 2G on 32 bit systems. E.g. "signed = 3.5G - 1G" would be negative and the code would assume that 3.5G < 1G. Instead compare the two variables directly and assign to unsigned only if we know that the result of the subtraction will be positive. Discussed with: Jimmy and Sunny (via IRC)
| | * | | Bug#11900714 REMOVE LGPL LICENSED FILES IN MYSQL 5.1Magne Mahre2011-03-286-1/+93
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LGPL license is used in some legacy code, and to adhere to current licensing polity, we remove those files that are no longer used, and reorganize the remaining LGPL code so it will be GPL licensed from now on. Note: This patch only removed LGPL licensed files in MySQL 5.1, and is the second of a set of patches to remove LGPL from all trees. (See Bug# 11840513 for details)
| | * | Merge mysql-5.1-innodb -> mysql-5.1Vasil Dimov2011-02-1716-7/+934
| | |\ \ | | | |/
| | | * Bug#59307 Valgrind: uninitialized value in ↵Marko Mäkelä2011-02-153-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rw_lock_set_writer_id_and_recursion_flag() rw_lock_create_func(): Initialize lock->writer_thread, so that Valgrind will not complain even when Valgrind instrumentation is not enabled. Flag lock->writer_thread uninitialized, so that Valgrind can complain when it is used uninitialized. rw_lock_set_writer_id_and_recursion_flag(): Revert the bogus Valgrind instrumentation that was pushed in the first attempt to fix this bug.
| | | * Fix Bug #59749 Enabling concurrent reads while creating non-primary uniqueJimmy Yang2011-02-142-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | index gives failures. Approved by Marko
| | | * Fix Bug#59307 Valgrind: uninitialized value in ↵Vasil Dimov2011-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rw_lock_set_writer_id_and_recursion_flag() by silencing a bogus Valgrind warning: ==4392== Conditional jump or move depends on uninitialised value(s) ==4392== at 0x5A18416: rw_lock_set_writer_id_and_recursion_flag (sync0rw.ic:283) ==4392== by 0x5A1865C: rw_lock_x_lock_low (sync0rw.c:558) ==4392== by 0x5A18481: rw_lock_x_lock_func (sync0rw.c:617) ==4392== by 0x597EEE6: mtr_x_lock_func (mtr0mtr.ic:271) ==4392== by 0x597EBBD: fsp_header_init (fsp0fsp.c:970) ==4392== by 0x5A15E78: innobase_start_or_create_for_mysql (srv0start.c:1508) ==4392== by 0x598B789: innobase_init(void*) (ha_innodb.cc:2282) os_compare_and_swap_thread_id() is defined as __sync_bool_compare_and_swap(). From the GCC doc: `bool __sync_bool_compare_and_swap (TYPE *ptr, TYPE oldval TYPE newval, ...)' ... The "bool" version returns true if the comparison is successful and NEWVAL was written. So it is not possible that the return value is uninitialized, no matter what the arguments to os_compare_and_swap_thread_id() are. Probably Valgrind gets confused by the implementation of the GCC internal function __sync_bool_compare_and_swap().
| | | * Increment InnoDB Plugin version from 1.0.15 to 1.0.16.Vasil Dimov2011-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | InnoDB Plugin 1.0.15 has been released with MySQL 5.1.55.
| | | * Implement UNIV_BLOB_DEBUG. An early version of this caught Bug #55284.Marko Mäkelä2011-02-0813-2/+910
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option is known to be broken when tablespaces contain off-page columns after crash recovery. It has only been tested when creating the data files from the scratch. btr_blob_dbg_t: A map from page_no:heap_no:field_no to first_blob_page_no. This map is instantiated for every clustered index in index->blobs. It is protected by index->blobs_mutex. btr_blob_dbg_msg_issue(): Issue a diagnostic message. Invoked when btr_blob_dbg_msg is set. btr_blob_dbg_rbt_insert(): Insert a btr_blob_dbg_t into index->blobs. btr_blob_dbg_rbt_delete(): Remove a btr_blob_dbg_t from index->blobs. btr_blob_dbg_cmp(): Comparator for btr_blob_dbg_t. btr_blob_dbg_add_blob(): Add a BLOB reference to the map. btr_blob_dbg_add_rec(): Add all BLOB references from a record to the map. btr_blob_dbg_print(): Display the map of BLOB references in an index. btr_blob_dbg_remove_rec(): Remove all BLOB references of a record from the map. btr_blob_dbg_is_empty(): Check that no BLOB references exist to or from a page. Disowned references from delete-marked records are tolerated. btr_blob_dbg_op(): Perform an operation on all BLOB references on a B-tree page. btr_blob_dbg_add(): Add all BLOB references from a B-tree page to the map. btr_blob_dbg_remove(): Remove all BLOB references from a B-tree page from the map. btr_blob_dbg_restore(): Restore the BLOB references after a failed page reorganize. btr_blob_dbg_set_deleted_flag(): Modify the 'deleted' flag in the BLOB references of a record. btr_blob_dbg_owner(): Own or disown a BLOB reference. btr_page_create(), btr_page_free_low(): Assert that no BLOB references exist. btr_create(): Create index->blobs for clustered indexes. btr_page_reorganize_low(): Invoke btr_blob_dbg_remove() before copying the records. Invoke btr_blob_dbg_restore() if the operation fails. btr_page_empty(), btr_lift_page_up(), btr_compress(), btr_discard_page(): Invoke btr_blob_dbg_remove(). btr_cur_del_mark_set_clust_rec(): Invoke btr_blob_dbg_set_deleted_flag(). Other cases of modifying the delete mark are either in the secondary index or during crash recovery, which we do not promise to support. btr_cur_set_ownership_of_extern_field(): Invoke btr_blob_dbg_owner(). btr_store_big_rec_extern_fields(): Invoke btr_blob_dbg_add_blob(). btr_free_externally_stored_field(): Invoke btr_blob_dbg_assert_empty() on the first BLOB page. page_cur_insert_rec_low(), page_cur_insert_rec_zip(), page_copy_rec_list_end_to_created_page(): Invoke btr_blob_dbg_add_rec(). page_cur_insert_rec_zip_reorg(), page_copy_rec_list_end(), page_copy_rec_list_start(): After failure, invoke btr_blob_dbg_remove() and btr_blob_dbg_add(). page_cur_delete_rec(): Invoke btr_blob_dbg_remove_rec(). page_delete_rec_list_end(): Invoke btr_blob_dbg_op(btr_blob_dbg_remove_rec). page_zip_reorganize(): Invoke btr_blob_dbg_remove() before copying the records. page_zip_copy_recs(): Invoke btr_blob_dbg_add(). row_upd_rec_in_place(): Invoke btr_blob_dbg_rbt_delete() and btr_blob_dbg_rbt_insert(). innobase_start_or_create_for_mysql(): Warn when UNIV_BLOB_DEBUG is enabled. rb://550 approved by Jimmy Yang
| | * | Fix for bug#11766714 (former bug @59888) "debug assertion whenDmitry Lenev2011-02-151-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attempt to create spatial index on char > 31 bytes". Attempt to create spatial index on char field with length greater than 31 byte led to assertion failure on server compiled with safemutex support. The problem occurred in mi_create() function which was called to create a new version of table being altered. This function failed since it detected an attempt to create a spatial key on non-binary column and tried to return an error. On its error path it tried to unlock THR_LOCK_myisam mutex which has not been not locked at this point. Indeed such an incorrect behavior was caught by safemutex wrapper and caused assertion failure. This patch fixes the problem by ensuring that mi_create() doesn't releases THR_LOCK_myisam mutex on error path if it was not acquired. mysql-test/r/gis.result: Added test for bug @59888 "debug assertion when attempt to create spatial index on char > 31 bytes". mysql-test/t/gis.test: Added test for bug @59888 "debug assertion when attempt to create spatial index on char > 31 bytes". storage/myisam/mi_create.c: Changed mi_create() not to release THR_LOCK_myisam mutex on error path if it was not acquired.