summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WL#4441 "LOCK_open: Remove requirement of mutex protecting Konstantin Osipov2010-06-085-51/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | thd->open_tables" thd->open_tables list is not normally accessed concurrently except for one case: when the connection has open SQL HANDLER tables, and we want to perform a DDL on the table, we want to abort waits on MyISAM thr_lock of those connections that prevent the DDL from proceeding, and iterate over thd->open_tables list to find out the tables on which the thread is waiting. In 5.5 we mostly use deadlock detection and soft deadlock prevention, as opposed to "hard" deadlock prevention of 5.1, which would abort any transaction that may cause a deadlock. The only remaining case when neither deadlock detection nor deadlock prevention is implemented in 5.5 is HANDLER SQL, where we use old good thr_lock_abort() technique form 5.1. Thus, replace use of LOCK_open to protect thd->open_tables with thd->LOCK_ha_data (a lock protecting various session private data). This is a port of the work done for 5.5.4 for review and inclusion into 5.5.5.
* Backport two small cleanups from trunk-iplus tree:Konstantin Osipov2010-06-072-10/+11
| | | | | | 1) No mutex and no function call if we're not using plugins. 2) If we're above the table definition cache limit, delete the oldest unused share, not the share on our hands.
* Apply:Konstantin Osipov2010-06-072-2/+2
| | | | | 3413 Davi Arnaut 2010-06-03 Don't enable safemalloc for valgrind builds, it's too slow. to trunk-runtime.
* Follow-up for bug#52289 "performance regressionDmitry Lenev2010-06-071-26/+26
| | | | | | | | | | for MyISAM in sysbench OLTP_RW test". Fixes compilation warnings about local variable shadowing I_P_List_fast_push_back::last member. Renamed I_P_List_fast_push_back::last member to m_last. Also to keep member naming consistent renamed I_P_List::first member to m_first.
* A fix for Bug#52432 "Crash in check_table_is_closed on an Konstantin Osipov2010-06-071-1/+16
| | | | | | information_schema query. Porting a fix done for a feature tree by Ingo Struewing. No test case since the crash only occurs under a stress load.
* Patch that changes approach to how we acquire metadataDmitry Lenev2010-06-0713-510/+1065
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | locks for DML statements and changes the way MDL locks are acquired/granted in contended case. Instead of backing-off when a lock conflict is encountered and waiting for it to go away before restarting open_tables() process we now wait for lock to be released without releasing any previously acquired locks. If conflicting lock goes away we resume opening tables. If waiting leads to a deadlock we try to resolve it by backing-off and restarting open_tables() immediately. As result both waiting for possibility to acquire and acquiring of a metadata lock now always happen within the same MDL API call. This has allowed to make release of a lock and granting it to the most appropriate pending request an atomic operation. Thanks to this it became possible to wake up during release of lock only those waiters which requests can be satisfied at the moment as well as wake up only one waiter in case when granting its request would prevent all other requests from being satisfied. This solves thundering herd problem which occured in cases when we were releasing some lock and woke up many waiters for SNRW or X locks (this was the issue in bug#52289 "performance regression for MyISAM in sysbench OLTP_RW test". This also allowed to implement more fair (FIFO) scheduling among waiters with the same priority. It also opens the door for introducing new types of requests for metadata locks such as low-prio SNRW lock which is necessary in order to support LOCK TABLES LOW_PRIORITY WRITE. Notice that after this sometimes can report ER_LOCK_DEADLOCK error in cases in which it has not happened before. Particularly we will always report this error if waiting for conflicting lock has happened in the middle of transaction and resulted in a deadlock. Before this patch the error was not reported if deadlock could have been resolved by backing off all metadata locks acquired by the current statement.
* manual merge from mysql-trunk-bugfixingJon Olav Hauglid2010-06-06869-26098/+29381
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in mysql-test/r/archive.result Contents conflict in mysql-test/r/innodb_bug38231.result Text conflict in mysql-test/r/mdl_sync.result Text conflict in mysql-test/suite/binlog/t/disabled.def Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result Text conflict in mysql-test/t/archive.test Contents conflict in mysql-test/t/innodb_bug38231.test Text conflict in mysql-test/t/mdl_sync.test Text conflict in sql/sp_head.cc Text conflict in sql/sql_show.cc Text conflict in sql/table.cc Text conflict in sql/table.h
| * Post-merge fix: header is used by the client API. Obvious in retrospect.Davi Arnaut2010-06-055-8/+17
| | | | | | Also, update a few cases missed by the initial patch.
| * Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-05-3133-123/+245
| | | | | | | | | | | | | | | | Fix various mismatches between function's language linkage. Any particular function that is declared in C++ but should be callable from C must have C linkage. Note that function types with different linkages are also distinct. Thus, if a function type is declared in C code, it will have C linkage (same if declared in a extern "C" block).
| * merge of patch for bug#52913 from 5.1-bugteam to trunk-bugfixing. Changed ↵Horst.Hunger2010-06-043-1/+8
| | | | | | | | $basedir to $bindir in mysql-test-run.pl.
| * Automerge.Alexey Kopytov2010-06-0373-648/+2203
| |\
| | * Patch for trunk after merge from 5.1-bugteam of bug52913.Horst.Hunger2010-06-038-0/+446
| | |
| | * Skip perfschema.misc if "var" is a symlink (due to Bug 51447).Tor Didriksen2010-06-031-1/+6
| | |
| | * Disable binlog.binlog_spurious_ddl_errors due to Bug 54195.Alexander Nozdrin2010-06-031-3/+3
| | |
| | * Auto mergeHe Zhenxing2010-06-0235-376/+897
| | |\
| | | * Merge mysql-trunk-bugfixing from bk-internal into my local treeVasil Dimov2010-06-0213-9/+323
| | | |\
| | | | * Bug#52520 Difference in tinytext utf column metadataAlexander Barkov2010-06-0213-9/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problems: - regression (compating to version 5.1) in metadata for BLOB types - inconsistency between length metadata in server and embedded for BLOB types - wrong max_length calculation in items derived from BLOB columns @ libmysqld/lib_sql.cc Calculating length metadata in embedded similary to server version, using new function char_to_byte_length_safe(). @ mysql-test/r/ctype_utf16.result Adding tests @ mysql-test/r/ctype_utf32.result Adding tests @ mysql-test/r/ctype_utf8.result Adding tests @ mysql-test/r/ctype_utf8mb4.result Adding tests @ mysql-test/t/ctype_utf16.test Adding tests @ mysql-test/t/ctype_utf32.test Adding tests @ mysql-test/t/ctype_utf8.test Adding tests @ mysql-test/t/ctype_utf8mb4.test Adding tests @ sql/field.cc Overriding char_length() for Field_blob: unlike in generic Item::char_length() we don't divide to mbmaxlen for BLOBs. @ sql/field.h - Making Field::char_length() virtual - Adding prototype for Field_blob::char_length() @ sql/item.h - Adding new helper function char_to_byte_length_safe() - Using new function @ sql/protocol.cc Using new function char_to_byte_length_safe(). modified: libmysqld/lib_sql.cc mysql-test/r/ctype_utf16.result mysql-test/r/ctype_utf32.result mysql-test/r/ctype_utf8.result mysql-test/r/ctype_utf8mb4.result mysql-test/t/ctype_utf16.test mysql-test/t/ctype_utf32.test mysql-test/t/ctype_utf8.test mysql-test/t/ctype_utf8mb4.test sql/field.cc sql/field.h sql/item.h sql/protocol.cc
| | | * | Merge mysql-trunk-innodb -> mysql-trunk-bugfixingVasil Dimov2010-06-0220-322/+538
| | | |\ \ | | | | |/ | | | |/|
| | | | * Fix the failing innodb.innodb test:Vasil Dimov2010-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innodb.innodb [ fail ] Test ended at 2010-06-02 15:04:06 CURRENT_TEST: innodb.innodb --- /usr/w/mysql-trunk-innodb/mysql-test/suite/innodb/r/innodb.result 2010-05-23 23:10:26.576407000 +0300 +++ /usr/w/mysql-trunk-innodb/mysql-test/suite/innodb/r/innodb.reject 2010-06-02 15:04:05.000000000 +0300 @@ -2648,7 +2648,7 @@ create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb; insert into t1 values (0x41),(0x4120),(0x4100); insert into t2 values (0x41),(0x4120),(0x4100); -ERROR 23000: Duplicate entry 'A\x00' for key 'PRIMARY' +ERROR 23000: Duplicate entry 'A' for key 'PRIMARY' insert into t2 values (0x41),(0x4120); The change in the printout was introduced in: ------------------------------------------------------------ revno: 3008.6.2 revision-id: sergey.glukhov@sun.com-20100527160143-57nas8nplzpj26dz parent: sergey.glukhov@sun.com-20100527155443-24vqi9o8rpnkyci7 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Thu 2010-05-27 20:01:43 +0400 message: Bug#52430 Incorrect key in the error message for duplicate key error involving BINARY type For BINARY(N) strip trailing zeroes to make the error message nice-looking @ mysql-test/r/errors.result test case @ mysql-test/r/type_binary.result result fix @ mysql-test/t/errors.test test case @ sql/key.cc For BINARY(N) strip trailing zeroes to make the error message nice-looking and its author (Sergey) did not notice the test failure because that test has been disabled in his tree.
| | | | * ut_strerr(): Handle DB_SUCCESS_LOCKED_REC.Marko Mäkelä2010-06-021-0/+2
| | | | |
| | | | * Merge from mysql-5.1-innodb:Marko Mäkelä2010-06-0210-211/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------ revno: 3495 committer: Marko Mäkelä <marko.makela@oracle.com> branch nick: 5.1-innodb timestamp: Wed 2010-06-02 13:37:14 +0300 message: Bug#53674: InnoDB: Error: unlock row could not find a 4 mode lock on the record In semi-consistent read, only unlock freshly locked non-matching records. lock_rec_lock_fast(): Return LOCK_REC_SUCCESS, LOCK_REC_SUCCESS_CREATED, or LOCK_REC_FAIL instead of TRUE/FALSE. enum db_err: Add DB_SUCCESS_LOCKED_REC for indicating a successful operation where a record lock was created. lock_sec_rec_read_check_and_lock(), lock_clust_rec_read_check_and_lock(), lock_rec_enqueue_waiting(), lock_rec_lock_slow(), lock_rec_lock(), row_ins_set_shared_rec_lock(), row_ins_set_exclusive_rec_lock(), sel_set_rec_lock(), row_sel_get_clust_rec_for_mysql(): Return DB_SUCCESS_LOCKED_REC if a new record lock was created. Adjust callers. row_unlock_for_mysql(): Correct the function documentation. row_prebuilt_t::new_rec_locks: Correct the documentation.
| | | | * Merge from mysql-5.1-innodb:Marko Mäkelä2010-06-022-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------ revno: 3493 revision-id: marko.makela@oracle.com-20100602101940-60x32xiivtqj9va1 parent: marko.makela@oracle.com-20100601135802-hgplcpr8089ura8g committer: Marko Mäkelä <marko.makela@oracle.com> branch nick: 5.1-innodb timestamp: Wed 2010-06-02 13:19:40 +0300 message: fil_print_orphaned_tablespaces(): Unused function, remove.
| | | | * Port bug fix #53592 from mysql-5.1-innodb to mysql-trunk-innodb.Jimmy Yang2010-06-025-43/+206
| | | | |
| | | | * Fix bug #54159 InnoDB: New warnings on Windows. Provide "signed/unsigned"Jimmy Yang2010-06-011-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parameter to virtual function store() for longlong data type. rb://371 approved by Sunny.
| | | | * Merge a change from mysql-5.1-innodb:Marko Mäkelä2010-06-012-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------ revno: 3491 revision-id: marko.makela@oracle.com-20100601134335-ccthwwru23kn09qw parent: marko.makela@oracle.com-20100601120751-1uq7bbta5n7ts0qr committer: Marko Mäkelä <marko.makela@oracle.com> branch nick: 5.1-innodb timestamp: Tue 2010-06-01 16:43:35 +0300 message: Bug#48197: Concurrent rw_lock_free may cause assertion failure rw_lock_t: Remove magic_n unless UNIV_DEBUG is defined. rw_lock_free(): Invalidate magic_n only after removing from rw_lock_list.
| | | * | Revert Oracle Enterprise Linux changes.Jonathan Perkin2010-06-021-42/+23
| | | | |
| | | * | Merge trunk-bug53983 -> trunk-bugfixingMagnus Blåudd2010-06-021-3/+13
| | | |\ \
| | | | * | Bug#53983 Placeholder for MASTER_BIND in master.infoMagnus Blåudd2010-06-021-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reserve line 17 in master.info for master_bind which has been added in MySQL Cluster 6.3 - move the line for "list of server id for ignorable servers" to line 18
| | * | | | Auto merge from 5.1-rep-semisyncHe Zhenxing2010-06-021-1/+2
| | |\ \ \ \ | | | |/ / / | | |/| | |
| | | * | | Post fix for bug#52748He Zhenxing2010-06-021-1/+2
| | | | | |
| | * | | | BUG#50479 DDL stmt on row-only/stmt-only tables generate spurious binlog_formatAlfranio Correia2010-06-0221-266/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | errors In the fix of BUG#39934 in 5.1-rep+3, errors are generated when binlog_format=row and a statement modifies a table restricted to statement-logging (ER_BINLOG_ROW_MODE_AND_STMT_ENGINE); or if binlog_format=statement and a statement modifies a table restricted to row-logging (ER_BINLOG_STMT_MODE_AND_ROW_ENGINE). However, some DDL statements that lock tables (e.g. ALTER TABLE, CREATE INDEX and CREATE TRIGGER) were causing spurious errors, although no row might be inserted into the binary log. To fix the problem, we tagged statements that may generate rows into the binary log and thence the warning messages are only printed out when the appropriate conditions hold and rows might be changed.
| | * | | | auto-merge mysql-trunk-bugfixing (local) --> mysql-trunk-bugfixingAlfranio Correia2010-06-0115-74/+489
| | |\ \ \ \
| | | * | | | Post-merge fix for BUG#53421.Alfranio Correia2010-06-012-0/+31
| | | | | | |
| | | * | | | auto-merge mysql-trunk-bugfixing (local) --> mysql-trunk-bugfixing.mergeAlfranio Correia2010-06-013-8/+56
| | | |\ \ \ \
| | | | * | | | BUG#53421 Part of transaction not written in binlog after deadlock, replicationAlfranio Correia2010-06-013-8/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | breaks When a "CREATE TEMPORARY TABLE SELECT * FROM" was executed the OPTION_KEEP_LOG was not set into the thd->variables.option_bits. For that reason, if the transaction had updated only transactional engines and was rolled back at the end (.e.g due to a deadlock) the changes were not written to the binary log, including the creation of the temporary table. To fix the problem, we have set the OPTION_KEEP_LOG into the thd->variables.option_bits when a "CREATE TEMPORARY TABLE SELECT * FROM" is executed.
| | | * | | | | auto-merge mysql-trunk-bugfixing (local) --> mysql-trunk-bugfixing.merge Alfranio Correia2010-06-0110-66/+402
| | | |\ \ \ \ \ | | | | |/ / / / | | | |/| | | |
| | | | * | | | BUG#53437 @@session.sql_bin_log support in substatements is incorrectAlfranio Correia2010-05-2710-66/+402
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The thd->variables.option_bits & OPTION_BIN_LOG is currently abused: it's both a system variable and an implementation switch. The current approach to this option bit breaks the session variable encapsulation. Besides it is allowed to change @@session.sql_bin_log within a transaction what may lead to not correctly logging a transaction. To fix the problems, we created a thd->variables variable to represent the "sql_log_bin" and prohibited its update inside a transaction or sub-statement.
| * | | | | | | Bug #45882: dtoa.c might not work with gcc 4.4.0Alexey Kopytov2010-06-011-181/+192
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Ported relevant changes from the upstream version to not break strict-aliasing rules and to fix compiler warnings and and infinite loops caused by that issue. - Fixed compilation with Honor_FLT_ROUNDS defined. - Fixed an unused variable warning.
| * | | | | | test added for the bug #45052Alexey Botchkov2010-05-312-0/+15
| |/ / / / /
| * | | | | Auto-merge from mysql-trunk-innodb.Alexander Nozdrin2010-06-01344-19724/+21332
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | Auto-merge from mysql-trunk-bugfixing.Alexander Nozdrin2010-06-01277-4519/+4543
| | |\ \ \ \ | | |/ / / / | |/| | | | | | | | | | Due to a BZR bug, that merge was done by the following command: bzr merge -r 'revid:tor.didriksen@sun.com-20100527074248-6qtv0p1ugy6o1hjo..' <mysql-trunk-bugfixing path>
| * | | | | MergeJonathan Perkin2010-06-012-4/+18
| |\ \ \ \ \
| | * \ \ \ \ Auto merge from trunkHe Zhenxing2010-06-0115-40/+149
| | |\ \ \ \ \
| | * \ \ \ \ \ BUG#52748 Semi-Sync ACK packet isn't check for lengthHe Zhenxing2010-06-012-4/+18
| | |\ \ \ \ \ \ | | | | |_|_|/ / | | | |/| | | | Check the length and use strncpy to make the code safer.
| | | * | | | | BUG#52748 Semi-Sync ACK packet isn't check for lengthHe Zhenxing2010-06-011-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | Check the length and use strncpy to make the code safer.
| | | * | | | | Bug#49492 rpl_semi_sync failed on PB2He Zhenxing2010-03-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After stopped slave, it is possible that the Dump thread on master is still running and has locked the semi-sync master plugin, and when uninstalling the semi-sync master plugin, a plugin busy warning could be generated. Fixed by disabling the warnings when uninstalling semi-sync plugin on master.
| * | | | | | | Add SELinux checks from distribution-specific spec file, missed inJonathan Perkin2010-06-011-37/+87
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | previous. Convert some shell bits to standard 2-space indent, 80 columns, etc.
| * | | | | | Patch for Bug#54123 (Build failure on HPUX).Alexander Nozdrin2010-06-011-0/+2
| | | | | | |
| * | | | | | Backport ofAlexander Nozdrin2010-05-313-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - revid:sp1r-svoj@mysql.com/june.mysql.com-20080324111246-00461 - revid:sp1r-svoj@mysql.com/june.mysql.com-20080414125521-40866 BUG#35274 - merge table doesn't need any base tables, gives error 124 when key accessed SELECT queries that use index against a merge table with empty underlying tables list may return with error "Got error 124 from storage engine". The problem was that wrong error being returned.
| * | | | | | Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BYGleb Shchepa2010-05-314-2/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when it should use index Sometimes the LEFT/RIGHT JOIN with an empty table caused an unnecessary filesort. Sample query, where t1.i1 is indexed and t3 is empty: SELECT t1.*, t2.* FROM t1 JOIN t2 ON t1.i1 = t2.i2 LEFT JOIN t3 ON t2.i2 = t3.i3 ORDER BY t1.i1 LIMIT 5; The server erroneously used an item of empty outer-joined table as a common constant of a Item_equal (multi-equivalence expression). By the fix for the bug 16590 the constant status of such an item has been propagated to st_table::const_key_parts map bits related to other Item_equal argument-related key parts (those are obviously not constant in our case). As far as test_if_skip_sort_order function skips constant prefixes of testing keys, this caused an ignorance of available indices, since some prefixes were marked as constant by mistake.