------------------------------------------------------------
revno: 3142 committer: Inaam Rana <inaam.rana@oracle.com> branch nick: mysql-5.5.4-iplus timestamp: Fri 2010-04-09 17:36:50 -0400 message: -- Fix a serious bug in mpb patch that has broken WAL ------------------------------------------------------------ revno: 3141 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-5.5.4-iplus timestamp: Fri 2010-04-09 16:00:18 +0200 message: BUG#52716 fixed ------------------------------------------------------------ revno: 3140 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-5.5.4-iplus timestamp: Fri 2010-04-09 15:52:26 +0200 message: Fixed merge error, using wrong mutex, should have moved to use of buffer pool flush list mutex to get oldest LSN per buffer pool ------------------------------------------------------------ revno: 3139 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.5.4-m3-release timestamp: Wed 2010-04-07 20:56:01 +0200 message: Merge ------------------------------------------------------------ revno: 3136.1.5 committer: Inaam Rana <inaam.rana@oracle.com> branch nick: mysql-5.5.4-iplus timestamp: Wed 2010-04-07 13:00:30 -0400 message: -- Remove a too strong assertion: r6964 of svn tree ------------------------------------------------------------ revno: 3136.1.4 committer: Inaam Rana <inaam.rana@oracle.com> branch nick: mysql-5.5.4-iplus timestamp: Wed 2010-04-07 12:28:40 -0400 message: Merged changes r6958:6963 from branches/innodb+multibp -- Note that r6954 was already applied to this tree. -- Changes merged are: ------------------------------------------------------------------------ r6958 | sbains | 2010-04-06 17:27:44 -0400 (Tue, 06 Apr 2010) | 3 lines branches/innodb+multibp: Fix part of Bug#52546. We allow ut_free() to accept a NULL pointer and treat it as a nop. ------------------------------------------------------------------------ r6961 | jyang | 2010-04-07 03:50:03 -0400 (Wed, 07 Apr 2010) | 9 lines branches/innodb+multibp: Fix for bug #52580: Crash in ha_innobase::open on executing INSERT with concurrent ALTER TABLE. Change in MySQL bug #51557 releases the mutex LOCK_open before ha_innobase::open(), causing racing condition for index translation table creation. Fix it by adding dict_sys mutex for the operation. rb://283, approved by Marko. ------------------------------------------------------------------------ r6963 | irana | 2010-04-07 12:14:10 -0400 (Wed, 07 Apr 2010) | 15 lines branches/innodb+multibp Force setting of buf_pool->LRU_old_ratio by calling buf_LRU_old_ratio_update() with adjust set to TRUE. This will make sure that we grab the buf_pool mutex and actually adjust the buf_pool->LRU_old pointer instead of just updating the buf_pool->LRU_old_ratio. Note that after this change there is no call to buf_LRU_old_ratio_update() with adjust set to FALSE and therefore this parameter should be removed. I am keeping it for now to first make sure that the fix does work. Approved by: No one. Sunny agreed with my hypothesis of the problem. ------------------------------------------------------------------------ ------------------------------------------------------------ revno: 3138 committer: Kent Boortz <kent.boortz@sun.com> branch nick: mysql-5.5.4-m3-release timestamp: Wed 2010-04-07 10:29:54 +0200 message: Merge ------------------------------------------------------------ revno: 3136.1.3 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-5.5.4-iplus timestamp: Tue 2010-04-06 20:45:39 +0200 message: BUG#52580, ensure index_mapping is not ready unless it exists ------------------------------------------------------------ revno: 3136.1.2 committer: Inaam Rana <inaam.rana@oracle.com> branch nick: mysql-5.5.4-iplus timestamp: Tue 2010-04-06 10:27:54 -0400 message: Merged r6946:6951 from svn innodb+multibp -- Take out hackish calls to log_sys mutex acquisitions. -- Initialize buf_pool pointer when allocating buf_page_t from buf_buddy_alloc(). ------------------------------------------------------------ revno: 3136.1.1 committer: Inaam Rana <inaam@dabba> branch nick: mysql-5.5.4-iplus timestamp: Mon 2010-04-05 17:14:11 -0400 message: Merged changes from InnoDB tree innodb+multibp upto svn r6946. Primarily reverts the fix for bug#49047 ------------------------------------------------------------ revno: 3137 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.5.4-m3-release timestamp: Fri 2010-04-02 10:26:25 +0200 message: Merge, but removed the disable of CMake in "choose_configure.sh" ------------------------------------------------------------ revno: 3119.1.10 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Wed 2010-03-24 20:30:33 +0100 message: Add "--with-perfschema" to the configure options for RPMs. ------------------------------------------------------------ revno: 3119.1.9 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Wed 2010-03-24 20:15:06 +0100 message: Fix an issue with the IBM C++ compiler which was detected during the build of 5.5.3-m3. This requires version 9 of IBM C++ to help. More fixes will still be needed, it is very strict (or rather: a bit picky?) about templates. ------------------------------------------------------------ revno: 3119.1.8 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Wed 2010-03-24 20:01:01 +0100 message: Some fixes developed during the build of 5.5.3-m3 about handling the debug plugin files, also "ha_example.*" are dropped. ------------------------------------------------------------ revno: 3119.1.7 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Mon 2010-03-22 16:19:39 +0100 message: Fixes related to bug#46587: archive storage engine headers don't include my_global.h first During the build of 5.5.3-m3 on older Linux platforms (kernels 2.4 or early 2.6), the symptom described in the bug report occurred both in the "archive" and in the "innobase" storage engine. This change is the patch proposed in that bug report, and a similar one in innobase, that latter is aligned with Vasil Dimov of Innobase, the original author. ------------------------------------------------------------ revno: 3119.1.6 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Mon 2010-03-22 16:02:31 +0100 message: Some fixes for the build on Windows as found necessary during the release build of 5.5.3-m3. ------------------------------------------------------------ revno: 3119.1.5 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Tue 2010-03-16 20:10:45 +0100 message: Fix a syntax error: A variable declaration was preceded by "DBUG_PRINT()". ------------------------------------------------------------ revno: 3119.1.4 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Mon 2010-03-15 19:13:37 +0100 message: Fix for bug#51938, extracted from a work-in-progress development branch just for the build of 5.5.3-m3. ------------------------------------------------------------ revno: 3119.1.3 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Mon 2010-03-15 19:01:22 +0100 message: Another case of C++ syntax used for a comment in C. ------------------------------------------------------------ revno: 3119.1.2 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Mon 2010-03-15 18:15:10 +0100 message: This is a temporary hack to build 5.5.3-m3: The "cmake" way still shows issues in our release build environment. Block it temporarily, but in a way that can easily be undone. This change is to be reverted once the problems are solved. ------------------------------------------------------------ revno: 3119.1.1 committer: Joerg Bruehe <joerg@mysql.com> branch nick: clone-5.5 timestamp: Sat 2010-03-13 22:17:47 +0100 message: Fix C++ style comments, they cause syntax errors in C file. ------------------------------------------------------------ revno: 3136 committer: Marc Alff <marc.alff@oracle.com> branch nick: mysql-5.5.4-iplus timestamp: Thu 2010-04-01 10:59:19 -0600 message: Manual port of the following performance schema fixes: - Bug#52134 performance schema file io, symlink in path - Bug#52502 Performance schema does not start with large mutex_instance buffers (including the code review comments) ------------------------------------------------------------ revno: 3135 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-trunk-iplus-build timestamp: Thu 2010-04-01 18:43:08 +0200 message: merge ------------------------------------------------------------ revno: 3129.2.2 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Thu 2010-04-01 20:34:42 +0400 message: A fix for Bug#52432 "Crash in check_table_is_closed on an information_schema query" ------------------------------------------------------------ revno: 3134 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-trunk-iplus-build timestamp: Thu 2010-04-01 17:59:24 +0200 message: Fix for BUG#52502 ------------------------------------------------------------ revno: 3133 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-trunk-iplus-build timestamp: Thu 2010-04-01 16:53:48 +0200 message: Fixed System variable test cases for new InnoDB features ------------------------------------------------------------ revno: 3132 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-5.5.4-iplus timestamp: Thu 2010-04-01 11:02:16 +0200 message: Added new file os0file.ic to ensure source tarballs built properly ------------------------------------------------------------ revno: 3131 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-5.5.4-iplus timestamp: Thu 2010-04-01 10:21:30 +0200 message: Merge in LOCK_open improvements ------------------------------------------------------------ revno: 3129.1.11 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-trunk-lo2 timestamp: Thu 2010-04-01 09:16:59 +0200 message: merge ------------------------------------------------------------ revno: 3129.2.1 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Wed 2010-03-31 23:23:34 +0400 message: Don't query the atomic value of tdc_refresh_version too often. ------------------------------------------------------------ revno: 3129.1.10 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-trunk-lo2 timestamp: Mon 2010-03-29 15:15:07 +0200 message: merge ------------------------------------------------------------ revno: 3121.1.2 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-trunk-fix timestamp: Thu 2010-03-25 10:14:43 +0100 message: Add -fno-exceptions to CXXFLAGS due to CMake check of working C++ compiler ------------------------------------------------------------ revno: 3121.1.1 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-trunk-fix timestamp: Tue 2010-03-23 18:31:24 +0100 message: Temporary fix of build script ------------------------------------------------------------ revno: 3129.1.9 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Sat 2010-03-27 15:06:32 +0300 message: Do not require LOCK_open to protect thd->open_tables. Use THD::LOCK_thd_data instead, which is session-local. This is a little gain in itself, but allows to move LOCK_open acquisition inside free_cache_entry() and rework closefrm() to not require LOCK_open for non-temporary tables as well (it's already not necessary for temporary tables). ------------------------------------------------------------ revno: 3129.1.8 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Sat 2010-03-27 13:14:41 +0300 message: No function call and no mutex if we don't use plugins. ------------------------------------------------------------ revno: 3129.1.7 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Sat 2010-03-27 13:13:39 +0300 message: Do not require LOCK_open to call close_thread_table(). ------------------------------------------------------------ revno: 3129.1.6 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Sat 2010-03-27 13:12:53 +0300 message: If we delete a share because we're above TDC limit (table_definition_cache size), delete the least used share, not the one that we have on our hands (it is not necessarily the least used one). ------------------------------------------------------------ revno: 3129.1.5 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Fri 2010-03-26 21:42:58 +0300 message: Access table definition cache refresh_version through an atomic API. ------------------------------------------------------------ revno: 3129.1.4 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Fri 2010-03-26 14:47:05 +0300 message: A post-review fix for type-aware metadata locks. DDL no longer aborts mysql_lock_tables(), and hence we no longer need to support need_reopen flag of this call. Remove the flag, and all the code in the server that was responsible for handling the case when it was set. This allowed to simplify: open_and_lock_tables_derived(), the delayed thread, multi-update. Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH, since we now only support this flag in open_table(). Rename MYSQL_LOCK_PERF_SCHEMA to MYSQL_LOCK_LOG_TABLE, to avoid confusion. Move the wait for the global read lock for cases when we do updates in SELECT f1() or DO (UPDATE) to open_table() from mysql_lock_tables(). When waiting for the read lock, we could raise need_reopen flag, which is no longer present in mysql_lock_tables(). Since the block responsible for waiting for GRL was moved, MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK was renamed to MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK. ------------------------------------------------------------ revno: 3113.5.1 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-mikael timestamp: Sat 2010-03-13 13:58:27 +0300 message: A review comment for the fix for Bug#46672. Remove unnecessary need_reopen loops. ------------------------------------------------------------ revno: 3129.1.3 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Fri 2010-03-26 14:20:32 +0300 message: Don't hold LOCK_open when opening a table from share: we're protected by a metadata lock, and are not modifying the TABLE_SHARE (almost, @todo: fix share->crashed access). Includes a fix for Bug#52266 "Trying to lock unitialized mutex at storage/myisam/ha_myisam.cc": when we call open_table_from_share() there is almost no reference to the share except the one on MDL_lock, and this can go away quickly if someone releases a lock/table in a concurrent connection. Make sure we conservatively reference the share so that it doesn't disappear while we add a new table to its list of used tables. ------------------------------------------------------------ revno: 3129.1.2 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Fri 2010-03-26 14:17:47 +0300 message: A draft patch that puts back the cached object optimization. Fix lock-multi.test failure. ------------------------------------------------------------ revno: 3129.1.1 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-runtime-exp timestamp: Fri 2010-03-26 14:15:02 +0300 message: A fix and a test case for Bug#52117 "Pending FLUSH TALBES <list> aborts transactions unnecessarily". Fix a crash in FLUSH TABLES <list> WITH READ LOCK when the connection issuing the flush had open SQL HANDLERs. ------------------------------------------------------------ revno: 3130 committer: Mikael Ronstrom <mikael@mysql.com> branch nick: mysql-5.5.4-iplus timestamp: Thu 2010-04-01 10:01:29 +0200 message: InnoDB tree for UC build ------------------------------------------------------------ revno: 3129 committer: Konstantin Osipov <kostja@sun.com> branch nick: trunk-iplus timestamp: Fri 2010-03-19 10:56:52 +0300 message: A fix for failing innodb-lock.test in trunk-iplus. We no longer support innodb-table-locks option. ------------------------------------------------------------ revno: 3128 committer: Tomas Ulin <tomas.ulin@sun.com> branch nick: mysql-trunc-iplus-clean timestamp: Fri 2010-03-19 07:57:17 +0100 message: iplus base - correction innodb_change_buffering_basic ------------------------------------------------------------ revno: 3127 committer: Tomas Ulin <tomas.ulin@sun.com> branch nick: mysql-trunc-iplus-clean timestamp: Thu 2010-03-18 12:13:20 +0100 message: iplus base - correction ------------------------------------------------------------ revno: 3126 committer: Tomas Ulin <tomas.ulin@sun.com> branch nick: mysql-trunc-iplus-clean timestamp: Wed 2010-03-17 14:52:08 +0100 message: iplus patch new test cases ------------------------------------------------------------ revno: 3125 committer: Tomas Ulin <tomas.ulin@sun.com> branch nick: mysql-trunc-iplus-clean timestamp: Wed 2010-03-17 13:05:47 +0100 message: iplus base patch - fixes ------------------------------------------------------------ revno: 3124 committer: Tomas Ulin <tomas.ulin@sun.com> branch nick: mysql-trunc-iplus timestamp: Wed 2010-03-17 12:16:52 +0100 message: iplus base patch 2 ------------------------------------------------------------ revno: 3123 committer: Tomas Ulin <tomas.ulin@sun.com> branch nick: mysql-trunc-iplus timestamp: Wed 2010-03-17 11:59:27 +0100 message: iplus base patch ------------------------------------------------------------ revno: 3122 committer: Tomas Ulin <tomas.ulin@sun.com> branch nick: mysql-trunc-iplus timestamp: Wed 2010-03-17 10:20:51 +0100 message: change commit mailing ------------------------------------------------------------ revno: 3121 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Mon 2010-03-15 19:43:26 +0300 message: Enable ndb and rpl_ndb test suites in daily builds. ------------------------------------------------------------ revno: 3120 author: joerg.bruehe@sun.com committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.5 timestamp: Fri 2010-03-12 21:18:20 +0100 message: Raise version number after cloning 5.5.3-m3 ------------------------------------------------------------ revno: 3119 tags: clone-5.5.3-build committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Fri 2010-03-12 21:11:31 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 3114.1.6 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Fri 2010-03-12 21:08:38 +0300 message: Auto-merge (empty) from mysql-trunk. ------------------------------------------------------------ revno: 3114.1.5 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Fri 2010-03-12 21:04:35 +0300 message: Auto-merge from mysql-next-mr-bugfixing. ------------------------------------------------------------ revno: 3113.3.8 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Fri 2010-03-12 12:42:30 +0000 message: BUG#51716 post push fix. There are two issues fixed here: 1. We needed to update the result file, for some of mysqlbinlog_* tests, because now the some padding chars are not output anymore. 2. We needed to change the Field_string::pack so that for BINARY types the padding chars are not packed (lengthsp will return full length for these types). ------------------------------------------------------------ revno: 3113.3.7 committer: Joerg Bruehe <joerg@mysql.com> branch nick: next-bugfix timestamp: Fri 2010-03-12 10:56:56 +0100 message: Automerge the bug#49022 fix correction into next-mr-bugfixing. ------------------------------------------------------------ revno: 3116.1.3 committer: Joerg Bruehe <joerg@mysql.com> branch nick: bug49022-5.5 timestamp: Thu 2010-03-11 16:37:51 +0100 message: Fix for the bug#49022 patch, detected by further testing. ------------------------------------------------------------ revno: 3113.3.6 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2010-03-11 16:47:34 +0300 message: A fix for Bug#49972 "Crash in prepared statements": The problem is introduced by WL#4435 "Support OUT-parameters in prepared statements". When a statement that has out parameters was reprepared, the reprepare request error was ignored, and an attempt to send out parameters to the client was made. Since the out parameter list was not initialized in case of an error, this attempt led to a crash. Don't try to send out parameters to the client if an error occurred in statement execution. ------------------------------------------------------------ revno: 3113.3.5 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-next-mr-bugfixing-push timestamp: Thu 2010-03-11 11:28:35 +0000 message: Automerge: mysql-next-mr-bugfixing bug branch --> mysql-next-mr-bugfixing latest. ------------------------------------------------------------ revno: 3113.4.2 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-03-10 22:20:39 +0000 message: Fix for BUG#51716 and BUG#51787: test case improvements. Split rpl_row_charset into: - rpl_row_utf16. - rpl_row_utf32. This way these tests can run independently if server supports either one of the charsets but not both. Cleaned up rpl_row_utf32 which had a spurious instruction: -- let $reset_slave_type_conversions= 0 ------------------------------------------------------------ revno: 3113.4.1 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-03-10 17:33:51 +0000 message: Fix for BUG#51716 and BUG#51787. In BUG#51787 we were using the wrong charset to print out the data. We were using the field charset for the string that would hold the information. This caused the assertion, because the string length was not aligned with UTF32 bytes requirements for storage. We fix this by using &my_charset_latin1 in the string object instead of the field->charset(). As a side-effect, we needed to extend the show_sql_type interface so that it took the field charset is now passed as a parameter, so that one is able to calculate the correct field size. In BUG#51716 we had issues with Field_string::pack and Field_string::unpack. When packing, the length was incorrectly calculated. When unpacking, the padding the string would be padded with the wrong bytes (a few bytes less than it should). We fix this by resorting to charset abstractions (functions) that calculate the correct length when packing and pad correctly the string when unpacking. ------------------------------------------------------------ revno: 3113.3.4 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-03-11 14:34:11 +0400 message: An additional fix for WL#1213 4-byte UTF8 - Fixing crash on attempt to create a fulltext index with an utf8mb4 column - fixing wrong border width for supplementary characters in mysql client: mysql --default-character-set=utf8mb4 -e "select concat(_utf32 0x20000,'a')" ------------------------------------------------------------ revno: 3113.3.3 committer: He Zhenxing <zhenxing.he@sun.com> branch nick: next-mr-bugfixing timestamp: Thu 2010-03-11 10:58:20 +0800 message: Auto merge ------------------------------------------------------------ revno: 2914.61.4 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-03-10 15:44:58 -0300 message: Automatic merge. ------------------------------------------------------------ revno: 2914.61.3 committer: Joerg Bruehe <joerg@mysql.com> branch nick: next-bugfix timestamp: Wed 2010-03-10 17:26:49 +0100 message: Automerge into next-mr-bugfixing. ------------------------------------------------------------ revno: 3116.1.2 committer: Joerg Bruehe <joerg@mysql.com> branch nick: bug49022-5.5 timestamp: Wed 2010-03-10 14:36:27 +0100 message: Part of the fixes for bug#49022 Plugins included into bin release cannot be installed on debug version of server Ensure that the plugin files of the debug build get into the optimized tree, so that they find their way into the final RPMs. ------------------------------------------------------------ revno: 2914.61.2 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Wed 2010-03-10 17:58:35 +0300 message: Auto-merge from mysql-next-mr-bugfixing. ------------------------------------------------------------ revno: 3113.1.12 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-03-10 16:35:38 +0300 message: Auto-merge (empty) from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 3113.1.11 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-03-10 16:34:45 +0300 message: Auto-merge (empty) from mysql-next-mr. ------------------------------------------------------------ revno: 2914.61.1 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2010-03-10 17:35:25 +0300 message: A fix and a test case for Bug#51710 FLUSH TABLES <view> WITH READ LOCK kills the server. Prohibit FLUSH TABLES WITH READ LOCK application to views or temporary tables. Fix a subtle bug in the implementation when we actually did not remove table share objects from the table cache after acquiring exclusive locks. ------------------------------------------------------------ revno: 3113.3.2 committer: He Zhenxing <zhenxing.he@sun.com> branch nick: next-mr-bugfixing timestamp: Thu 2010-03-11 10:56:46 +0800 message: Enable rpl_semi_sync test on Windows ------------------------------------------------------------ revno: 3113.3.1 committer: He Zhenxing <zhenxing.he@sun.com> branch nick: next-mr-bugfixing timestamp: Thu 2010-03-11 10:22:18 +0800 message: Auto merge from 5.1-rep-semisync ------------------------------------------------------------ revno: 2661.522.4 committer: He Zhenxing <zhenxing.he@sun.com> branch nick: 5.1-rep-semisync timestamp: Wed 2010-03-10 18:32:21 +0800 message: Post fix for Bug#49557 ------------------------------------------------------------ revno: 2661.522.3 committer: He Zhenxing <zhenxing.he@sun.com> branch nick: 5.1-rep-semisync timestamp: Tue 2010-02-23 17:26:56 +0800 message: Bug#49557 "semisync" plugin test fails on Windows The problem was because the gettimeofday function was incorrect implemented for Windows, and so the semisync master did not wait for slave reply properly on Windows. Fixed by removing the gettimeofday function for Windows, and using set_timespec function to get current time for all platforms. ------------------------------------------------------------ revno: 2661.522.2 committer: He Zhenxing <zhenxing.he@sun.com> branch nick: 5.1-rep-semisync timestamp: Thu 2010-02-04 12:48:47 +0800 message: Auto merge ------------------------------------------------------------ revno: 3114.1.4 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Wed 2010-03-10 16:27:18 +0300 message: Auto-merge (empty) from mysql-trunk. ------------------------------------------------------------ revno: 3118 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Fri 2010-03-12 21:03:40 +0300 message: Auto-merge from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.21.4 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 33669-trunk timestamp: Wed 2010-03-10 10:36:40 -0300 message: Bug#33669: Transactional temporary tables do not work under --read-only The problem was that in read only mode (read_only enabled), the server would mistakenly deny data modification attempts for temporary tables which belong to a transactional storage engine (eg. InnoDB). The solution is to allow transactional temporary tables to be modified under read only mode. As a whole, the read only mode does not apply to any kind of temporary table. ------------------------------------------------------------ revno: 2875.21.3 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Wed 2010-03-10 16:34:12 +0300 message: Auto-merge from mysql-trunk. ------------------------------------------------------------ revno: 3117 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Wed 2010-03-10 16:26:34 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 3114.1.3 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Wed 2010-03-10 16:22:52 +0300 message: Auto-merge from mysql-next-mr-bugfixing. ------------------------------------------------------------ revno: 3113.1.10 committer: Joerg Bruehe <joerg@mysql.com> branch nick: next-bugfix timestamp: Wed 2010-03-10 12:10:21 +0100 message: Automerge part of the fixes for bug#49022 into "next-mr-bugfixing". ------------------------------------------------------------ revno: 3116.1.1 committer: Joerg Bruehe <joerg@mysql.com> branch nick: bug49022-5.5 timestamp: Wed 2010-03-10 10:48:43 +0100 message: Part of the fixes for bug#49022 Plugins included into bin release cannot be installed on debug version of server IF the build process was split into separate "debug" and "optimized" builds AND the plugin files of the debug build got copied into "plugin/debug/" (both is done for MySQL release builds starting from 5.5.3), THEN these debug plugin files are to be included in the final binary package. This change deals with the inclusion only, the other parts are done in different changesets. ------------------------------------------------------------ revno: 3113.1.9 committer: Mats Kindahl <mats@sun.com> branch nick: b49022-next-mr-bugfixing timestamp: Wed 2010-03-10 10:41:19 +0100 message: Merging with mysql-next-mr-bugfixing ------------------------------------------------------------ revno: 2914.60.1 committer: Mats Kindahl <mats@sun.com> branch nick: b49022-next-mr timestamp: Mon 2010-03-01 23:40:24 +0100 message: Bug #49022: Plugins included into bin release cannot be installed on debug version of server When starting a server using mysqld_safe with the option --mysqld-version=debug, the debug version of the server is started. When attempting to load a plugin that is not debug-built, the load will fail because a non-debug built plugin use, e.g., fastmutex while the debug-built server uses safemutex. To solve this problem, mysqld_safe will set the plugin-dir to use a directory where debug-built plugins are placed. This patch sets the plugin dir to <plugin-dir>/whatever, when mysqld-version=whatever, and just <plugin-dir> otherwise. ------------------------------------------------------------ revno: 3113.1.8 committer: Marc Alff <marc.alff@oracle.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-03-09 11:03:02 -0700 message: Bug#51878 Build break in HPUX involving mysql_prlock on a client This is a fix specific for HPUX, for which the compiler does not resolve properly dependencies involving unused inline functions. (See existing comments in mysql_thread.h) In include/mysql/psi/mysql_thread.h, the instrumentation helpers for mysql_prlock_* uses the pr lock apis. These apis are implemented in mysys/thr_rwlock.c, which is not linked to client code. As a result, the code does not link in libmysql_r, on HPUX. The fix is to cut dependencies explicitely, by introducing -DDISABLE_MYSQL_RWLOCK_H, when building client code. ------------------------------------------------------------ revno: 3113.1.7 committer: Tor Didriksen <tor.didriksen@sun.com> branch nick: next-mr-bf-fix50888 timestamp: Tue 2010-03-09 15:54:12 +0100 message: Bug#50888 valgrind warnings in Field_timestamp::val_str Ensure that we store the correct cached_field_type whenever we cache Field items (in this case it allows us to compare dates as dates, rather than strings) ------------------------------------------------------------ revno: 3113.1.6 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-03-09 18:05:19 +0300 message: pfs_upgrade.test is a case-sensitive test. ------------------------------------------------------------ revno: 3113.1.5 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-03-09 13:00:28 +0300 message: Auto-merge from mysql-next-mr-bugfixing. ------------------------------------------------------------ revno: 3113.2.3 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Mon 2010-03-08 00:33:07 +0100 message: merge ------------------------------------------------------------ revno: 2914.49.19 committer: Marc Alff <marc.alff@oracle.com> branch nick: mysql-next-mr-bugfixing-51295-b timestamp: Sun 2010-03-07 10:50:47 -0700 message: Bug#51295 Build warnings in mdl.cc Before this fix, the performance schema instrumentation in mdl.h / mdl.cc was incomplete, causing: - build warnings, - no data collection for the performance schema This fix: - added instrumentation helpers for the new preferred reader read write lock, mysql_prlock_* - implemented completely the performance schema instrumentation of mdl.h / mdl.cc ------------------------------------------------------------ revno: 2914.49.18 committer: Marc Alff <marc.alff@oracle.com> branch nick: mysql-next-mr-bugfixing-51741 timestamp: Sun 2010-03-07 10:41:51 -0700 message: local merge ------------------------------------------------------------ revno: 2914.58.2 committer: Marc Alff <marc.alff@oracle.com> branch nick: mysql-next-mr-bugfixing-51738 timestamp: Sun 2010-03-07 10:21:59 -0700 message: local merge ------------------------------------------------------------ revno: 2914.59.2 committer: Marc Alff <marc.alff@oracle.com> branch nick: mysql-next-mr-bugfixing-45194 timestamp: Sun 2010-03-07 10:10:24 -0700 message: local merge ------------------------------------------------------------ revno: 2914.59.1 committer: Marc Alff <marc.alff@oracle.com> branch nick: mysql-next-mr-bugfixing-45194 timestamp: Fri 2010-03-05 08:31:01 -0700 message: Bug#45194 mysql_upgrade deletes existing data in performance_schema database/schema Before this fix, mysql_upgrade would always drop and re create the performance_schema database. This in theory could destroy user data created using 5.1 or older versions. With this fix, mysql_upgrade checks the content of the performance_schema database before droping it. ------------------------------------------------------------ revno: 2914.58.1 committer: Marc Alff <marc.alff@oracle.com> branch nick: mysql-next-mr-bugfixing-51738 timestamp: Thu 2010-03-04 18:36:54 -0700 message: Bug#51738 Unit test pfs_instr-t crashes The unit test pfs_instr-t: - generates a very long (10,000) bytes file name - calls find_or_create_file. This leads to a buffer overflow in mysys in my_realpath(), because my_realpath and mysys file APIs in general do not test for input parameters: mysys assumes every file name is less that FN_REFLEN in length. Calling find_or_create_file with a very long file name is likely to happen when instrumenting third party code that does not use mysys, so this test is legitimate. The fix is to make find_or_create_file in the performance schema more robust in this case. ------------------------------------------------------------ revno: 2914.49.17 committer: Marc Alff <marc.alff@oracle.com> branch nick: mysql-next-mr-bugfixing-51741 timestamp: Thu 2010-03-04 18:10:27 -0700 message: Bug#51741 Unit test pfs-t failing in mysql-next-mr-bugfixing The root cause of the failure is that when Bug#51447 performance schema evil twin files was fixed, instrumented file names got normalized. The pfs-t unit test depends on this file normalization, but it was not updated. This fix aligns pfs-t.cc lookup_file_by_name() with the logic in pfs_instr.cc find_or_create_file(). ------------------------------------------------------------ revno: 3113.2.2 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Mon 2010-03-08 00:31:06 +0100 message: Fix typo (CMAKE_SIZEOF_VOIDP=>CMAKE_SIZEOF_VOID_P) ------------------------------------------------------------ revno: 3113.2.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Sat 2010-03-06 20:22:04 +0100 message: Bug #51511 MTRv1 unable to find mysqld binary in out-of-source cmake builds Set $glob_bindir, like $bindir in v2 Removed some obsolete IM code rather than changing it ------------------------------------------------------------ revno: 3113.1.4 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-03-09 12:57:58 +0300 message: Auto-merge from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.21.2 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Tue 2010-03-09 12:57:04 +0300 message: Auto-merge from mysql-trunk. ------------------------------------------------------------ revno: 3113.1.3 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-03-09 12:57:11 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 3113.1.2 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Sat 2010-03-06 14:05:50 +0300 message: Auto-merge (empty) from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.21.1 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Sat 2010-03-06 13:49:16 +0300 message: Auto-merge from mysql-trunk. ------------------------------------------------------------ revno: 3113.1.1 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Sat 2010-03-06 13:48:21 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 3114.1.2 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Tue 2010-03-09 12:53:13 +0300 message: Auto-merge from mysql-trunk. ------------------------------------------------------------ revno: 3114.1.1 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Sat 2010-03-06 13:39:56 +0300 message: Merge from mysql-trunk. ------------------------------------------------------------ revno: 3116 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Tue 2010-03-09 12:52:11 +0300 message: Bug#51832 mysql_upgrade failing on performance_schema tables in mysql-trunk Before this fix, client tools (mysql_upgrade, mysqlcheck, mysqldump) would try to process performance schema tables, leading to failures. The fix is to align FIRST_PERFORMANCE_SCHEMA_VERSION to 5.5.3, which is the version number of mysql-trunk where the performance schema is first available. ------------------------------------------------------------ revno: 3115 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Sat 2010-03-06 13:38:49 +0300 message: Fix version & default.conf. ------------------------------------------------------------ revno: 3114 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Sat 2010-03-06 13:26:38 +0300 message: Merge from mysql-trunk. ------------------------------------------------------------ revno: 2875.18.4 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Sat 2010-03-06 13:25:14 +0300 message: Fix default.conf. ------------------------------------------------------------ revno: 3113 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Sat 2010-03-06 13:22:16 +0300 message: Auto-merge (empty) from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.18.3 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Sat 2010-03-06 13:20:40 +0300 message: Auto-merge from mysql-trunk. ------------------------------------------------------------ revno: 3112 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Sat 2010-03-06 13:20:51 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 3097.1.19 committer: Joerg Bruehe <joerg@mysql.com> branch nick: mysql-next-mr timestamp: Thu 2010-03-04 14:55:08 +0100 message: Upmerge changes to "COPYING" (formatting, FSF addressi, still GPL v2 as of 1991) and "README" (header part: "This is a release of MySQL ...") from "trunk" to "next-mr". ------------------------------------------------------------ revno: 2875.20.11 committer: Joerg Bruehe <joerg@mysql.com> branch nick: mysql-5.5 timestamp: Thu 2010-03-04 14:45:11 +0100 message: Update "README" (the list of contributed software and their licenses) by adding the header part "This is MySQL ...". ------------------------------------------------------------ revno: 2875.20.10 committer: Joerg Bruehe <joerg@mysql.com> branch nick: mysql-5.5 timestamp: Thu 2010-03-04 14:35:14 +0100 message: Upmerge the new formatting of "COPYING" from 5.1 to "trunk", the license remains to be the GPL Version 2, June 1991 ------------------------------------------------------------ revno: 2661.552.21 committer: Joerg Bruehe <joerg@mysql.com> branch nick: mysql-5.1 timestamp: Thu 2010-03-04 14:26:27 +0100 message: Use a new version of "COPYING", the GPL text. This is *no* change in contents, the differences are formatting only and an address update of the FSF. It continues to be Version 2, June 1991. ------------------------------------------------------------ revno: 3111 committer: Guilhem Bichot <guilhem@mysql.com> branch nick: mysql-next-mr-bugfixing3 timestamp: Fri 2010-03-05 14:08:21 +0100 message: Fix for BUG#51215 "log-error partially works with version 5.5": WL 4738 (reengineering of server variables) had broken the 5.1 behaviour of --log-error: --log-error without argument sent to stderr instead of writing to a file with an autogenerated name. ------------------------------------------------------------ revno: 3110 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Fri 2010-03-05 12:28:45 +0300 message: Make funcs_1.myisam_views experimental on Solaris due to Bug 50595. ------------------------------------------------------------ revno: 3109 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Fri 2010-03-05 12:17:19 +0400 message: Fixing non-determenistic results. ------------------------------------------------------------ revno: 3108 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bar2 timestamp: Thu 2010-03-04 18:39:32 +0300 message: Auto-merge from mysql-next-mr-bugfixing. ------------------------------------------------------------ revno: 2914.49.16 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Thu 2010-03-04 18:34:29 +0300 message: Auto-merge from mysql-next-mr-bugfixing. ------------------------------------------------------------ revno: 2914.55.8 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing-deprecation timestamp: Wed 2010-03-03 22:22:02 +0300 message: A follow-up on WL#5154 and WL#5182: remove forgotten options. ------------------------------------------------------------ revno: 2914.55.7 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-03-03 16:06:14 +0100 message: merge ------------------------------------------------------------ revno: 2914.57.1 committer: Mattias Jonsson <mattias.jonsson@sun.com> branch nick: topush-mysql-next-mr-bugfixing timestamp: Wed 2010-03-03 15:58:12 +0100 message: Fix for debug print of null string (fails on pb for solaris debug_max) ------------------------------------------------------------ revno: 2914.55.6 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-03-03 15:48:54 +0100 message: merge ------------------------------------------------------------ revno: 3096.2.4 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Wed 2010-03-03 12:29:34 +0100 message: Bug #51488 :missing features and change behavior in cmake runs compared to autotools runs - Fix recognition of --with-debug=full in configure wrapper - Remove CMakeCache.txt in configure wrapper, to match the original - Fix recognition of max-no-ndb - Fix broken dependencies of mysql_fix_privilege_table.sql from mysql_system_tables.sql and mysql_system_tables_fix.sql - Add "distclean target" that informs user about appropriate bzr command ------------------------------------------------------------ revno: 3096.2.3 committer: Vladislav Vaintroub<wlad@sun.com> branch nick: mysql-next-mr-cmake timestamp: Tue 2010-03-02 06:13:06 +0100 message: merge ------------------------------------------------------------ revno: 3096.2.2 committer: Vladislav Vaintroub<wlad@sun.com> branch nick: mysql-next-mr-cmake timestamp: Sat 2010-02-27 17:21:50 +0100 message: merge ------------------------------------------------------------ revno: 3096.2.1 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Tue 2010-02-23 14:42:18 +0100 message: merge ------------------------------------------------------------ revno: 2914.55.5 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-03-03 12:43:30 +0100 message: Fix a problem reported by Alik: when cmake is used for building in a symlinked directory, and confguration is later adjusted with "cmake-gui ." After it, GenServerSource fails with "no rule for <filename>". The reason for the error is that cmake-gui resolves "." as realpath and rules are generated accordingly, while "cmake" used symlinked path The fix uses ${CMAKE_CURRENT_BINARY_DIR} instead of ${CMAKE_BINARY_DIR}/sql for generated files. This causes CMake to use relative file names so relative file names when generating make rules. Using relative filenames avoids the problem of refering to the same directory using 2 different paths. Besides, using ${CMAKE_CURRENT_BINARY_DIR} is a commonly used style when working with generated files. ------------------------------------------------------------ revno: 2914.55.4 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-03-02 17:37:50 +0300 message: Auto-merge (empty) from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.18.2 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Tue 2010-03-02 17:32:48 +0300 message: Auto-merge from mysql-trunk. ------------------------------------------------------------ revno: 2914.55.3 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-03-02 17:34:50 +0300 message: Manual merge from mysql-next-mr. Conflicts: - sql/sql_base.cc ------------------------------------------------------------ revno: 3097.1.18 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Tue 2010-03-02 10:24:32 +0300 message: Auto-merge from mysql-trunk-merge. ------------------------------------------------------------ revno: 2875.20.9 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-merge timestamp: Tue 2010-03-02 10:22:33 +0300 message: Remove test from experimental because Bug 45578 and 46010 are fixed. ------------------------------------------------------------ revno: 3097.1.17 committer: Mattias Jonsson <mattias.jonsson@sun.com> branch nick: topush-mysql-next-merge timestamp: Tue 2010-03-02 00:52:33 +0100 message: merge ------------------------------------------------------------ revno: 3097.2.1 committer: Mattias Jonsson <mattias.jonsson@sun.com> branch nick: test-mysql-next-mr-merge_2 timestamp: Tue 2010-03-02 00:05:30 +0100 message: manual merge fix of bug#42438 in mysql-next-mr-merge ------------------------------------------------------------ revno: 3097.1.16 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 21:56:54 +0300 message: Auto-merge from mysql-trunk-merge. ------------------------------------------------------------ revno: 2875.20.8 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-merge timestamp: Mon 2010-03-01 21:49:06 +0300 message: Manual merge from mysql-5.1. Conflicts: - support-files/mysql.spec.sh - configure.in ------------------------------------------------------------ revno: 2661.552.20 author: hery.ramilison@sun.com committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.1 timestamp: Mon 2010-03-01 11:58:26 +0100 message: Raise version number after cloning 5.1.45 ------------------------------------------------------------ revno: 2661.552.19 tags: clone-5.1.45-build committer: Joerg Bruehe <joerg@mysql.com> branch nick: mysql-5.1 timestamp: Mon 2010-03-01 11:42:44 +0100 message: Spec file for RPMs: Now that Oracle has legally acquired Sun, change the copyright owner and the vendor. ------------------------------------------------------------ revno: 3097.1.15 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 13:15:52 +0300 message: Auto-merge from mysql-trunk-merge. ------------------------------------------------------------ revno: 2875.20.7 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-merge timestamp: Mon 2010-03-01 13:11:57 +0300 message: Auto-merge from mysql-trunk. ------------------------------------------------------------ revno: 3097.1.14 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 13:14:34 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 2914.56.5 committer: Joerg Bruehe <joerg@mysql.com> branch nick: mysql-next-mr timestamp: Mon 2010-03-01 10:27:30 +0100 message: Upmerge README change from "trunk" to "next-mr". ------------------------------------------------------------ revno: 2875.17.8 committer: Joerg Bruehe <joerg@mysql.com> branch nick: mysql-5.5 timestamp: Mon 2010-03-01 10:19:39 +0100 message: Update the README file for new contributed software, as provided by Trudy Pelzer. ------------------------------------------------------------ revno: 3097.1.13 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 13:07:42 +0300 message: Disable partition_debug_sync temporarily awaiting a patch from Mattias. ------------------------------------------------------------ revno: 3097.1.12 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 13:07:06 +0300 message: Add configure.am to .bzrignore. ------------------------------------------------------------ revno: 3097.1.11 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 13:06:11 +0300 message: Manual merge from mysql-next-mr. Conflicts: - sql/item.cc ------------------------------------------------------------ revno: 2914.56.4 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar timestamp: Sat 2010-02-27 11:43:32 +0400 message: Mergine from mysql-next-me ------------------------------------------------------------ revno: 2914.56.3 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar.w2649v4 timestamp: Fri 2010-02-26 10:28:44 +0400 message: After-fix for WL#2649 Number-to-string conversion. This change fixes test failure for partition_repair_myisam and partition_recover_myisam. The problem was that: - the file std_data/corrupt_crash.MYI contains charsetnr=63 (binary) for index segments. - the new .frm file contains charsetnr=8 (latin1) for the same segments. As a result REPAIR refused to repair frm+MYI files with different segment definition. This fix restores the old behavior for frm and MYI files: they now store charsetnr=63 for numeric/datetime data types. ------------------------------------------------------------ revno: 2914.56.2 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar.w2649v4 timestamp: Thu 2010-02-11 18:28:28 +0400 message: A post-fix for WL#2649 Number-to-string conversion Fixing problems discovered by "mtr --embedded" and "mtr --ps" @ libmysqld/lib_sql.cc "mtr --embedded --do-test=ps" failed. Applying a similar change to the one previously done in protocol.cc, to make embedded version work the same with client/server version. (a bug in the WL#2649 patch) @ mysql-test/include/ctype_numconv.inc @ mysql-test/r/ctype_binary.result @ mysql-test/r/ctype_cp1251.result @ mysql-test/r/ctype_latin1.result @ mysql-test/r/ctype_ucs.result - Changing tinyint(30) to tinyint(4) due to problems with "mtr --ps" Possibly a bug in libmysql.cc, in function fetch_long_with_conversion(). Zerofill buffer is to short. - Commenting tests with get_lock/release_lock "mtr --ps" failed for some reasons in ctype_cp1251. ------------------------------------------------------------ revno: 2914.56.1 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar.w2649v4 timestamp: Thu 2010-02-11 08:17:25 +0400 message: WL#2649 Number-to-string conversions added: include/ctype_numconv.inc mysql-test/include/ctype_numconv.inc mysql-test/r/ctype_binary.result mysql-test/t/ctype_binary.test Adding tests modified: mysql-test/r/bigint.result mysql-test/r/case.result mysql-test/r/create.result mysql-test/r/ctype_cp1251.result mysql-test/r/ctype_latin1.result mysql-test/r/ctype_ucs.result mysql-test/r/func_gconcat.result mysql-test/r/func_str.result mysql-test/r/metadata.result mysql-test/r/ps_1general.result mysql-test/r/ps_2myisam.result mysql-test/r/ps_3innodb.result mysql-test/r/ps_4heap.result mysql-test/r/ps_5merge.result mysql-test/r/show_check.result mysql-test/r/type_datetime.result mysql-test/r/type_ranges.result mysql-test/r/union.result mysql-test/suite/ndb/r/ps_7ndb.result mysql-test/t/ctype_cp1251.test mysql-test/t/ctype_latin1.test mysql-test/t/ctype_ucs.test mysql-test/t/func_str.test Fixing tests @ sql/field.cc - Return str result using my_charset_numeric. - Using real multi-byte aware str_to_XXX functions to handle tricky charset values propely (e.g. UCS2) @ sql/field.h - Changing derivation of non-string field types to DERIVATION_NUMERIC. - Changing binary() for numeric/datetime fields to always return TRUE even if charset is not my_charset_bin. We need this to keep ha_base_keytype() return HA_KEYTYPE_BINARY. - Adding BINARY_FLAG into some fields, because it's not being set automatically anymore with "my_charset_bin to my_charset_numeric" change. - Changing derivation for numeric/datetime datatypes to a weaker value, to make "SELECT concat('string', field)" use character set of the string literal for the result of the function. @ sql/item.cc - Implementing generic val_str_ascii(). - Using max_char_length() instead of direct read of max_length to make "tricky" charsets like UCS2 work. NOTE: in the future we'll possibly remove all direct reads of max_length - Fixing Item_num::safe_charset_converter(). Previously it alligned binary string to character string (for example by adding leading 0x00 when doing binary->UCS2 conversion). Now it just converts from my_charset_numbner to "tocs". - Using val_str_ascii() in Item::get_time() to make UCS2 arguments work. - Other misc changes @ sql/item.h - Changing MY_COLL_CMP_CONV and MY_COLL_ALLOW_CONV to bit operations instead of hard-coded bit masks. - Addding new method DTCollation.set_numeric(). - Adding new methods to Item. - Adding helper functions to make code look nicer: agg_item_charsets_for_string_result() agg_item_charsets_for_comparison() - Changing charset for Item_num-derived items from my_charset_bin to my_charset_numeric (which is an alias for latin1). @ sql/item_cmpfunc.cc - Using new helper functions - Other misc changes @ sql/item_cmpfunc.h - Fixing strcmp() to return max_length=2. Previously it returned 1, which was wrong, because it did not fit '-1'. @ sql/item_func.cc - Using new helper functions - Other minor changes @ sql/item_func.h - Removing unused functions - Adding helper functions agg_arg_charsets_for_string_result() agg_arg_charsets_for_comparison() - Adding set_numeric() into constructors of numeric items. - Using fix_length_and_charset() and fix_char_length() instead of direct write to max_length. @ sql/item_geofunc.cc - Changing class for Item_func_geometry_type and Item_func_as_wkt from Item_str_func to Item_str_ascii_func, to make them return UCS2 result properly (when character_set_connection=ucs2). @ sql/item_geofunc.h - Changing class for Item_func_geometry_type and Item_func_as_wkt from Item_str_func to Item_str_ascii_func, to make them return UCS2 result properly (when @@character_set_connection=ucs2). @ sql/item_strfunc.cc - Implementing Item_str_func::val_str(). - Renaming val_str to val_str_ascii for some items, to make them work with UCS2 properly. - Using new helper functions - All single-argument functions that expect string result now call this method: agg_arg_charsets_for_string_result(collation, args, 1); This enables character set conversion to @@character_set_connection in case of pure numeric input. @ sql/item_strfunc.h - Introducing Item_str_ascii_func - for functions which return pure ASCII data, for performance purposes, as well as for the cases when the old implementation of val_str() was heavily 8-bit oriented and implementing a UCS2-aware version is tricky. @ sql/item_sum.cc - Using new helper functions. @ sql/item_timefunc.cc - Using my_charset_numeric instead of my_charset_bin. - Using fix_char_length(), fix_length_and_charset() and fix_length_and_charset_datetime() instead of direct write to max_length. - Using tricky-charset aware function str_to_time_with_warn() @ sql/item_timefunc.h - Using new helper functions for charset and length initialization. - Changing base class for Item_func_get_format() to make it return UCS2 properly (when character_set_connection=ucs2). @ sql/item_xmlfunc.cc - Using new helper function @ sql/my_decimal.cc - Adding a new DECIMAL to CHAR converter with real multibyte support (e.g. UCS2) @ sql/mysql_priv.h - Introducing a new derivation level for numeric/datetime data types. - Adding macros for my_charset_numeric and MY_REPERTOIRE_NUMERIC. - Adding prototypes for str_set_decimal() - Adding prototypes for character-set aware str_to_xxx() functions. @ sql/protocol.cc - Changing charsetnr to "binary" client-side metadata for numeric/datetime data types. @ sql/time.cc - Adding to_ascii() helper function, to convert a string in any character set to ascii representation. In the future can be extended to understand digits written in various non-Latin word scripts. - Adding real multy-byte character set aware versions for str_to_XXXX, to make these these type of queries work correct: INSERT INTO t1 SET datetime_column=ucs2_expression; @ strings/ctype-ucs2.c - endptr was not calculated correctly. INSERTing of UCS2 values into numeric columns returned warnings about truncated wrong data. ------------------------------------------------------------ revno: 3097.1.10 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 12:49:29 +0300 message: Auto-merge (empty) from mysql-trunk-merge. ------------------------------------------------------------ revno: 2875.20.6 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-merge timestamp: Mon 2010-03-01 12:47:21 +0300 message: Auto-merge (empty) from mysql-trunk. ------------------------------------------------------------ revno: 3097.1.9 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 12:45:36 +0300 message: Manual merge (empty) from mysql-trunk-merge. Conflicts: - scripts/mysqld_multi.sh - sql/item_timefunc.cc ------------------------------------------------------------ revno: 2875.20.5 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-merge timestamp: Mon 2010-03-01 12:02:15 +0300 message: Auto-merge from mysql-5.1. ------------------------------------------------------------ revno: 2661.552.18 committer: Georgi Kodinov <joro@sun.com> branch nick: merge-5.1-bugteam timestamp: Mon 2010-03-01 10:38:27 +0200 message: merge ------------------------------------------------------------ revno: 1810.3988.4 committer: Georgi Kodinov <joro@sun.com> branch nick: merge-5.0-bugteam timestamp: Mon 2010-03-01 10:35:14 +0200 message: tree version change ------------------------------------------------------------ revno: 2661.552.17 committer: Georgi Kodinov <joro@sun.com> branch nick: merge-5.1-bugteam timestamp: Mon 2010-03-01 10:37:38 +0200 message: merge ------------------------------------------------------------ revno: 2661.558.2 committer: Georgi Kodinov <joro@sun.com> branch nick: B51468-5.1-bugteam timestamp: Fri 2010-02-26 14:49:13 +0200 message: Bug #51468: mysqld_multi is broken in 5.1.44 Fixed a syntax error in mysqld_multi.sh ------------------------------------------------------------ revno: 2661.552.16 committer: Georgi Kodinov <joro@sun.com> branch nick: merge-5.1-bugteam timestamp: Fri 2010-02-26 15:16:46 +0200 message: merge 5.0-bugteam -> 5.1-bugteam ------------------------------------------------------------ revno: 1810.3988.3 committer: Georgi Kodinov <joro@sun.com> branch nick: merge-5.0-bugteam timestamp: Fri 2010-02-26 15:10:25 +0200 message: merge ------------------------------------------------------------ revno: 1810.3982.9 author: sunanda.menon@sun.com committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0 timestamp: Sat 2010-02-20 18:08:35 +0100 message: Null-merge from mysql-5.0.87sp1-release ------------------------------------------------------------ revno: 1810.3962.19 tags: mysql-5.0.87sp1 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:43:18 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2840 [merge] > revision-id: ramil@mysql.com-20100113101142-pda4phrsyh1rjp85 > parent: joerg@mysql.com-20100112114118-zfpofgcu0j49j839 > parent: ramil@mysql.com-20100113052045-een35iazzk8023w2 > committer: Ramil Kalimullin <ramil@mysql.com> > branch nick: mysql-5.0-bugteam > timestamp: Wed 2010-01-13 14:11:42 +0400 > message: > Auto-merge. > ------------------------------------------------------------ > Use --include-merges or -n0 to see merged revisions. ------------------------------------------------------------ revno: 1810.3962.18 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:42:25 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.48 > revision-id: joro@sun.com-20091210092838-zbz9ugqay1tn7rxm > parent: joro@sun.com-20091207143856-ojmmqr0bm1haxvca > committer: Georgi Kodinov <joro@sun.com> > branch nick: B49250-5.0-bugteaam > timestamp: Thu 2009-12-10 11:28:38 +0200 > message: > Bug #49250 : spatial btree index corruption and crash > > SPATIAL and FULLTEXT indexes don't support algorithm > selection. > Disabled by creating a special grammar rule for these > in the parser. > Added some encasulation of duplicate parser code. ------------------------------------------------------------ revno: 1810.3962.17 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:41:24 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.41 [merge] > revision-id: epotemkin@mysql.com-20091203132153-k8xwk3nh02n8npg4 > parent: epotemkin@mysql.com-20091202134712-4muwnr152xqkcwm7 > parent: epotemkin@mysql.com-20091203131520-93uiop1a81o9z8mb > committer: Evgeny Potemkin <epotemkin@mysql.com> > branch nick: mysql-5.0-bugteam > timestamp: Thu 2009-12-03 16:21:53 +0300 > message: > Auto-merged. > ------------------------------------------------------------ > Use --include-merges or -n0 to see merged revisions. ------------------------------------------------------------ revno: 1810.3962.16 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:40:24 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.40 [merge] > revision-id: epotemkin@mysql.com-20091202134712-4muwnr152xqkcwm7 > parent: gshchepa@mysql.com-20091201102444-yw166t3audrojo9s > parent: epotemkin@mysql.com-20091201182845-aw0uawt6c6gwi98c > committer: Evgeny Potemkin <epotemkin@mysql.com> > branch nick: mysql-5.0-bugteam > timestamp: Wed 2009-12-02 16:47:12 +0300 > message: > Auto-merged fix for the bug#48508. > ------------------------------------------------------------ > Use --include-merges or -n0 to see merged revisions. ------------------------------------------------------------ revno: 1810.3962.15 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:38:46 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.39 > revision-id: gshchepa@mysql.com-20091201102444-yw166t3audrojo9s > parent: joro@sun.com-20091127160731-6h2fahbh4409i841 > committer: Gleb Shchepa <gshchepa@mysql.com> > branch nick: mysql-5.0-bugteam > timestamp: Tue 2009-12-01 14:24:44 +0400 > message: > Bug #38883 (reopened): thd_security_context is not thread safe, crashes? > > The bug 38816 changed the lock that protects THD::query from > LOCK_thread_count to LOCK_thd_data, but didn't update the associated > InnoDB functions. > > 1. The innobase_mysql_prepare_print_arbitrary_thd and the > innobase_mysql_end_print_arbitrary_thd InnoDB functions have been > removed, since now we have a per-thread mutex: now we don't need to wrap > several inter-thread access tries to THD::query with a single global > LOCK_thread_count lock, so we can simplify the code. > > 2. The innobase_mysql_print_thd function has been modified to lock > LOCK_thd_data in direct way. ------------------------------------------------------------ revno: 1810.3962.14 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:37:47 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.38 > revision-id: joro@sun.com-20091127160731-6h2fahbh4409i841 > parent: joro@sun.com-20091127143622-bqfsmhhr2pqodsm2 > committer: Georgi Kodinov <joro@sun.com> > branch nick: fix-5.0-bugteam > timestamp: Fri 2009-11-27 18:07:31 +0200 > message: > Addendum to bug #48872: disable output in the test case because errors are > dependent on the case mode ------------------------------------------------------------ revno: 1810.3962.13 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:36:20 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.35 > revision-id: joro@sun.com-20091127095944-autr58itccge4z9l > parent: satya.bn@sun.com-20091125095925-871384fcnwwa2yqt > committer: Georgi Kodinov <joro@sun.com> > branch nick: B48872-5.0-bugteam > timestamp: Fri 2009-11-27 11:59:44 +0200 > message: > Bug #48872 : Privileges for stored functions ignored if function name > is mixed case > > Transcode the procedure name to lowercase when searching for it in the > hash. This is the missing part of the fix for bug #41049. ------------------------------------------------------------ revno: 1810.3962.12 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:34:46 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.29 > revision-id: joro@sun.com-20091118152410-j4tv22vf9xkb6sdz > parent: kent.boortz@sun.com-20091117164924-rscth12t9a2qog1b > committer: Georgi Kodinov <joro@sun.com> > branch nick: test-5.0-bugteam > timestamp: Wed 2009-11-18 17:24:10 +0200 > message: > Bug#48864: MySQL fails to compile on 64 bit Fedora 12 > > Fixed 2 errors in comp_err executable : > 1. Wrong (off by 1) length passed to my_checksum() > 2. strmov() was used on overlapping strings. This is > not legal according to the docs in stpcpy(). Used > the overlap safe memmove() instead. ------------------------------------------------------------ revno: 1810.3962.11 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:33:14 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.26 > revision-id: joro@sun.com-20091109140946-07wao5od7l1vn4x1 > parent: joro@sun.com-20091110082141-ldr8p6s1joczve2j > committer: Georgi Kodinov <joro@sun.com> > branch nick: B48458-5.0-bugteam > timestamp: Mon 2009-11-09 16:09:46 +0200 > message: > Bug #48458: simple query tries to allocate enormous amount of > memory > > The server was doing a bad class typecast causing setting of > wrong value for the maximum number of items in an internal > structure used in equality propagation. > Fixed by not doing the wrong typecast and asserting the type > of the Item where it should be done. ------------------------------------------------------------ revno: 1810.3962.10 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:32:15 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.19 > revision-id: kostja@sun.com-20091103165854-7di545xruez8w207 > parent: li-bing.song@sun.com-20091103090041-zj7nedx6ok5jgges > committer: Konstantin Osipov <kostja@sun.com> > branch nick: 5.0-41756 > timestamp: Tue 2009-11-03 19:58:54 +0300 > message: > A fix and a test case for > Bug#41756 "Strange error messages about locks from InnoDB". > > In JT_EQ_REF (join_read_key()) access method, > don't try to unlock rows in the handler, unless certain that > a) they were locked > b) they are not used. > > Unlocking of rows is done by the logic of the nested join loop, > and is unaware of the possible caching that the access method may > have. This could lead to double unlocking, when a row > was unlocked first after reading into the cache, and then > when taken from cache, as well as to unlocking of rows which > were actually used (but taken from cache). > > Delegate part of the unlocking logic to the access method, > and in JT_EQ_REF count how many times a record was actually > used in the join. Unlock it only if it's usage count is 0. > > Implemented review comments. ------------------------------------------------------------ revno: 1810.3962.9 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:31:14 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.18 > revision-id: li-bing.song@sun.com-20091103090041-zj7nedx6ok5jgges > parent: davi.arnaut@sun.com-20091102201021-1brn7cjb1kvqg9gr > committer: <Li-Bing.Song@sun.com> > branch nick: mysql-5.0-bugteam > timestamp: Tue 2009-11-03 17:00:41 +0800 > message: > BUG#48216 Replication fails on all slaves after upgrade to 5.0.86 on master > > When a sessione is closed, all temporary tables of the session are automatically > dropped and are binlogged. But it will be binlogged with wrong database names when > the length of the temporary tables' database names are greater than the > length of the current database name or the current database is not set. > > Query_log_event's db_len is forgot to set when Query_log_event's db is set. > This patch wrote code to set db_len immediately after db has set. ------------------------------------------------------------ revno: 1810.3962.8 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:29:49 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.4.1 > revision-id: alexey.kopytov@sun.com-20091030155453-0vlfwki805h9os62 > parent: joerg@mysql.com-20091016122941-rf6z0keqvmlgjfto > committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> > branch nick: my50-bug48131 > timestamp: Fri 2009-10-30 18:54:53 +0300 > message: > Bug #48131: crash group by with rollup, distinct, filesort, > with temporary tables > > There were two problems the test case from this bug was > triggering: > > 1. JOIN::rollup_init() was supposed to wrap all constant Items > into another object for queries with the WITH ROLLUP modifier > to ensure they are never considered as constants and therefore > are written into temporary tables if the optimizer chooses to > employ them for DISTINCT/GROUP BY handling. > > However, JOIN::rollup_init() was called before > make_join_statistics(), so Items corresponding to fields in > const tables could not be handled as intended, which was > causing all kinds of problems later in the query execution. In > particular, create_tmp_table() assumed all constant items > except "hidden" ones to be removed earlier by remove_const() > which led to improperly initialized Field objects for the > temporary table being created. This is what was causing crashes > and valgrind errors in storage engines. > > 2. Even when the above problem had been fixed, the query from > the test case produced incorrect results due to some > DISTINCT/GROUP BY optimizations being performed by the > optimizer that are inapplicable in the WITH ROLLUP case. > > Fixed by disabling inapplicable DISTINCT/GROUP BY optimizations > when the WITH ROLLUP modifier is present, and splitting the > const-wrapping part of JOIN::rollup_init() into a separate > method which is now invoked after make_join_statistics() when > the const tables are already known. ------------------------------------------------------------ revno: 1810.3962.7 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:28:51 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.13 > revision-id: joro@sun.com-20091030131543-2b23fnqckgbzvete > parent: joro@sun.com-20091030094044-quadg0bwjy7cwqzw > committer: Georgi Kodinov <joro@sun.com> > branch nick: B48291-5.0-bugteam > timestamp: Fri 2009-10-30 15:15:43 +0200 > message: > Bug #48291 : crash with row() operator,select into @var, and > subquery returning multiple rows > > Error handling was missing when handling subqueires in WHERE > and when assigning a SELECT result to a @variable. > This caused crash(es). > > Fixed by adding error handling code to both the WHERE > condition evaluation and to assignment to an @variable. ------------------------------------------------------------ revno: 1810.3962.6 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:27:27 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.12 > revision-id: joro@sun.com-20091030094044-quadg0bwjy7cwqzw > parent: joro@sun.com-20091029152429-ks55fhrp4lhknyij > committer: Georgi Kodinov <joro@sun.com> > branch nick: B48293-5.0-bugteam > timestamp: Fri 2009-10-30 11:40:44 +0200 > message: > Bug #48293: crash with procedure analyse, view with > 10 columns, > having clause... > > The fix for bug 46184 was not very complete. It was not covering > views using temporary tables and multiple tables in a FROM clause. > Fixed by reverting the fix for 46184 and making a more general > check that is checking at the right execution stage and for all > of the non-supported cases. > Now PROCEDURE ANALYZE on non-top level SELECT is also forbidden. > Updated the analyse.test and subselect.test accordingly. ------------------------------------------------------------ revno: 1810.3962.5 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:26:24 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.6 > revision-id: joro@sun.com-20091021084345-iki6z0uceieoupey > parent: ramil@mysql.com-20091023112648-gie6o3odj57cxh1e > committer: Georgi Kodinov <joro@sun.com> > branch nick: B47780-5.0-bugteam > timestamp: Wed 2009-10-21 11:43:45 +0300 > message: > Bug #47780: crash when comparing GIS items from subquery > > If the first argument to GeomFromWKB function is a geometry > field then the function just returns its value. > However in doing so it's not preserving first argument's > null_value flag and this causes unexpected null value to > be returned to the calling function. > > Fixed by updating the null_value of the GeomFromWKB function > in such cases (and all other cases that return a NULL e.g. > because of not enough memory for the return buffer). ------------------------------------------------------------ revno: 1810.3962.4 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:25:25 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.5 > revision-id: ramil@mysql.com-20091023112648-gie6o3odj57cxh1e > parent: ramil@mysql.com-20091021090408-208mvwwrcroi2j8c > committer: Ramil Kalimullin <ramil@mysql.com> > branch nick: b48258-5.0-bugteam > timestamp: Fri 2009-10-23 16:26:48 +0500 > message: > Fix for bug#48258: Assertion failed when using a spatial index > > Problem: involving a spatial index for "non-spatial" queries > (that don't containt MBRXXX() functions) may lead to failed assert. > > Fix: don't use spatial indexes in such cases. ------------------------------------------------------------ revno: 1810.3962.3 committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Wed 2010-02-03 16:23:26 +0100 message: Backport into build-201002030816-5.0.87sp1 > ------------------------------------------------------------ > revno: 2818.1.4 > revision-id: ramil@mysql.com-20091021090408-208mvwwrcroi2j8c > parent: azundris@mysql.com-20091021033856-ydodp4q42o58e7ka > committer: Ramil Kalimullin <ramil@mysql.com> > branch nick: b47019-5.0-bugteam > timestamp: Wed 2009-10-21 14:04:08 +0500 > message: > Fix for bug#47019: Assertion failed: 0, file .\rt_mbr.c, > line 138 when forcing a spatial index > > Problem: "Spatial indexes can be involved in the search > for queries that use a function such as MBRContains() > or MBRWithin() in the WHERE clause". > Using spatial indexes for JOINs with =, <=> etc. > predicates is incorrect. > > Fix: disable spatial indexes for such queries. ------------------------------------------------------------ revno: 1810.3962.2 author: sunanda.menon@sun.com committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.0.87sp1-release timestamp: Tue 2010-02-02 13:09:05 +0100 message: Set version number for mysql-5.0.87sp1 release ------------------------------------------------------------ revno: 1810.3988.2 committer: Christopher Powers <christopher.powers@sun.com> branch nick: mysql timestamp: Thu 2010-02-25 09:49:09 -0600 message: Bug #48739 MySQL crashes on specific INTERVAL in select query Fixed crash caused by x64 int/long incompatibility introduced in Bug #29125. ------------------------------------------------------------ revno: 3097.1.8 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 12:41:28 +0300 message: Auto-merge (empty) from mysql-trunk-merge. ------------------------------------------------------------ revno: 2875.20.4 committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> branch nick: mysql-trunk-merge timestamp: Fri 2010-02-26 16:10:09 +0300 message: Null merge of the InnoDB snapshot from mysql-5.1-bugteam to mysql-trunk-merge. ------------------------------------------------------------ revno: 2661.552.15 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Fri 2010-02-26 16:34:13 +0400 message: Merge innodb-5.1-ss6765 to 5.1-bugteam. ------------------------------------------------------------ revno: 2661.559.7 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 13:04:24 +0400 message: Applying InnoDB snapshot, fixes BUG#50691 Detailed revision comments: r6669 | jyang | 2010-02-11 12:24:19 +0200 (Thu, 11 Feb 2010) | 7 lines branches/5.1: Fix bug #50691, AIX implementation of readdir_r causes InnoDB errors. readdir_r() returns an non-NULL value in the case of reaching the end of a directory. It should not be treated as an error return. rb://238 approved by Marko ------------------------------------------------------------ revno: 2661.559.6 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 13:03:58 +0400 message: Applying InnoDB snapshot, fixes BUG#38901 Detailed revision comments: r6613 | inaam | 2010-02-09 20:23:09 +0200 (Tue, 09 Feb 2010) | 11 lines branches/5.1: Fix Bug #38901 InnoDB logs error repeatedly when trying to load page into buffer pool In buf_page_get_gen() if we are unable to read a page (because of corruption or some other reason) we keep on retrying. This fills up error log with millions of entries in no time and we'd eventually run out of disk space. This patch limits the number of attempts that we make (currently set to 100) and after that we abort with a message. rb://241 Approved by: Heikki ------------------------------------------------------------ revno: 2661.559.5 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 13:03:23 +0400 message: Applying InnoDB snapshot, fixes BUG#49001 Detailed revision comments: r6545 | jyang | 2010-02-03 03:57:32 +0200 (Wed, 03 Feb 2010) | 8 lines branches/5.1: Fix bug #49001, "SHOW INNODB STATUS deadlock info incorrect when deadlock detection aborts". Print the correct lock owner when recursive function lock_deadlock_recursive() exceeds its maximum depth LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK. rb://217, approved by Marko. ------------------------------------------------------------ revno: 2661.559.4 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 13:02:57 +0400 message: Applying InnoDB snapshot Detailed revision comments: r6538 | sunny | 2010-01-30 00:43:06 +0200 (Sat, 30 Jan 2010) | 6 lines branches/5.1: Check *first_value every time against the column max value and set *first_value to next autoinc if it's > col max value. ie. not rely on what is passed in from MySQL. [49497] Error 1467 (ER_AUTOINC_READ_FAILED) on inserting a negative value rb://236 ------------------------------------------------------------ revno: 2661.559.3 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 13:02:26 +0400 message: Applying InnoDB snapshot Detailed revision comments: r6537 | sunny | 2010-01-30 00:35:00 +0200 (Sat, 30 Jan 2010) | 2 lines branches/5.1: Undo r6536. ------------------------------------------------------------ revno: 2661.559.2 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 13:02:05 +0400 message: Applying InnoDB snapshot Detailed revision comments: r6536 | sunny | 2010-01-30 00:13:42 +0200 (Sat, 30 Jan 2010) | 6 lines branches/5.1: Check *first_value everytime against the column max value and set *first_value to next autoinc if it's > col max value. ie. not rely on what is passed in from MySQL. [49497] Error 1467 (ER_AUTOINC_READ_FAILED) on inserting a negative value rb://236 ------------------------------------------------------------ revno: 2661.559.1 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 13:01:31 +0400 message: Applying InnoDB snapshot Detailed revision comments: r6535 | sunny | 2010-01-30 00:08:40 +0200 (Sat, 30 Jan 2010) | 11 lines branches/5.1: Undo the change from r6424. We need to return DB_SUCCESS even if we were unable to initialize the tabe autoinc value. This is required for the open to succeed. The only condition we currently treat as a hard error is if the autoinc field instance passed in by MySQL is NULL. Previously if the table autoinc value was 0 and the next value was requested we had an assertion that would fail. Change that assertion and treat a value of 0 to mean that the autoinc system is unavailable. Generation of next value will now return failure. rb://237 ------------------------------------------------------------ revno: 3097.1.7 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Mon 2010-03-01 12:39:44 +0300 message: Manual merge from mysql-trunk-merge. Conflicts: - sql/share/Makefile.am ------------------------------------------------------------ revno: 2875.20.3 committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> branch nick: mysql-trunk-merge timestamp: Fri 2010-02-26 16:06:31 +0300 message: Manual merge from mysql-5.1-bugteam to mysql-trunk-merge. Conflicts: Text conflict in scripts/Makefile.am Text conflict in sql/share/Makefile.am ------------------------------------------------------------ revno: 2661.552.14 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 16:19:05 +0400 message: automerge ------------------------------------------------------------ revno: 2661.558.1 committer: Evgeny Potemkin <epotemkin@mysql.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 14:19:44 +0300 message: Auto-merged fox for the bug#50843. ------------------------------------------------------------ revno: 2661.557.1 committer: Evgeny Potemkin <epotemkin@mysql.com> branch nick: 50843-bug-5.1-bugteam timestamp: Fri 2010-02-26 14:17:00 +0300 message: Bug#50843: Filesort used instead of clustered index led to performance degradation. Filesort + join cache combination is preferred to full index scan because it is usually faster. But it's not the case when the index is clustered one. Now test_if_skip_sort_order function prefers filesort only if index isn't clustered. ------------------------------------------------------------ revno: 2661.552.13 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-26 15:39:25 +0400 message: Bug#50995 Having clause on subquery result produces incorrect results. The problem is that cond->fix_fields(thd, 0) breaks condition(cuts off 'having'). The reason of that is that NULL valued Item pointer is present in the middle of Item list and it breaks the Item processing loop. ------------------------------------------------------------ revno: 2661.552.12 committer: Gleb Shchepa <gshchepa@mysql.com> branch nick: mysql-5.1-bugteam timestamp: Thu 2010-02-25 23:13:11 +0400 message: Bug #45360: wrong results Propagation of a large unsigned numeric constant in the WHERE expression led to wrong result. For example, "WHERE a = CAST(0xFFFFFFFFFFFFFFFF AS USIGNED) AND FOO(a)", where a is an UNSIGNED BIGINT, and FOO() accepts strings, was transformed to "... AND FOO('-1')". That has been fixed. Also EXPLAIN EXTENDED printed incorrect numeric constants in transformed WHERE expressions like above. That has been fixed too. ------------------------------------------------------------ revno: 2661.552.11 committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> branch nick: mysql-5.1-bugteam timestamp: Thu 2010-02-25 19:26:30 +0300 message: Automerge. ------------------------------------------------------------ revno: 2661.556.1 committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> branch nick: my51-bug50335 timestamp: Thu 2010-02-25 18:48:53 +0300 message: Bug #50335: Assertion `!(order->used & map)' in eq_ref_table The problem was in an incorrect debug assertion. The expression used in the failing assertion states that when finding references matching ORDER BY expressions, there can be only one reference to a single table. But that does not make any sense, all test cases for this bug are valid examples with multiple identical WHERE expressions referencing the same table which are also present in the ORDER BY list. Fixed by removing the failing assertion. We also have to take care of the 'found' counter so that we count multiple references only once. We rely on this fact later in eq_ref_table(). ------------------------------------------------------------ revno: 2661.552.10 committer: Georgi Kodinov <joro@sun.com> branch nick: B49552-5.1-bugteam timestamp: Thu 2010-02-25 17:12:15 +0200 message: merge ------------------------------------------------------------ revno: 1810.3988.1 committer: Georgi Kodinov <joro@sun.com> branch nick: B49552-5.0-bugteam timestamp: Thu 2010-02-25 16:57:15 +0200 message: Backport of the fix for bug #49552 to 5.0-bugteam ------------------------------------------------------------ revno: 2661.552.9 committer: Georgi Kodinov <joro@sun.com> branch nick: B35250-5.1-bugteam timestamp: Fri 2010-02-12 18:28:35 +0200 message: Bug #35250: readline check breaks when doing vpath build Fixed several (obvious) places that don't work with vpath build. ------------------------------------------------------------ revno: 3097.1.6 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Thu 2010-02-25 23:10:42 +0300 message: Fix mysqld--help-notwin.result. ------------------------------------------------------------ revno: 3097.1.5 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Thu 2010-02-25 23:00:37 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 3097.1.4 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge.2 timestamp: Wed 2010-02-24 16:56:21 +0300 message: Auto-merge from mysql-trunk-merge. ------------------------------------------------------------ revno: 2875.20.2 committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> branch nick: mysql-trunk-merge timestamp: Wed 2010-02-24 15:40:45 +0300 message: Automerge from the parent tree. ------------------------------------------------------------ revno: 2875.20.1 committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> branch nick: mysql-trunk-merge timestamp: Wed 2010-02-24 15:39:11 +0300 message: Post-merge fix. ------------------------------------------------------------ revno: 3097.1.3 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge.2 timestamp: Wed 2010-02-24 16:53:36 +0300 message: Auto-merge from mysql-next-mr-bugfixing. ------------------------------------------------------------ revno: 3097.1.2 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge.2 timestamp: Wed 2010-02-24 16:52:27 +0300 message: Manual merge from mysql-trunk-merge. Conflicts: - client/mysql.cc - client/mysqldump.c - configure.in - mysql-test/r/csv.result - mysql-test/r/func_time.result - mysql-test/r/show_check.result - mysql-test/r/sp-error.result - mysql-test/r/sp.result - mysql-test/r/sp_trans.result - mysql-test/r/type_blob.result - mysql-test/r/type_timestamp.result - mysql-test/r/warnings.result - mysql-test/suite/rpl/r/rpl_sp.result - sql/mysql_priv.h - sql/mysqld.cc - sql/sp.cc - sql/sql_base.cc - sql/sql_table.cc - sql/sql_trigger.cc - sql/sql_view.cc - sql/table.h - sql/share/errmsg.txt - mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result ------------------------------------------------------------ revno: 2875.19.6 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-merge timestamp: Wed 2010-02-24 10:32:07 +0300 message: Auto-merge from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.19.5 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-merge timestamp: Tue 2010-02-23 17:06:06 +0300 message: Manual merge from mysql-trunk. ------------------------------------------------------------ revno: 2875.19.4 committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> branch nick: mysql-trunk-merge timestamp: Tue 2010-02-23 16:26:45 +0300 message: Manual merge of mysql-5.1-bugteam to mysql-trunk-merge. Conflicts: Text conflict in client/mysqltest.cc Text conflict in configure.in Text conflict in mysql-test/include/mtr_warnings.sql ------------------------------------------------------------ revno: 2661.552.8 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-5.1-bugteam timestamp: Tue 2010-02-23 12:33:20 +0100 message: Clean-up in the sys_vars test suite after WL#5154 and WL5182 Two result files in the sys_vars suite wasn't properly updated after the change in deprecation text ------------------------------------------------------------ revno: 2661.552.7 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-5.1-bugteam timestamp: Tue 2010-02-23 12:17:20 +0100 message: Revert of a change introduced by Bug#47974 "TYPE=storage_engine" is deprecated, and will be removed in the Celosia release of MySQL. Since the option is present in the Betony release and the version number of Celosia is still not decided, we need to bump the deprecation version number back up to "6.0". ------------------------------------------------------------ revno: 2661.552.6 committer: Timothy Smith <timothy.smith@sun.com> branch nick: 5.1-bugteam timestamp: Mon 2010-02-22 16:34:47 -0700 message: auto-merge ------------------------------------------------------------ revno: 1810.3987.1 committer: Timothy Smith <timothy.smith@sun.com> branch nick: 5.0-bugteam timestamp: Mon 2010-02-22 16:31:51 -0700 message: auto-merge ------------------------------------------------------------ revno: 2661.552.5 committer: Timothy Smith <timothy.smith@sun.com> branch nick: 5.1-bugteam timestamp: Mon 2010-02-22 16:34:04 -0700 message: auto-merge ------------------------------------------------------------ revno: 2661.555.1 committer: Timothy Smith <timothy.smith@sun.com> branch nick: 51 timestamp: Wed 2010-02-17 12:36:16 -0700 message: merge ------------------------------------------------------------ revno: 1810.3986.1 committer: Timothy Smith <timothy.smith@sun.com> branch nick: 50 timestamp: Wed 2010-02-17 12:00:18 -0700 message: Request that internals mailing list be notified if the MySQL version formatting changes ------------------------------------------------------------ revno: 2661.552.4 committer: Tatiana A. Nurnberg <azundris@mysql.com> branch nick: 51-48525 timestamp: Mon 2010-02-22 17:57:19 +0000 message: auto-merge ------------------------------------------------------------ revno: 2661.554.2 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: mysql-5.1-bugteam timestamp: Mon 2010-02-22 14:52:11 +0100 message: merge from 5.1-mtr ------------------------------------------------------------ revno: 2661.554.1 committer: Staale Smedseng <staale.smedseng@sun.com> branch nick: 43414-51 timestamp: Mon 2010-02-22 14:23:47 +0100 message: Bug #43414 Parenthesis (and other) warnings compiling MySQL with gcc 4.3.2 This is the final patch in the context of this bug. ------------------------------------------------------------ revno: 2661.552.3 committer: Tatiana A. Nurnberg <azundris@mysql.com> branch nick: 51-48525 timestamp: Mon 2010-02-22 16:58:56 +0000 message: revert 48525 ------------------------------------------------------------ revno: 2661.552.2 committer: Tatiana A. Nurnberg <azundris@mysql.com> branch nick: 51-48525 timestamp: Mon 2010-02-22 12:31:50 +0000 message: auto-merge ------------------------------------------------------------ revno: 2661.553.2 committer: Tatiana A. Nurnberg <azundris@mysql.com> branch nick: 51-49487__ timestamp: Sat 2010-02-20 16:30:10 +0000 message: auto-merge ------------------------------------------------------------ revno: 2661.523.14 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-19 13:45:25 +0100 message: Fixed incomplete merge of 48878, embedded tests fail on Windows ------------------------------------------------------------ revno: 2661.553.1 committer: Tatiana A. Nurnberg <azundris@mysql.com> branch nick: 51-49487__ timestamp: Fri 2010-02-19 19:06:47 +0000 message: manual merge ------------------------------------------------------------ revno: 1810.3984.4 committer: Tatiana A. Nurnberg <azundris@mysql.com> branch nick: 50-49487__ timestamp: Fri 2010-02-19 15:16:43 +0000 message: Bug#49487: crash with explain extended and group_concat in a derived table When EXPLAIN EXTENDED tries to print column names, it checks whether the referenced table is CONST (in which case, the column's value rather than its name will be printed). If no proper table is reference (i.e. because a derived table was used that has since gone out of scope), this will fail spectacularly. This ports an equivalent of the fix for Bug 43354. ------------------------------------------------------------ revno: 2661.552.1 committer: Tatiana A. Nurnberg <azundris@mysql.com> branch nick: 51-48525 timestamp: Thu 2010-02-18 17:02:17 +0000 message: Bug#48525: trigger changes "Column 'id' cannot be null" behaviour CHECK_FIELD_IGNORE was treated as CHECK_FIELD_ERROR_FOR_NULL; UPDATE...SET...NULL on NOT NULL fields behaved differently after a trigger. Now distinguishes between IGNORE and ERROR_FOR_NULL and save/restores check-field options. ------------------------------------------------------------ revno: 2875.19.3 committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> branch nick: mysql-trunk-merge timestamp: Mon 2010-02-22 00:33:11 +0300 message: Manual merge of mysql-5.1-bugteam to mysql-trunk-merge. ------------------------------------------------------------ revno: 2661.523.13 committer: Georgi Kodinov <joro@sun.com> branch nick: fix-5.1-bugteam timestamp: Thu 2010-02-18 10:48:15 +0200 message: Bug #51049: main.bug39022 fails in mysql-trunk-merge Fixed the test to behave correctly with ps-protocol and binlog format row. ------------------------------------------------------------ revno: 2661.523.12 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Wed 2010-02-17 16:14:57 +0400 message: automerge ------------------------------------------------------------ revno: 2661.551.1 committer: Joerg Bruehe <joerg@mysql.com> branch nick: push-5.1 timestamp: Wed 2010-02-17 11:13:15 +0100 message: Fix a bug in the RPM spec file: A "%define" is no shell command, so it must not be the only line in the "then" or "else" branch of an "if". Add a ':' line to make the branch non-empty. ------------------------------------------------------------ revno: 2661.523.11 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Wed 2010-02-17 16:13:42 +0400 message: Bug#33717 INSERT...(default) fails for enum. Crashes CSV tables, loads spaces for MyISAM Table corruption happens during table reading in ha_tina::find_current_row() func. Field::store() method returns error(true) if stored value is 0. The fix: added special case for enum type which correctly processes 0 value. Additional fix: INSERT...(default) and INSERT...() have the same behaviour now for enum type. ------------------------------------------------------------ revno: 2661.523.10 committer: Mattias Jonsson <mattias.jonsson@sun.com> branch nick: topush-51-bugteam timestamp: Tue 2010-02-16 11:42:22 +0100 message: post push fix for bug#42438, did not compile on non debug, due to ifdef of include file ------------------------------------------------------------ revno: 2661.523.9 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Tue 2010-02-16 13:44:36 +0400 message: automerge ------------------------------------------------------------ revno: 2661.550.1 committer: Mattias Jonsson <mattias.jonsson@sun.com> branch nick: topush-51-bugteam timestamp: Tue 2010-02-16 09:54:16 +0100 message: merge ------------------------------------------------------------ revno: 2661.544.3 committer: Mattias Jonsson <mattias.jonsson@sun.com> branch nick: topush-51-bugteam_2 timestamp: Fri 2010-02-12 10:03:10 +0100 message: Manual merge (moved the check for log_table before name lock) ------------------------------------------------------------ revno: 2661.549.1 committer: Mattias Jonsson <mattias.jonsson@sun.com> branch nick: b42438-51-bt timestamp: Mon 2010-02-01 16:07:00 +0100 message: Bug#42438: Crash ha_partition::change_table_ptr There was two problems: The first was the symptom, caused by bad error handling in ha_partition. It did not handle print_error etc. when having no partitions (when used by dummy handler). The second was the real problem that when dropping tables it reused the table type (storage engine) from when the lock was asked for, not the table type that it had when gaining the exclusive name lock. So that it tried to delete tables from wrong storage engines. Solutions for the first problem was to accept some handler calls to the partitioning handler even if it was not setup with any partitions, and also if possible fallback to use the base handler's default functions. Solution for the second problem was to remove the optimization to reuse the definition from the cache, instead always check the frm-file when holding the LOCK_open mutex (updated with a fix for a debug print crash and better comments as required by reviewer, and removed optimization to avoid reading the frm-file). ------------------------------------------------------------ revno: 2661.523.8 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Tue 2010-02-16 13:13:49 +0400 message: Bug#50591 bit(31) causes Duplicate entry '1-NULL' for key 'group_key' The problem is that during temporary table creation uneven bits are not taken into account for hidden fields. It leads to incorrect calculation&allocation of null bytes size for table record. And if grouped value is null we set wrong bit for this value(see end_update()). Fixed by adding separate calculation of uneven bit for hidden fields. ------------------------------------------------------------ revno: 2661.523.7 committer: Georgi Kodinov <joro@sun.com> branch nick: B46175-5.1-bugteam timestamp: Mon 2010-02-15 10:54:27 +0200 message: Addendum 2 for bug #46175: NULL read_view and consistent read assertion Fixed a compilation warning. ------------------------------------------------------------ revno: 2661.523.6 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 50624-5.1 timestamp: Sat 2010-02-13 08:35:14 -0200 message: Bug#50624: crash in check_table_access during call procedure This bug is just one facet of stored routines not being able to detect changes in meta-data (WL#4179). This particular problem can be triggered within a single session due to the improper management of the pre-locking list if the view is expanded after the pre-locking list is calculated. Since the overall solution for the meta-data detection issue is planned for a later release, for now a workaround is used to fix this particular aspect that only involves a single session. The workaround is to flush the thread-local stored routine cache every time a view is created or modified, causing locally cached routines to be re-evaluated upon invocation. ------------------------------------------------------------ revno: 2661.523.5 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 50423-5.1 timestamp: Thu 2010-01-28 12:41:14 -0200 message: Bug#50423: Crash on second call of a procedure dropping a trigger The problem was that a DROP TRIGGER statement inside a stored procedure could cause a crash in subsequent invocations. This was due to the addition, on the first execution, of a temporary table reference to the stored procedure query table list. In a subsequent invocation, there would be a attempt to reinitialize the temporary table reference, which by then was already gone. The solution is to backup and reset the query table list each time a trigger needs to be dropped. This ensures that any temp changes to the query table list are discarded. It is safe to do so at this time as drop trigger is restricted from more complicated scenarios (ie, not allowed within stored functions, etc). ------------------------------------------------------------ revno: 2661.523.4 committer: Joerg Bruehe <joerg@mysql.com> branch nick: bug33248-3-5.1 timestamp: Fri 2010-02-12 18:46:32 +0100 message: Upmerge a merge changeset, no contents changes. ------------------------------------------------------------ revno: 1810.3984.3 committer: Joerg Bruehe <joerg@mysql.com> branch nick: bug33248-3-5.0 timestamp: Fri 2010-02-12 18:35:27 +0100 message: Automerge from central branch. ------------------------------------------------------------ revno: 2661.523.3 committer: Joerg Bruehe <joerg@mysql.com> branch nick: bug33248-3-5.1 timestamp: Fri 2010-02-12 18:33:07 +0100 message: Merge from central branch, preparing for push. ------------------------------------------------------------ revno: 2661.540.30 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Fri 2010-02-12 16:47:43 +0400 message: Merge fix for BUG48438 to mysql-5.1-bugteam. ------------------------------------------------------------ revno: 1810.3985.1 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.0-bugteam-bug48438 timestamp: Fri 2010-02-12 15:28:38 +0400 message: BUG#48438 - crash with error in unioned query against merge table and view... Invalid memory reads after a query referencing MyISAM table multiple times with write lock. Invalid memory reads may lead to server crash, valgrind warnings, incorrect values in INFORMATION_SCHEMA.TABLES.{TABLE_ROWS, DATA_LENGTH, INDEX_LENGTH, ...}. This may happen when one of the table instances gets closed after a query, e.g. out of slots in open tables cache. UNION, MERGE and VIEW are irrelevant. The problem was that MyISAM didn't restore state info pointer to default value. ------------------------------------------------------------ revno: 2661.540.29 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Fri 2010-02-12 16:38:00 +0400 message: Merge fix for BUG48757 to mysql-5.1-bugteam. ------------------------------------------------------------ revno: 2661.548.1 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-bug48757 timestamp: Fri 2010-02-12 16:33:03 +0400 message: BUG#48757 - missing .ARZ file causes server crash Server crashes when accessing ARCHIVE table with missing .ARZ file. When opening a table, ARCHIVE didn't properly pass through error code from lower level azopen() to higher level open() method. ------------------------------------------------------------ revno: 2661.540.28 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Fri 2010-02-12 16:37:05 +0400 message: Merge fix for BUG49628 to mysql-5.1-bugteam. ------------------------------------------------------------ revno: 2661.547.1 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-bug49628 timestamp: Fri 2010-02-12 16:30:04 +0400 message: BUG#49628 - corrupt table after legal SQL, LONGTEXT column Bulk REPLACE or bulk INSERT ... ON DUPLICATE KEY UPDATE may break dynamic record MyISAM table. The problem is limited to bulk REPLACE and INSERT ... ON DUPLICATE KEY UPDATE, because only these operations may be done via UPDATE internally and may request write cache. When flushing write cache, MyISAM may write remaining cached data at wrong position. Fixed by requesting write cache to seek to a correct position. ------------------------------------------------------------ revno: 2661.540.27 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-12 14:11:13 +0400 message: automerge ------------------------------------------------------------ revno: 2661.546.1 committer: Georgi Kodinov <joro@sun.com> branch nick: B46175-5.1-bugteam timestamp: Thu 2010-02-11 19:41:53 +0200 message: Addendum to bug #46175 : use and check for the correct error values when converting to a enumerated type. ------------------------------------------------------------ revno: 2661.540.26 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-12 13:44:20 +0400 message: Bug#48294 assertion when creating a view based on some row() construct in select query In case of 'CREATE VIEW' subselect transformation does not happen(see JOIN::prepare). During fix_fields Item_row may call is_null() method for its arugmens which leads to item calculation(wrong subselect in our case as transformation did not happen before). This is_null() call does not make sence for 'CREATE VIEW'. Note: Only Item_row is affected because other items don't call is_null() during fix_fields() for arguments. ------------------------------------------------------------ revno: 2661.540.25 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-12 00:54:14 -0200 message: Move test case. Embedded server does not support privilege related bits. ------------------------------------------------------------ revno: 2661.540.24 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 48449-5.1 timestamp: Wed 2010-02-10 16:11:08 -0200 message: Bug#48449: hang on show create view after upgrading when view contains function of view SHOW CREATE TABLE on a view (v1) that contains a function whose statement uses another view (v2), could trigger a infinite loop if the view referenced within the function causes a warning to be raised while opening the said view (v2). The problem was a infinite loop over the stack of internal error handlers. The problem would be triggered if the stack contained two or more handlers and the first two handlers didn't handle the raised condition. In this case, the loop variable would always point to the second handler in the stack. The solution is to correct the loop variable assignment so that the loop is able to iterate over all handlers in the stack. ------------------------------------------------------------ revno: 2661.540.23 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 47734-5.1 timestamp: Wed 2010-01-27 11:10:53 -0200 message: Bug#47734: Assertion failed: ! is_set() when locking a view with non-existing definer The problem was that a failure to open a view wasn't being properly handled. When opening a view with unknown definer, the open procedure would be treated as successful and would later crash when attempting to lock the view (which wasn't opened to begin with). The solution is to skip further processing when opening a table if it fails with a fatal error. ------------------------------------------------------------ revno: 2661.540.22 committer: Staale Smedseng <staale.smedseng@sun.com> branch nick: 47905-51 timestamp: Thu 2010-02-11 21:10:13 +0100 message: Bug #47905 stored procedures with conditional statements not being logged to slow query log The problem is that the execution time for a multi-statement stored procedure as a whole may not be accurate, and thus not be entered into the slow query log even if the total time exceeds long_query_time. The reason for this is that THD::utime_after_lock used for time calculation may be reset at the start of each new statement, possibly leaving the total SP execution equal to the time spent executing the last statement in the SP. This patch stores the utime on start of SP execution, and restores it on exit of SP execution. A test is added. ------------------------------------------------------------ revno: 2661.540.21 committer: Martin Hansson <martin.hansson@sun.com> branch nick: 5.1bt timestamp: Thu 2010-02-11 15:56:24 +0100 message: Merge of Bug#49534 ------------------------------------------------------------ revno: 2661.544.2 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Wed 2010-02-10 17:31:51 +0000 message: Automerge from local mysql-5.1-bugteam bug branch. ------------------------------------------------------------ revno: 2661.545.1 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-5.1-bugteam timestamp: Thu 2010-02-04 11:26:36 +0000 message: BUG#50451: rpl_loaddata_concurrent fails sporadically When using MyIsam tables and processing concurrent DML statements, the server may be sending back an OK to the client before actually finishing the transaction commit procedure. This has been reported before in BUG@37521 and BUG@29334. This particular test case gets affected, because it performs the following sequence: connect (conn2, ...) connection conn2; LOAD DATA CONCURRENT ... disconnect (conn2, ...) connection master; sync_slave_with_master diff_tables At this point diff_tables may report difference in the table content (the master seems to be missing the conn2 rows). To workaround this MyISAM concurrent DML statements issue and make this test case deterministic, we wait on conn2 until the rows inserted show up in the table. After this the test case proceeds as normally would before this patch. ------------------------------------------------------------ revno: 2661.544.1 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Wed 2010-02-10 18:56:47 +0400 message: Bug#45195 valgrind warnings about uninitialized values in store_record_in_cache() The problem becomes apparent only if HAVE_purify is undefined. It related to the part of code placed in open_table_from_share() fuction where we initialize record buffer only if HAVE_purify is enabled. So in case of HAVE_purify=OFF record buffer is not initialized on open table stage. Next we read key, find NULL value and update appropriate null bit but do not update record buffer. After that the record is stored in the join cache(store_record_in_cache). For CHAR fields we strip trailing spaces and in our case this procedure uses uninitialized record buffer. The fix is to skip stripping space procedure in case of null values for CHAR fields(partially based on 6.0 JOIN_CACHE implementation). ------------------------------------------------------------ revno: 2661.540.20 committer: Martin Hansson <martin.hansson@sun.com> branch nick: 5.1bt timestamp: Wed 2010-02-10 15:37:34 +0100 message: Bug#49534: multitable IGNORE update with sql_safe_updates error causes debug assertion The IGNORE option of the multiple-table UPDATE command was not intended to suppress errors caused by the sql_safe_updates mode. This flag will raise an error if the execution of UPDATE does not use a key for row retrieval, and should continue do so regardless of the IGNORE option. However the implementation of IGNORE does not support exceptions to the rule; it always converts errors to warnings and cannot be extended. The Internal_error_handler interface offers the infrastructure to handle individual errors, making sure that the error raised by sql_safe_updates is not silenced. Fixed by implementing an Internal_error_handler and using it for UPDATE IGNORE commands. ------------------------------------------------------------ revno: 2661.540.19 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam timestamp: Tue 2010-02-09 18:40:18 +0400 message: Merge fixes for bug49902 and 50351 to mysql-5.1-bugteam. ------------------------------------------------------------ revno: 2661.542.2 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Tue 2010-02-09 15:47:07 +0400 message: Merge fix for bug50351 to mysql-5.1-bugteam. ------------------------------------------------------------ revno: 2661.543.1 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-bug50351 timestamp: Tue 2010-02-02 15:08:49 +0400 message: BUG#50351 - ft_min_word_len=2 Causes query to hang Performing fulltext prefix search (a word with truncation operator) may cause a dead-loop. ft_min_word_len value doesn't matter actually. The problem was introduced along with "smarter index merge" optimization. ------------------------------------------------------------ revno: 2661.542.1 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Tue 2010-02-09 15:43:44 +0400 message: Merge fix for bug49902 to mysql-5.1-bugteam. ------------------------------------------------------------ revno: 2661.541.1 committer: Sergey Vojtovich <svoj@sun.com> branch nick: mysql-5.1-bugteam-bug49902 timestamp: Tue 2010-02-09 12:53:13 +0400 message: BUG#49902 - SELECT returns incorrect results Queries optimized with GROUP_MIN_MAX didn't cleanup KEYREAD optimization properly. As a result subsequent queries may return incomplete rows (fields are initialized to default values). ------------------------------------------------------------ revno: 2661.540.18 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-5.1-bugteam-47974 timestamp: Tue 2010-02-09 11:30:50 +0100 message: Bug#47974 'TYPE=storage_engine' is deprecated and will be removed in MySQL 6.0 CREATE TABLE... TYPE= returns the warning "The syntax 'TYPE=storage_engine' is deprecated and will be removed in MySQL 6.0. Please use 'ENGINE=storage_engine' instead" This syntax is deprecated already from version 5.4.4, so the message has been changed. In addition, the deprecation macro was changed to reflect the ServerPT decision not to include version number in the warning message. A number of test result files have been changed as a consequence of the change in the deprecation macro. ------------------------------------------------------------ revno: 2875.19.2 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-merge timestamp: Tue 2010-02-09 20:25:17 +0300 message: Auto-merge from mysql-trunk. ------------------------------------------------------------ revno: 2875.19.1 committer: Alexey Kopytov <Alexey.Kopytov@sun.com> branch nick: mysql-trunk-merge timestamp: Tue 2010-02-09 12:59:38 +0500 message: Manual merge of mysql-5.1-bugteam into mysql-trunk-merge. Conflicts: Text conflict in .bzr-mysql/default.conf Text conflict in mysql-test/suite/rpl/r/rpl_slow_query_log.result Text conflict in mysql-test/suite/rpl/t/rpl_slow_query_log.test Conflict adding files to server-tools. Created directory. Conflict because server-tools is not versioned, but has versioned children. Versioned directory. Conflict adding files to server-tools/instance-manager. Created directory. Conflict because server-tools/instance-manager is not versioned, but has versioned children. Versioned directory. Contents conflict in server-tools/instance-manager/options.cc Text conflict in sql/mysqld.cc ------------------------------------------------------------ revno: 2661.540.17 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Sun 2010-02-07 00:12:04 +0000 message: BUG#50780: 'show binary logs' debug assertion when binary logging is disabled Post-push fix: disabling test when running mysqld in embedded mode. ------------------------------------------------------------ revno: 2661.540.16 committer: Gleb Shchepa <gshchepa@mysql.com> branch nick: mysql-5.1-bugteam timestamp: Sat 2010-02-06 23:54:30 +0400 message: Bug #45640: optimizer bug produces wrong results Grouping by a subquery in a query with a distinct aggregate function lead to a wrong result (wrong and unordered grouping values). There are two related problems: 1) The query like this: SELECT (SELECT t1.a) aa, COUNT(DISTINCT b) c FROM t1 GROUP BY aa returned wrong result, because the outer reference "t1.a" in the subquery was substituted with the Item_ref item. The Item_ref item obtains data from the result_field object that refreshes once after the end of each group. This data is not applicable to filesort since filesort() doesn't care about groups (and doesn't update result_field objects with copy_fields() and so on). Also that data is not applicable to group separation algorithm: end_send_group() checks every record with test_if_group_changed() that evaluates Item_ref items, but it refreshes those Item_ref-s only after the end of group, that is a vicious circle and the grouped column values in the output are shifted. Fix: if a) we grouping by a subquery and b) that subquery has outer references to FROM list of the grouping query, then we substitute these outer references with Item_direct_ref like references under aggregate functions: Item_direct_ref obtains data directly from the current record. 2) The query with a non-trivial grouping expression like: SELECT (SELECT t1.a) aa, COUNT(DISTINCT b) c FROM t1 GROUP BY aa+0 also returned wrong result, since JOIN::exec() substitutes references to top-level aliases in SELECT list with Item_copy caching items. Item_copy items have same refreshing policy as Item_ref items, so the whole groping expression with Item_copy inside returns wrong result in filesort() and end_send_group(). Fix: include aliased items into GROUP BY item tree instead of Item_ref references to them. ------------------------------------------------------------ revno: 2661.540.15 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Fri 2010-02-05 17:51:55 +0000 message: BUG#50780: 'show binary logs' debug assertion when binary logging is disabled The server would hit an assertion because of a DBUG violation. There was a missing DBUG_RETURN and instead a plain return was used. This patch replaces the return with DBUG_RETURN. ------------------------------------------------------------ revno: 2661.540.14 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Fri 2010-02-05 17:48:01 +0000 message: BUG#50620: Adding an index to a table prevents slave from logging into slow log While processing a statement, down the mysql_parse execution stack, the thd->enable_slow_log can be assigned to opt_log_slow_admin_statements, depending whether one is executing administrative statements, such as ALTER TABLE, OPTIMIZE, ANALYZE, etc, or not. This can have an impact on slow logging for statements that are executed after an administrative statement execution is completed. When executing statements directly from the user this is fine because, the thd->enable_slow_log is reset right at the beginning of the dispatch_command function, ie, everytime a new statement is set is set to execute. On the other hand, for slave SQL thread (sql_thd) the story is a bit different. When in SBR the sql_thd applies statements by calling mysql_parse. Right after, it calls log_slow_statement function to log them if they take too long. Calling mysql_parse directly is fine, but also means that dispatch_command function is bypassed. As a consequence, thd->enable_slow_log does not get a chance to be reset before the next statement to be executed by the sql_thd. If the statement just executed by the sql_thd was an administrative statement and logging of admin statements was disabled, this means that sql_thd->enable_slow_log will be set to 0 (disabled) from that moment on. End result: sql_thd stops logging slow statements. We fix this by resetting the value of sql_thd->enable_slow_log to the value of opt_log_slow_slave_statements right after log_slow_stement is called by the sql_thd. ------------------------------------------------------------ revno: 2661.540.13 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-5.1-bugteam-push timestamp: Fri 2010-02-05 17:01:09 +0000 message: BUG#48632: Fix for Bug #23300 Has Not Been Backported To 5.x Release Notes ===== This is a backport of BUG#23300 into 5.1 GA. Original cset revid (in betony): luis.soares@sun.com-20090929140901-s4kjtl3iiyy4ls2h Description =========== When using replication, the slave will not log any slow query logs queries replicated from the master, even if the option "--log-slow-slave-statements" is set and these take more than "log_query_time" to execute. In order to log slow queries in replicated thread one needs to set the --log-slow-slave-statements, so that the SQL thread is initialized with the correct switch. Although setting this flag correctly configures the slave thread option to log slow queries, there is an issue with the condition that is used to check whether to log the slow query or not. When replaying binlog events the statement contains the SET TIMESTAMP clause which will force the slow logging condition check to fail. Consequently, the slow query logging will not take place. This patch addresses this issue by removing the second condition from the log_slow_statements as it prevents slow queries to be binlogged and seems to be deprecated. ------------------------------------------------------------ revno: 2661.540.12 committer: Georgi Kodinov <joro@sun.com> branch nick: B49324-5.1-bugteam timestamp: Fri 2010-01-29 17:04:37 +0200 message: Bug #49324: more valgrind errors in test_if_skip_sort_order Fixed 2 problems : 1. test_if_order_by_key() was continuing on the primary key as if it has a primary key suffix (as the secondary keys do). This leads to crashes in ORDER BY <pk>,<pk>. Fixed by not treating the primary key as the secondary one and not depending on it being clustered with a primary key. 2. The cost calculation was trying to read the records per key when operating on ORDER BYs that order on all of the secondary key + some of the primary key. This leads to crashes because of out-of-bounds array access. Fixed by assuming we'll find 1 record per key in such cases. ------------------------------------------------------------ revno: 2661.540.11 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 49025-5.1 timestamp: Fri 2010-02-05 10:55:20 -0200 message: Bug#49025: mysqld-debug: missing DBUG_RETURN or DBUG_VOID_RETURN macro in function "?func" The problem was that the dbug facility was being used after the per-thread dbug state had already been finalized. The was present in a few functions which invoked decrement_handler_count, which in turn invokes my_thread_end on Windows. In my_thread_end, the per-thread dbug state is finalized. Any use after the state is finalized ends up creating a new state. The solution is to process the exit of a function before the decrement_handler_count function is called. ------------------------------------------------------------ revno: 2661.540.10 committer: Georgi Kodinov <joro@sun.com> branch nick: B39022-5.1-bugteam timestamp: Wed 2009-12-23 12:45:18 +0200 message: Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees flush_cached_records() was not correctly checking for errors after calling Item::val_xxx() methods. The expressions may contain subqueries or stored procedures that cause errors that should stop the statement. Fixed by correctly checking for errors and propagating them up the call stack. ------------------------------------------------------------ revno: 2661.540.9 committer: Sergey Glukhov <Sergey.Glukhov@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-05 13:39:46 +0400 message: Bug#47736 killing a select from a view when the view is processing a function, asserts hide_view_error() does not take into account that thread query may be killed. Added a check for thd->killed. Addon: backported bug32140 fix from 6.0 ------------------------------------------------------------ revno: 2661.540.8 committer: <Dao-Gang.Qu@sun.com> branch nick: mysql-5.1-bugteam timestamp: Fri 2010-02-05 14:49:01 +0800 message: Bug #50061 Test "rpl_loaddata_symlink" uses a Unix-specific "run-slave" script Bug #49984 Test 'rpl_loaddata_symlink' fails with "Could not find target log" Sometimes the symbolic link is available on Windows if you have some Unix (emulation) layer installed like Cygwin, MKS or other. But symbolic link is not always available. It depends on versions, file volume and system environment of Windows. And the symbolic link is not typically used on Windows, at least not in the degree and style they are used on Unix. We can not change the test case to do without symbolic link, because the test case is used to test that if the symbolic link works fine. To fix the problem, skip the test on windows. ------------------------------------------------------------ revno: 2661.540.7 committer: Joerg Bruehe <joerg@mysql.com> branch nick: push-5.1 timestamp: Thu 2010-02-04 20:32:25 +0100 message: Automerge from main tree. ------------------------------------------------------------ revno: 2661.540.6 committer: Kent Boortz <kent.boortz@sun.com> branch nick: mysql-5.1-bugteam timestamp: Thu 2010-02-04 19:27:09 +0100 message: LT_INIT and LT_PREREQ was added in libtool 2.2 2008, a bit too recent, switched back to the older AC_PROG_LIBTOOL ------------------------------------------------------------ revno: 2661.540.5 committer: Georgi Kodinov <joro@sun.com> branch nick: B45989-take2-5.1-bugteam timestamp: Thu 2010-02-04 18:51:55 +0200 message: Addendum to the fix for bug #45989 Need to make sure the tmp join doesn't point to the structure already freed by the cleanup() for the "base" join, as this can lead to double free, because sometimes both tmp_join and join point to the same tmp_table_params.copy_field array. ------------------------------------------------------------ revno: 2661.540.4 committer: Georgi Kodinov <joro@sun.com> branch nick: B45989-5.1-bugteam timestamp: Thu 2010-02-04 17:38:49 +0200 message: merge ------------------------------------------------------------ revno: 2661.540.3 committer: Georgi Kodinov <joro@sun.com> branch nick: B45989-5.1-bugteam timestamp: Thu 2010-02-04 17:24:58 +0200 message: merge ------------------------------------------------------------ revno: 2661.540.2 committer: Georgi Kodinov <joro@sun.com> branch nick: B45989-5.1-bugteam timestamp: Tue 2010-02-02 18:30:23 +0200 message: Bug #45989 take 2 : memory leak after explain encounters an error in the query. Fixes a leak after materializing a GROUP BY subquery to a temp table when the subquery has a blob column in the SELECT list. Fixed by correctly destructing temporary buffers for re-usable queries ------------------------------------------------------------ revno: 2661.540.1 committer: Staale Smedseng <staale.smedseng@sun.com> branch nick: 49447-51 timestamp: Thu 2010-02-04 13:39:42 +0100 message: Recommit of Bug#49447. ------------------------------------------------------------ revno: 3097.1.1 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-merge timestamp: Wed 2010-02-24 10:32:22 +0300 message: Auto-merge from mysql-next-mr-bugfixing. ------------------------------------------------------------ revno: 2914.55.2 committer: Alexey Botchkov <holyfoot@mysql.com> branch nick: 42465 timestamp: Mon 2010-03-01 11:44:11 +0400 message: merging. ------------------------------------------------------------ revno: 2914.55.1 committer: Alexey Botchkov <holyfoot@mysql.com> branch nick: 42465 timestamp: Sun 2010-02-28 23:49:29 +0400 message: Bug#42465 mysqlhotcopy fails with "Table '<y>' was locked with a READ lock" error message. Since 5.5 FLUSH TABLES requires unlocked tables so the old LOCK TABLES/FLUSH TABLES model fails. Use atomic FLUSH TABLES WITH READ LOCK instead. per-file comments: scripts/mysqlhotcopy.sh Bug#42465 mysqlhotcopy fails with "Table '<y>' was locked with a READ lock" error message. Use FLUSH TABLES WITH READ LOCK instead of LOCK TABLES / FLUSH TABLES pair. Keep the old scheme for older servers. ------------------------------------------------------------ revno: 2914.49.15 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug51376 timestamp: Wed 2010-03-03 10:24:53 +0100 message: Bug #51376 Assert `! is_set()' failed in Diagnostics_area::set_ok_status on DROP FUNCTION This assert tests that the server is not trying to send "ok" to the client if an error has occured during statement processing. In this case, the assert was triggered by lock timeout errors when accessing system tables to do an implicit REVOKE after executing DROP FUNCTION/PROCEDURE. In practice, this was only likely to happen with very low values for "lock_wait_timeout" (in the bug report 1 second was used). These errors were ignored and the server tried to send "ok" to the client, triggering the assert. The patch for Bug#45225 introduced lock timeouts for metadata locks. This made it possible to get timeouts when accessing system tables. Note that a followup patch for Bug#45225 pushed after this bug was reported, changed accessing of system tables such that the user-supplied timeout value is ignored and the maximum timeout value is used instead. This exact bug was therefore only noticeable in the period between the initial Bug#45225 patch and the followup patch. However, the same problem could occur for any errors during revoking of privileges - not just timeouts. This patch fixes the problem by making sure that any errors during revoking of privileges are reported to the client. Test case added to sp-destruct.test. Since the original bug is not reproducable now that system tables are accessed using a a long timeout value, this test instead calls DROP FUNCTION with a grant system table missing. ------------------------------------------------------------ revno: 2914.49.14 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284 timestamp: Tue 2010-03-02 11:17:08 +0300 message: Merged recent changed from mysql-next-mr-bugfixing into mysql-next-4284 tree. ------------------------------------------------------------ revno: 2914.54.3 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-03-02 01:53:15 +0100 message: Fix WITH_DEBUG problems in CMake build, so people who use configure wrappers do not suffer. The problem was that when custom C flags were defined with in environment variable CFLAGS, WITH_DEBUG did not have any effect. Also, switch from WITH_DEBUG=ON to WITH_DEBUG=OFF was not handled correctly .Expected is switch to with RelwithDebInfo or when custom compiler flags are defined, to None. ------------------------------------------------------------ revno: 2914.54.2 committer: Marc Alff <marc.alff@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Mon 2010-03-01 17:10:01 -0700 message: Bug#51612 Un initialized locker_lost variable in pfs_instr.cc Fixed the missing initialization of locker_lost. This fix is not strictly necessary, but is desirable to re-align the code from 5.5 and 6.0, and reduce the spurious code differences. This will facilitate maintenance and help to apply patches cleanly, for merges. ------------------------------------------------------------ revno: 2914.54.1 committer: Roy Lyseng <roy.lyseng@sun.com> branch nick: blabla timestamp: Mon 2010-03-01 21:19:47 +0100 message: WL#5252: deprecate --optimizer_search_depth=63 Followup: Changes in sys_vars test suite mysql-test/suite/sys_vars/r/optimizer_search_depth_basic.result Added warnings. ------------------------------------------------------------ revno: 2914.49.13 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284 timestamp: Mon 2010-03-01 20:07:11 +0300 message: Merged recent changes from mysql-next-mr-bugfixing into mysql-next-4284 tree. ------------------------------------------------------------ revno: 2914.52.4 committer: Andrei Elkin <aelkin@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Mon 2010-03-01 18:48:34 +0200 message: BUG#50296 restoring the maximum of slave_net_timeout as defined #define LONG_TIMEOUT ((ulong) 3600L*24L*365L) ------------------------------------------------------------ revno: 2914.49.12 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284 timestamp: Mon 2010-03-01 19:48:39 +0300 message: Merged recent changes from mysql-next-mr-bugfixing into mysql-next-4284. ------------------------------------------------------------ revno: 2914.52.3 committer: Roy Lyseng <roy.lyseng@sun.com> branch nick: blabla timestamp: Mon 2010-03-01 17:31:02 +0100 message: WL#5252: Deprecate --optimizer_search_depth=63 Add deprecation warning when variable optimizer_search_depth is given the value 63. mysql-test/r/greedy_optimizer.result Updated with warning text. mysql-test/r/mysqld--help-notwin.result Updated with warning from mysqld --help --verbose. mysql-test/r/mysqld--help-win.result Updated with warning from mysqld --help --verbose. sql/sys_vars.cc Added an update check function to the constructor invocation for the optimizer_search_depth variable. The function emits a warning message for the value 63. ------------------------------------------------------------ revno: 2914.49.11 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284 timestamp: Mon 2010-03-01 18:13:57 +0300 message: Merge recent changes from mysql-next-mr-bugfixing into mysql-next-4284 tree. ------------------------------------------------------------ revno: 2914.52.2 committer: Marc Alff <marc.alff@sun.com> branch nick: mysql-next-mr-bugfixing-51447 timestamp: Mon 2010-03-01 07:43:15 -0700 message: local merge before push to mysql-next-mr-bugfixing ------------------------------------------------------------ revno: 2914.53.2 committer: Marc Alff <marc.alff@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Mon 2010-03-01 07:30:22 -0700 message: Bug#50296 Slave reconnects earlier than the prescribed slave_net_timeout value Fixed failed assert on 64 bit platforms, introduced by the previous fix. mysqld: sys_vars.h:125: Assertion `size == sizeof(T)' failed. ------------------------------------------------------------ revno: 2914.53.1 committer: Andrei Elkin <aelkin@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Sun 2010-02-28 19:47:16 +0200 message: merging to 6.0-codebase-bugfixing from a local branch ------------------------------------------------------------ revno: 2876.45.2 committer: Andrei Elkin <aelkin@mysql.com> branch nick: 5.5-bug50296-sol_slave_net_timeout timestamp: Sun 2010-02-28 19:39:28 +0200 message: bug#50296 a small refinement to the test ------------------------------------------------------------ revno: 2876.45.1 committer: Andrei Elkin <aelkin@mysql.com> branch nick: 5.5-bug50296-sol_slave_net_timeout timestamp: Sun 2010-02-28 19:31:46 +0200 message: Bug #50296 Slave reconnects earlier than the prescribed slave_net_timeout value There was auto-reconnecting by slave earlier than a prescribed by slave_net_timeout value. The issue happened on 64bit solaris that spotted rather incorrect casting of the ulong slave_net_timeout into the uint of mysql.options.read_timeout. Notice, that there is no reason for slave_net_timeout to be of type of ulong. Since it's primarily passed as arg to mysql_options the type can be made as uint to avoid all conversion hassles. That's what the fixes are made. A "side" effect of the patch is a new value for the max of slave_net_timeout to be the max of the unsigned int type (therefore to vary across platforms). Note, a regression test can't be made to run reliably without making it to last over some 20 secs. That's why it is placed in suite/large_tests. ------------------------------------------------------------ revno: 2914.52.1 committer: Marc Alff <marc.alff@sun.com> branch nick: mysql-next-mr-bugfixing-51447 timestamp: Fri 2010-02-26 10:39:57 -0700 message: Bug#51447 performance schema evil twin files Before this fix, the performance schema file instrumentation would treat: - a relative path to a file - an absolute path to the same file as two different files. This would lead to: - separate aggregation counters - file leaks when a file is removed. With this fix, a relative and absolute path are resolved to the same file instrument. ------------------------------------------------------------ revno: 2914.49.10 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-bg51105-2 timestamp: Sun 2010-02-28 07:35:09 +0300 message: Fix for bug #51105 "MDL deadlock in rqg_mdl_stability test on Windows". On platforms where read-write lock implementation does not prefer readers by default (Windows, Solaris) server might have deadlocked while detecting MDL deadlock. MDL deadlock detector relies on the fact that read-write locks which are used in its implementation prefer readers (see new comment for MDL_lock::m_rwlock for details). So far MDL code assumed that default implementation of read/write locks for the system has this property. Indeed, this turned out ot be wrong, for example, for Windows or Solaris. Thus MDL deadlock detector might have deadlocked on these systems. This fix simply adds portable implementation of read/write lock which prefer readers and changes MDL code to use this new type of synchronization primitive. No test case is added as existing rqg_mdl_stability test can serve as one. ------------------------------------------------------------ revno: 2914.49.9 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-5000 timestamp: Sat 2010-02-27 20:05:14 +0300 message: WL#5000 FLUSH TABLES|TABLE table_list WITH READ LOCK. Extend and implement the grammar that allows to FLUSH WITH READ LOCK a list of tables, rather than all of them. Incompatible grammar change: Previously one could perform FLUSH TABLES, HOSTS, PRIVILEGES in a single statement. After this change, FLUSH TABLES must always be alone on the list. Judging by the test suite, however, the old extended syntax was never or very rarely used. The new statement requires RELOAD ACL global privilege and LOCK_TABLES_ACL | SELECT_ACL on individual tables. In other words, it's an atomic combination of LOCK TALBES <list> READ and FLUSH TABLES <list>, and requires respective privileges. For additional information about the semantics, please see WL#5000 and the comment for flush_tables_with_read_lock() function in sql_parse.cc ------------------------------------------------------------ revno: 2914.49.8 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284 timestamp: Fri 2010-02-26 18:37:31 +0300 message: Merged recent changes from mysql-next-mr-bugfixing into mysql-next-4284 tree. ------------------------------------------------------------ revno: 2914.50.5 committer: Jonathan Perkin <jperkin@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Fri 2010-02-26 15:04:07 +0000 message: Fix truncated GPL text. ------------------------------------------------------------ revno: 2914.49.7 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284 timestamp: Fri 2010-02-26 17:24:43 +0300 message: Merge recent changes from mysql-next-mr into mysql-next-4284. ------------------------------------------------------------ revno: 2914.50.4 committer: Alexey Botchkov <holyfoot@mysql.com> branch nick: 51mrg timestamp: Thu 2010-02-25 16:23:43 +0400 message: Bug#41103 6.0 Windows embedded-server tests fail Two problems addressed here: Embedded-server linking failure. sql/sys_vars.cc absents in the libmysqld/CMakeLists.txt The PERFORMANCE_SCHEMA-related failure of the embedded-server compilation. We try to disable the PERFORMANCE_SCHEMA in the embedded server as it's considered useless there. But we do it in wrong way as we only disable header's links to the PF, not the PF's library itself. So on Unix-ex the embedded library still contains the PF code and grows bigger with no reason. On Windows that just fails to compile. per-file comments: include/my_global.h Bug#41103 6.0 Windows embedded-server tests fail No PERFORMANCE_SCHEMA disabling in the embedded server. User can just use the --without-perfschema-engine-plugin option to exclude it from the compilation. ------------------------------------------------------------ revno: 2914.49.6 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284 timestamp: Fri 2010-02-26 16:06:33 +0300 message: Merged recent changes from mysql-next-mr-bugfixing into mysql-next-4284 tree. ------------------------------------------------------------ revno: 2914.50.3 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Fri 2010-02-26 09:13:50 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 2914.50.2 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Fri 2010-02-26 01:08:29 +0100 message: merge ------------------------------------------------------------ revno: 2914.51.2 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-02-25 22:53:07 +0300 message: Null-merge from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.18.1 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Thu 2010-02-25 22:49:44 +0300 message: Null-merge from mysql-trunk. ------------------------------------------------------------ revno: 2914.51.1 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-02-25 22:49:59 +0300 message: Null-merge from mysql-next-mr. ------------------------------------------------------------ revno: 2914.50.1 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-02-25 21:40:15 +0100 message: Bug#51502: building with cmake creates an invalid mysqld_safe. The problem was incorrect escaping used inside a strnig : in \"$MYSQLD\" was written as "\MYSQL\" (backslash and quote characters transposed), when defining FIND_PROC variable for BSD or SysV style "ps" command- Additionally fixed obvious code duplication and random naming in CHECK_PID test. ------------------------------------------------------------ revno: 2914.49.5 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug51240 timestamp: Fri 2010-02-26 13:40:25 +0100 message: Bug #51240 ALTER TABLE of a locked MERGE table fails The problem was that ALTER TABLE on a merge table which was locked using LOCK TABLE ... WRITE, by mistake gave ER_TABLE_NOT_LOCKED_FOR_WRITE. During opening of the table to be ALTERed, open_table() tried to get an upgradable metadata lock. In LOCK TABLEs mode, this lock must already exist (i.e. taken by LOCK TABLE) as new locks of this type cannot be acquired for fear of deadlock. So in LOCK TABLEs mode, open_table() tried to find an existing upgradable lock for the table to be altered. The problem was that open_table() also tried to find upgradable metadata locks for children of merge tables even if no such locks are needed to execute ALTER TABLE on merge tables. This patch fixes the problem by making sure that open tables code only searches for upgradable metadata locks for the merge table and not for the merge children tables. The patch also fixes a related bug where an upgradable metadata lock was aquired outside of LOCK TABLEs mode even if the table in question was temporary. This bug meant that LOCK TABLES or DDL on temporary tables by mistake could be blocked/aborted by locks held on base tables with the same table name by other connections. Test cases added to merge.test and lock_multi.test. ------------------------------------------------------------ revno: 2914.49.4 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug51336 timestamp: Fri 2010-02-26 10:58:33 +0100 message: Bug #51336 Assert in reload_acl_and_cache during RESET QUERY CACHE Attempts to execute RESET statements within a transaction that had acquired metadata locks, led to an assertion failure on debug servers. This bug didn't cause any problems on release builds. The triggered assert is designed to check that caches are not flushed or reset while having active transactions. It is triggered if acquired metadata locks exist that are not from LOCK TABLE or HANDLER statements. In this case it was triggered by RESET QUERY CACHE while having an active transaction that had acquired locks. The reason the assertion was triggered, was that RESET statements, unlike the similar FLUSH statements, was not causing an implicit commit. This patch fixes the problem by making sure RESET statements commit the current transaction before executing. The commit causes acquired metadata locks to be released, preventing the assertion from being triggered. Incompatible change: This patch changes RESET statements so that they cause an implicit commit. Test case added to query_cache.test. ------------------------------------------------------------ revno: 2914.49.3 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug51355 timestamp: Thu 2010-02-25 18:08:12 +0100 message: Bug #51355 handler stmt cause assertion in bool MDL_context::try_acquire_lock(MDL_request*) This assert was triggered in the following way: 1) HANDLER OPEN t1 from connection 1 2) DROP TABLE t1 from connection 2. This will block due to the metadata lock held by the open handler in connection 1. 3) DML statement (e.g. INSERT) from connection 1. This will close the table opened by the HANDLER in 1) and release its metadata lock. This is done due to the pending exclusive metadata lock from 2). 4) DROP TABLE t1 from connection 2 now completes and removes table t1. 5) HANDLER READ from connection 1. Since the handler table was closed in 3), the handler code will try to reopen the table. First a new metadata lock on t1 will be granted before the command fails since the table was removed in 4). 6) HANDLER READ from connection 1. This caused the assert. The reason for the assert was that the MDL_request's pointer to the lock ticket was not reset when the statement failed. HANDLER READ then tried to acquire a lock using the same MDL_request object, triggering the assert. This bug was only noticeable on debug builds and did not cause any problems on release builds. This patch fixes the problem by assuring that the pointer to the metadata lock ticket is reset when reopening of handler tables fails. Test case added to handler.inc ------------------------------------------------------------ revno: 2914.49.2 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-mytest timestamp: Thu 2010-02-25 13:29:14 +0100 message: merge from mysql-next-mr-bugfixing ------------------------------------------------------------ revno: 2914.49.1 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug45225 timestamp: Wed 2010-02-24 18:04:00 +0100 message: Followup to Bug#45225 Locking: hang if drop table with no timeout This patch prevents system threads and system table accesses from using user-specified values for "lock_wait_timeout". Instead all such accesses are done using the default value (1 year). This prevents background tasks (such as replication, events, accessing stored function definitions, logging, reading time-zone information, etc.) from failing in cases where the global value of "lock_wait_timeout" is set very low. The patch also simplifies the open tables API. Rather than adding another convenience function for opening and locking system tables, this patch removes most of the existing convenience functions for open_and_lock_tables_derived(). Before, open_and_lock_tables() was a convenience function that enforced derived tables handling, while open_and_lock_tables_derived() was the main function where derived tables handling was optional. Now, this convencience function is gone and the main function is renamed to open_and_lock_tables(). No test case added as it would have required the use of --sleep to check that system threads and system tables have a different timeout value from the user-specified "lock_wait_timeout" system variable. ------------------------------------------------------------ revno: 3107 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Thu 2010-03-04 16:02:30 +0400 message: Bug#51675 Server crashes on inserting 4 byte char. after ALTER TABLE to 'utf8mb4' Bug#51676 Server crashes on SELECT, ORDER BY on 'utf8mb4' column An additional fix. We should use 0xFFFD as a weight for supplementary characters, not the "weight for character U+FFFD". ------------------------------------------------------------ revno: 3106 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Thu 2010-03-04 15:13:46 +0400 message: Bug#51166 mysql client defaults to charset 'ascii' Using latin1 client character set for ASCII locales: - because ascii is not a build-in character set - for better backward compatibility ------------------------------------------------------------ revno: 3105 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Thu 2010-03-04 15:00:32 +0400 message: A joint patch for: Bug#51675 Server crashes on inserting 4 byte char. after ALTER TABLE to 'utf8mb4' Bug#51676 Server crashes on SELECT, ORDER BY on 'utf8mb4' column ------------------------------------------------------------ revno: 3104 committer: Horst.Hunger <horst.hunger@sun.com> branch nick: next-mr-bar2-ndb timestamp: Thu 2010-03-04 08:34:44 +0100 message: Push the test to next-mr-bar2 to let them run in pushbuild. ------------------------------------------------------------ revno: 3103 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bar2 timestamp: Fri 2010-02-26 12:33:19 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 2914.45.30 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Fri 2010-02-26 09:06:43 +0300 message: Disable rpl_semi_sync on Windows due to Bug 49557. ------------------------------------------------------------ revno: 3102 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bar2 timestamp: Thu 2010-02-25 22:58:57 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 2914.45.29 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Thu 2010-02-25 22:43:05 +0300 message: Fix default.conf. ------------------------------------------------------------ revno: 2875.17.7 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Thu 2010-02-25 22:42:01 +0300 message: Fix default.conf. ------------------------------------------------------------ revno: 2914.45.28 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-02-25 17:31:31 +0100 message: Workaround crash with dtraced shared libraries under GCC 3.4.6 on 32 bit Solaris. Crash happens in dlopen() code when trying to load the library. Crash does not happen when library is not DTrace instrumented . Additionally, crash does not happen with default Solaris 10 GCC 3.4.3 and it does not happen if main executable is instrumented. So , just check for this specific situation (32 bit, GCC3.4.6 , Solaris) and disable Dtrace in shared libraries. We have only single plugin so far that is instrumented (ha_example) ------------------------------------------------------------ revno: 2914.45.27 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-02-25 10:57:23 +0100 message: On Solaris, overwrite CMake's proposed thread library -lthread with -lpthread. -lthread works fine in most cases, but at least with gcc 3.4.6 on x86, dlopen() crashes when libpthread is not used. Note : the workaround existed prior and did not work since CMAKE_THREADS_LIBS_INIT was already in cache. Now, use SET(.. CACHE FORCE) to overwrite the cached value. ------------------------------------------------------------ revno: 2914.45.26 committer: Vladislav Vaintroub<wlad@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-24 20:11:34 +0100 message: merge ------------------------------------------------------------ revno: 2914.48.3 committer: Jonathan Perkin <jperkin@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-24 19:19:24 +0000 message: Some CMake packaging fixes: - Remove INSTALL-BINARY from installed docs directory, we provide a copy in the root directory (but perhaps this should be revisited later). - Disable audit_null and daemon_example plugins. - Fix the docs directory. - Remove mysql-test/Makefile.in - Build and install mysql_tzinfo_to_sql - Remove share/charsets/languages.html ------------------------------------------------------------ revno: 2914.48.2 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-24 15:53:09 +0300 message: Update result file for funcs_1.storedproc. ------------------------------------------------------------ revno: 2914.48.1 committer: Marc Alff <marc.alff@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-24 00:22:19 -0700 message: Fixed tests for windows ------------------------------------------------------------ revno: 2914.45.25 committer: Vladislav Vaintroub<wlad@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-24 20:07:05 +0100 message: #51466 : Source packages are broken with cmake in a cmake-agnostic environment In the worst case possible scenario (no bzr, in-source build), make dist produced a package that compiled ok with autotools but failed to package because extra make_binary_distribution was found in source package and was not built. make_binary_distribution contained paths of the build machine. Fix: exclude some scripts that are produced in cmake build. Note that there is no good general fix for it in this specific scenario. it is advisable to build source packages out of source or in bzr repo. ------------------------------------------------------------ revno: 2914.45.24 committer: Vladislav Vaintroub<wlad@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-24 19:51:45 +0100 message: Fix --with-ssl mappping (--with-ssl=dir should be "yes" or actually "system"), --with-ssl should be "bundled". Fixes error on sol-gcc-x86, where build machine had openssl but not the test box. ------------------------------------------------------------ revno: 2914.45.23 committer: Vladislav Vaintroub<wlad@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-24 02:20:55 +0100 message: merge ------------------------------------------------------------ revno: 2914.47.1 committer: Marc Alff <marc.alff@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-23 17:45:49 -0700 message: Bug#10143 Perror not showing error description Backport to 5.5.99 ------------------------------------------------------------ revno: 2914.45.22 committer: Vladislav Vaintroub<wlad@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-24 02:06:08 +0100 message: Fix typo HAVE_IBGCC_ATOMIC_BUILTINS=>HAVE_IB_GCC_ATOMIC_BUILTINS. Due to the typo, detection of atomics was broken. It also lead to valgrind error during shutdown (access to freed memory),which is likely present in all builds where atomics are not used. ------------------------------------------------------------ revno: 2914.45.21 committer: Vladislav Vaintroub<wlad@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-23 23:30:36 +0100 message: merge ------------------------------------------------------------ revno: 2914.35.165 committer: Marc Alff <marc.alff@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-23 11:43:26 -0700 message: Bug#31767 DROP FUNCTION name resolution Backport to 5.5.99 ------------------------------------------------------------ revno: 2914.35.164 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Tue 2010-02-23 18:49:21 +0300 message: Auto-merge from mysql-next-mr-bugfixing. ------------------------------------------------------------ revno: 2914.35.163 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2010-02-19 17:20:29 +0300 message: Fix compiler warnings in my_atomic.h ------------------------------------------------------------ revno: 2914.35.162 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug48315 timestamp: Thu 2010-02-18 14:54:38 +0100 message: Bug #48315 Metadata lock is not taken for merged views that use an INFORMATION_SCHEMA table When a prepared statement using a merged view containing an information schema table was executed, a metadata lock of the view was not taken. This meant that it was possible for concurrent view DDL to execute, thereby breaking the binary log. For example, it was possible for DROP VIEW to appear in the binary log before a query using the view. This also happened when a statement in a stored routine was executed a second time. For such views, the information schema table is merged into the view during the prepare phase (or first execution of a statement in a routine). The problem was that we took a short cut and were not executing full-blown view opening during subsequent executions of the statement. As a result, a metadata lock on the view was not taken to protect the view definition. This patch resolves the problem by making sure a metadata lock is taken for views even after information schema tables are merged into them. Test cased added to view.test. ------------------------------------------------------------ revno: 2914.35.161 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug44613 timestamp: Wed 2010-02-17 11:24:53 +0100 message: Bug #44613 SELECT statement inside FUNCTION takes a shared lock The problem was that a shared InnoDB row lock was taken when executing SELECT statements inside a stored function as a part of a transaction using REPEATABLE READ. This prevented other transactions from updating the row. InnoDB uses multi-versioning and consistent nonlocking reads. SELECTs should therefore not acquire locks and block other transactions wishing to do updates. This bug is no longer repeatable with the changes introduced in the scope of metadata locking. Test case added to innodb_mysql.test. ------------------------------------------------------------ revno: 2914.45.20 committer: Vladislav Vaintroub<wlad@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-23 20:25:38 +0100 message: Bug#43201: Post-fix. Set thread stack address at the start of each query. Reason: implementation of send/reap in mysqltest uses the same "embedded" connection in a thread different from current, so thread stack has to change when connection is used in different OS thread.. ------------------------------------------------------------ revno: 2914.45.19 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-23 15:54:52 +0100 message: merge ------------------------------------------------------------ revno: 2914.46.1 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-23 16:18:24 +0300 message: Add ignore pattern for valgrind messages. ------------------------------------------------------------ revno: 2914.45.18 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-23 14:28:06 +0100 message: remove whitespace at the end of line in Makefile.am, to keep BUILD/autorun.sh silent ------------------------------------------------------------ revno: 2914.45.17 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-23 13:50:45 +0100 message: merge, CMake bugfixes, remove sp-error from experimental ------------------------------------------------------------ revno: 3095.1.4 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Tue 2010-02-23 12:48:26 +0100 message: Bug#43201 : Stack overrun when running sp-error test. It appears that stack overflow checks for recusrive stored procedure calls, that run in the normal server, did not work in embedded and were dummified with preprocessor magic( #ifndef EMBEDDED_SERVER ). The fix is to remove ifdefs, there is no reason not to run overflow checks and crash in deeply recursive calls. Note: Start of the stack (thd->thread_stack variable) in embedded is not necessarily exact but stil provides the best guess. Unless the caller of mysql_read_connect() is already deep in the stack, thd->thread_stack variable should approximate stack start address well. ------------------------------------------------------------ revno: 3095.1.3 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Tue 2010-02-23 12:32:57 +0100 message: Bug #51414: Arguments with embedded spaces are not correctly handled by configure wrapper. The bug was that ./configure was passing paramers to subscripts as $@, and to handle embedded spaces it needs to be quoted as "$@". This resulting into a bug when ./configure was called e.g with CFLAGS='-m64 -Xstrconst'.. Additionally, fixed cmake/configure.pl did not handle environment variables passed on the command line. this is fixed in this push ------------------------------------------------------------ revno: 3095.1.2 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Mon 2010-02-22 20:55:27 +0100 message: Fix BUILD/compile-pentium64-xxx scripts, when ccache is present. Fix contains of : - splitting CC/CXX if there are more that 2 space-delimited tokens, add the rest to CFLAGS (in this case CC was set to "ccache gcc --pipe", and this broke recognition of gcc compiler as CMake understands CC consisting of 2 space delimited tokens but not more) - add my_new.cc to mysys fle list if C++ operator new is not found. Always, not only for gcc (the original problem was that missing operator new when compiling with CXX=gcc) ------------------------------------------------------------ revno: 3095.1.1 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Mon 2010-02-22 19:39:36 +0100 message: Bug#51393 : remove mtr_fix_privilege_tables from MTR v1 ------------------------------------------------------------ revno: 2914.45.16 committer: Jonathan Perkin <jperkin@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-23 11:02:27 +0000 message: Merge to mysql-next-mr-bugfixing ------------------------------------------------------------ revno: 3096.1.1 committer: Jonathan Perkin <jperkin@sun.com> branch nick: mysql-next-mr-cmake timestamp: Tue 2010-02-23 09:53:48 +0000 message: Support non-GPL builds. ------------------------------------------------------------ revno: 2914.45.15 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Mon 2010-02-22 16:22:31 +0300 message: Manual merge from mysql-next-mr. Conflicts: - mysql-test/r/mysqld--help-notwin.result - mysql-test/r/mysqld--help-win.result ------------------------------------------------------------ revno: 2914.45.14 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Mon 2010-02-22 00:27:46 +0000 message: BUG#50364: Automerge from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.17.6 committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Mon 2010-02-22 00:26:29 +0000 message: Post-push fix for BUG#50364. There was an erroneous parameter when calling flush_master_info from write_ignored_events_info_to_relay_log which could lead to a server crash. This happens because the I/O thread releases the log_lock before calling the flush_master_info. Set the function to call flush_master_info with third parameter to true, so that the mutex is properly taken. ------------------------------------------------------------ revno: 2914.45.13 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Sun 2010-02-21 22:36:05 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 2914.45.12 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Sat 2010-02-20 12:43:54 +0300 message: Auto-merge (empty) from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.17.5 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Sat 2010-02-20 12:40:04 +0300 message: Auto-merge from mysql-trunk. ------------------------------------------------------------ revno: 2914.45.11 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Sat 2010-02-20 12:40:21 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 2914.45.10 committer: Serge Kozlov <Serge.Kozlov@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Fri 2010-02-19 22:40:20 +0300 message: Bug#48308. Merge mysql-trunk-bugfixing -> mysql-next-mr-bugfixing ------------------------------------------------------------ revno: 2875.17.4 committer: Serge Kozlov <Serge.Kozlov@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Fri 2010-02-19 22:37:23 +0300 message: Bug#48308. Post-fix Removed --remove_file in cleanup procedure ------------------------------------------------------------ revno: 2914.45.9 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-02-18 18:10:39 +0100 message: Cleanup after push of WL#5154 - Remove deprecated 4.1 features The fix is the removal of the sql_log_update_basic test, as this option is deprecated and removed, and a minor change to the result file of lc_time_names_basic as the error message has changed. ------------------------------------------------------------ revno: 2914.45.8 committer: Alexey Botchkov <holyfoot@mysql.com> branch nick: 51mrg timestamp: Wed 2010-02-17 14:19:17 +0400 message: Bug#38959 archive_gis fails due to rounding difference Multi_polygon::centroid() has an error in the implementation per-file messages: sql/spatial.cc Bug#38959 archive_gis fails due to rounding difference multi_polygon::centroid() implementation fixed ------------------------------------------------------------ revno: 2914.45.7 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-17 22:19:56 +0100 message: Merge from mysql-trunk-bugfixing ------------------------------------------------------------ revno: 2875.17.3 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Wed 2010-02-17 22:17:17 +0100 message: Bug#47017 rpl_timezone fails on PB-2 with mismatch error This is a post-fix cleanup to move rpl.rpl_timezone out of 'experimental' state. ------------------------------------------------------------ revno: 2914.45.6 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Wed 2010-02-17 19:08:49 +0100 message: Bug #51248 Server start fails with MTR_VERSION=1 and code with WL5154 Replaced --default-character-set with --character-set-server Replaced --language with --lc-messages-dir NB full test suite not tested yet ------------------------------------------------------------ revno: 2914.45.5 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-next-mr-bugfixing-wl5182 timestamp: Wed 2010-02-17 13:15:07 +0100 message: WL#5182 Remove more deprecated 4.1/5.0 features WL#5154 was a task for formally deprecating and removing items that were mentioned in the manual as having been deprecated since MySQL 4.1 or 5.0, but that had never been removed. Since WL#5154 was created, examination of mysqld.cc, mysql.cc, and mysqldump.c reveals additional deprecations not mentioned in the manual. (In some cases, the items are simply not mentioned in the 5.1+ manuals.) This is a follow-on task to deprecate and remove these additional items. The deprecation happened in MySQL 5.1, and the options/variables are now removed from the code. ------------------------------------------------------------ revno: 2914.45.4 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-next-mr-bugfixing-wl5154 timestamp: Wed 2010-02-17 10:18:17 +0100 message: WL#5154 Remove deprecated 4.1 features A set of program options and variables was deprecated in MySQL 5.1, and is hereby removed. ------------------------------------------------------------ revno: 2914.45.3 committer: Serge Kozlov <Serge.Kozlov@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Tue 2010-02-16 22:38:48 +0300 message: Bug#48308 Merge mysql-trunk-bugfixing -> mysql-next-mr-bugfixing ------------------------------------------------------------ revno: 2875.17.2 committer: Serge Kozlov <Serge.Kozlov@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Tue 2010-02-16 22:34:34 +0300 message: Bug#48308. 1. Now test use fake_relay_log primitive 2. Added RESET SLAVE to include/setup_fake_relay_log.inc for removing relay log info file 3. Added RESET SLAVE to include/cleanup_fake_relay_log.inc 4. Test moved to rpl suite as rpl_binlog_auto_inc_bug33029.test 5. Updated result file ------------------------------------------------------------ revno: 2914.45.2 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-next-mr-bugfixing-48929 timestamp: Sun 2010-02-14 19:12:58 +0100 message: Bug#48929 Error in Accept() if using many file descriptors In POSIX systems, the file descriptor set used in the select(2) system call is represented by a bit vector of size FD_SETSIZE. When select(2) is used on file/socket descriptors with a value that is beyond this size, unpredictable errors may occur. In this case, the error happens when there are a large number of tables that need repair. These tables are opened before the sockets for incoming connections are acquired, resulting in these sockets getting descriptor id which is higher than FD_SETSIZE. Replacing the call to select(2) with poll(2) fixes the problem, as poll takes an array of the wanted descriptors, instead of a bit vector. MS Windows has a different implementation of 'select', and is not affected by this bug. ------------------------------------------------------------ revno: 2914.45.1 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Sun 2010-02-14 13:26:25 +0300 message: Merge from mysql-trunk-bugfixing. ------------------------------------------------------------ revno: 2875.17.1 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-bugfixing timestamp: Sun 2010-02-14 13:24:21 +0300 message: Null-merge from mysql-trunk. ------------------------------------------------------------ revno: 3101 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Thu 2010-02-25 12:15:46 +0400 message: After-fix for WL#1213 Fixing cmake files. ------------------------------------------------------------ revno: 3100 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Wed 2010-02-24 19:42:40 +0400 message: Removing compilation-dependent query. ------------------------------------------------------------ revno: 3099 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Wed 2010-02-24 19:07:08 +0400 message: Added forgotten test dependencies ------------------------------------------------------------ revno: 3098 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Wed 2010-02-24 13:52:59 +0400 message: Merging WL#1213 into mysql-next-mr-bar2 ------------------------------------------------------------ revno: 2914.1.51 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2.w1213 timestamp: Wed 2010-02-24 13:15:34 +0400 message: Backporting WL#1213 ------------------------------------------------------------ revno: 3097 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Mon 2010-02-22 14:48:38 +0300 message: Fix default.conf. ------------------------------------------------------------ revno: 3096 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-cmake timestamp: Mon 2010-02-22 14:40:41 +0300 message: Make sp-error.test experimental on Windows due to Bug 43201. The patch is ready and will be pushed via -bugfixing. ------------------------------------------------------------ revno: 3095 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-cmake timestamp: Sun 2010-02-21 21:34:09 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 2876.44.40 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-wl3736 timestamp: Sat 2010-02-20 13:07:32 +0300 message: Patch for WL#3736: Extended Table, Column and Index Comments. The task is to (a) add a comment on indexes and (b) increase the maximum length of column, table and the new index comments. The patch committed on behalf of Yoshinori Matsunobu (Yoshinori.Matsunobu@Sun.COM). ------------------------------------------------------------ revno: 3094 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Sun 2010-02-21 15:10:52 +0100 message: Do not run shared memory sys_vars tests in embedded ------------------------------------------------------------ revno: 3093 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Sat 2010-02-20 20:40:03 +0100 message: Install static client and embedded debug libraries ------------------------------------------------------------ revno: 3092 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Sat 2010-02-20 14:17:55 +0100 message: extend configure-like perl wrapper for INSTALL_FOODIR variables ------------------------------------------------------------ revno: 3091 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Sat 2010-02-20 11:23:12 +0100 message: merge ------------------------------------------------------------ revno: 2876.44.39 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Sat 2010-02-20 12:27:30 +0300 message: Fix default.conf. ------------------------------------------------------------ revno: 2876.43.33 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Sat 2010-02-20 12:26:22 +0300 message: Fix default.conf. ------------------------------------------------------------ revno: 2876.44.38 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-mtr timestamp: Sat 2010-02-20 12:14:09 +0300 message: Auto-merge from mysql-trunk-mtr. ------------------------------------------------------------ revno: 2876.43.32 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk-mtr timestamp: Sat 2010-02-20 12:09:17 +0300 message: Auto-merge from mysql-5.1-mtr. ------------------------------------------------------------ revno: 2661.412.50 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-5.1-mtr timestamp: Sat 2010-02-20 12:08:40 +0300 message: Auto-merge from mysql-5.1. ------------------------------------------------------------ revno: 2661.518.26 author: hery.ramilison@sun.com committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.1 timestamp: Wed 2010-02-17 18:48:40 +0100 message: Merge from mysql-5.1.44-release ------------------------------------------------------------ revno: 2661.539.1 tags: mysql-5.1.44 author: hery.ramilison@sun.com committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.1.44-release timestamp: Wed 2010-02-17 18:39:28 +0100 message: configure.in - Changes to the banner text - Use older AC_PROG_LIBTOOL (Bug#51009) scripts/mysql_install_db.sh - Changes to banner text ------------------------------------------------------------ revno: 2876.44.37 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2010-02-18 09:26:21 +0100 message: merge from next-mr ------------------------------------------------------------ revno: 2876.44.36 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2010-02-18 09:09:08 +0100 message: upmerge 51135 ------------------------------------------------------------ revno: 2876.43.31 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Thu 2010-02-18 09:02:38 +0100 message: upmerge 51135 ------------------------------------------------------------ revno: 2661.412.49 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: maxconn-51 timestamp: Wed 2010-02-17 16:28:02 +0100 message: Bug #51135 Please increase the maximum number of connections allowed in mysqltest Added --max-connections= argument to mysqltest and mtr Small fix to first patch: forgot to check before free'ing connections array ------------------------------------------------------------ revno: 2876.44.35 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Wed 2010-02-17 13:12:30 +0100 message: merge 44054 ------------------------------------------------------------ revno: 2876.43.30 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Wed 2010-02-17 13:09:48 +0100 message: merge 44054 ------------------------------------------------------------ revno: 2661.412.48 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: noreord-51 timestamp: Wed 2010-02-17 12:37:37 +0100 message: Bug #44054 MTR2: --no-reorder does not prevent reordering Some logic would group by suite always Disable this if using --noreorder Also fix getting array from collect_one_suite() in this case Amended according to previous comment ------------------------------------------------------------ revno: 2876.44.34 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Tue 2010-02-16 20:49:21 +0100 message: fixed wrong merge conflict in mysql-test/include/mtr_warnings.sql ------------------------------------------------------------ revno: 2876.44.33 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Tue 2010-02-16 20:26:44 +0100 message: Added a needed reap to mysql-test/include/handler.inc ------------------------------------------------------------ revno: 2876.44.32 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Tue 2010-02-16 18:23:21 +0100 message: new merge from next-mr ------------------------------------------------------------ revno: 2876.44.31 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Sun 2010-02-14 12:28:33 +0100 message: null upmerge ------------------------------------------------------------ revno: 2876.43.29 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Sun 2010-02-14 12:25:42 +0100 message: null upmerge ------------------------------------------------------------ revno: 2661.412.47 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-51 timestamp: Sun 2010-02-14 12:22:10 +0100 message: merge from 5.1 main ------------------------------------------------------------ revno: 2876.43.28 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Sun 2010-02-14 12:24:16 +0100 message: merge from trunk ------------------------------------------------------------ revno: 2876.44.30 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Sun 2010-02-14 12:26:36 +0100 message: merge from next-mr ------------------------------------------------------------ revno: 2876.44.29 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2010-02-11 14:35:54 +0100 message: upmerge 31602,47389,50618 ------------------------------------------------------------ revno: 2876.43.27 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Thu 2010-02-11 14:33:21 +0100 message: upmerge 31602,47389,50618 ------------------------------------------------------------ revno: 2661.412.46 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: sleepvar-51 timestamp: Thu 2010-02-11 14:26:58 +0100 message: renaming test variables+c to variables_community, + is problematic ------------------------------------------------------------ revno: 2661.412.45 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: sleepvar-51 timestamp: Thu 2010-02-11 14:00:34 +0100 message: merge 31602 ------------------------------------------------------------ revno: 2661.538.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: space-51 timestamp: Wed 2010-02-03 15:11:52 +0100 message: Bug #31602 mysql-test-run.pl seems to have problems with file names including spaces. Too complex/risky to try to fix Instead, detect the problem and communicate that this is not supported ------------------------------------------------------------ revno: 2661.412.44 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: sleepvar-51 timestamp: Thu 2010-02-11 13:57:43 +0100 message: merge 47389 ------------------------------------------------------------ revno: 2661.537.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: innoroot-51 timestamp: Thu 2010-02-11 11:22:07 +0100 message: Bug #47389 Innodb tests are skipped when running as unix root user Add --user=root to collect_mysqld_features() if running as root Please disregard previous commit; this is much simpler. ------------------------------------------------------------ revno: 2661.412.43 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: sleepvar-51 timestamp: Tue 2010-02-09 18:13:57 +0100 message: Bug #50618 Please allow 'sleep $variable' in mtr Made mtr's sleep function understand $variables A few fixes since previous patch, added tests ------------------------------------------------------------ revno: 2876.44.28 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Sun 2010-02-07 12:41:24 +0100 message: null upmerge ------------------------------------------------------------ revno: 2876.43.26 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Sun 2010-02-07 12:37:13 +0100 message: null upmerge ------------------------------------------------------------ revno: 2661.412.42 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-51 timestamp: Sun 2010-02-07 12:21:11 +0100 message: merge from 5.1 main ------------------------------------------------------------ revno: 2661.412.41 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: rfwc-51 timestamp: Thu 2010-02-04 13:15:42 +0100 message: Bug #39774 mysql-test-run's remove_file can't use wildcards, this should be documented Added remove_files_wildcard that allows to remove multiple files at once. This is a port of original patch to Windows. ------------------------------------------------------------ revno: 2876.43.25 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Sun 2010-02-07 12:30:38 +0100 message: merge from mysql-trunk ------------------------------------------------------------ revno: 2876.44.27 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Sun 2010-02-07 12:38:18 +0100 message: merge from next-mr ------------------------------------------------------------ revno: 2876.44.26 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2010-02-04 12:57:45 +0100 message: upmerge 39774 ------------------------------------------------------------ revno: 2876.43.24 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Thu 2010-02-04 12:53:08 +0100 message: upmerge 39774 ------------------------------------------------------------ revno: 2661.536.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: rfwc-51 timestamp: Thu 2010-02-04 10:55:17 +0100 message: Bug #39774 mysql-test-run's remove_file can't use wildcards, this should be documented Added remove_files_wildcard that allows to remove multiple files at once. This is a port of original patch to Windows. ------------------------------------------------------------ revno: 2876.44.25 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Wed 2010-02-03 10:28:17 +0100 message: upmerge 50414 ------------------------------------------------------------ revno: 2876.43.23 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Wed 2010-02-03 10:25:53 +0100 message: upmerge 50414 ------------------------------------------------------------ revno: 2661.412.40 committer: <Dao-Gang.Qu@sun.com> branch nick: mysql-5.1-mtr timestamp: Wed 2010-02-03 15:49:20 +0800 message: Bug #50414 valgrind warnings: invalid file descriptor -1 in syscall write()/read() Sometimes stop/restart master or stop/restart salve can cause network error, which can cause the 'invalid file descriptor -1 in syscall write()/read()' warnings. All involved test cases except rpl_slave_load_remove_tmpfile belong to the kind of network error. So they are expected. The 'rpl_slave_load_remove_tmpfile' belongs to file error, but it is testing the file error as following code: DBUG_EXECUTE_IF("remove_slave_load_file_before_write", my_close(fd,MYF(0)); fd= -1; my_delete(fname, MYF(0));); So it's expected too. To fix the problem, add the valgrind warnings to the global suppression list to suppress it. ------------------------------------------------------------ revno: 2876.43.22 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Fri 2010-01-29 09:35:01 +0100 message: dummy upmerge ------------------------------------------------------------ revno: 2661.412.39 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-51 timestamp: Thu 2010-01-28 15:19:18 +0100 message: merge 49210 ------------------------------------------------------------ revno: 2876.44.24 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2010-01-28 13:02:19 +0100 message: upmerge 49210 ------------------------------------------------------------ revno: 2876.43.21 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Thu 2010-01-28 13:01:01 +0100 message: upmerge 49210 ------------------------------------------------------------ revno: 2876.44.23 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Mon 2010-01-25 11:30:31 +0100 message: upmerge 50182, 50540 ------------------------------------------------------------ revno: 2876.43.20 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Mon 2010-01-25 11:24:22 +0100 message: upmerge 50182, 50540 ------------------------------------------------------------ revno: 2661.412.38 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: portbase-51 timestamp: Mon 2010-01-25 11:20:52 +0100 message: Bug #50182 mtr: allow $MTR_PORT_BASE or --port-base= as alternative to MTR_BUILD_THREAD As suggested, convert internally to value of build_thread ------------------------------------------------------------ revno: 2661.412.37 committer: Bernd Ocklin <bernhard.ocklin@sun.com> branch nick: mysql-5.1-mtr timestamp: Fri 2010-01-22 14:12:17 +0100 message: fix LD_LIBRARY_PATH (bug#50540) ------------------------------------------------------------ revno: 2876.44.22 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Mon 2010-01-25 11:28:46 +0100 message: merge from mysql-next-mr ------------------------------------------------------------ revno: 2876.44.21 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Wed 2010-01-20 16:43:14 +0100 message: upmerge 43005,48888,49837,49878,50471 ------------------------------------------------------------ revno: 2876.43.19 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Wed 2010-01-20 14:37:48 +0100 message: upmerge 43005,48888,49837,49878,50471 ------------------------------------------------------------ revno: 2661.412.36 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: ifdelim-51 timestamp: Wed 2010-01-20 14:23:57 +0100 message: merge 49837 ------------------------------------------------------------ revno: 2661.535.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: execmul-51 timestamp: Wed 2010-01-20 12:51:18 +0100 message: Bug #49837 mysqltest exec cannot handle multi-line command correctly Since the exec command line is passed on externally, it cannot take newlines Simply replace \n with space Now also added test case ------------------------------------------------------------ revno: 2661.412.35 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: ifdelim-51 timestamp: Wed 2010-01-20 14:22:34 +0100 message: merge 48888 ------------------------------------------------------------ revno: 2661.534.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: repres-51 timestamp: Wed 2010-01-20 12:52:35 +0100 message: Bug #48888 mysqltest crashes on --replace_result if 'from' is longer than ~1024 symbols valgrind pointed to a buffer allocated by my_realloc which looked fishy Replaced size with what was probably intended, added test case. Now also fixed line after review comment ------------------------------------------------------------ revno: 2661.412.34 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: ifdelim-51 timestamp: Wed 2010-01-20 14:20:53 +0100 message: merge 43005 ------------------------------------------------------------ revno: 2661.533.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: quote-51 timestamp: Tue 2010-01-19 09:48:56 +0100 message: Bug#43005 main.init_connect fails on Windows due to wrong quoting of args - The arguments are properly quoted when mtr.pl calls my_safe_process but unfortunately the all off when running with active state perl and stays in cygwin perl. - Extend the patch to only quote args that are not already quoted This a redo of previous commit, will be included in next push ------------------------------------------------------------ revno: 2661.412.33 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: ifdelim-51 timestamp: Wed 2010-01-20 14:18:27 +0100 message: Bug #49878 delimiter under false 'if' makes mysqltest test fail with 'Missing end of block' delimiter not executed so does not recognize end of block Always execute delimiter command, revert after false if() block. ------------------------------------------------------------ revno: 2661.412.32 committer: Bernd Ocklin <bernhard.ocklin@sun.com> branch nick: mysql-5.1-mtr timestamp: Wed 2010-01-20 12:54:55 +0100 message: exporting server version and other as env var (bug#50471) ------------------------------------------------------------ revno: 2876.44.20 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-nx timestamp: Tue 2010-01-19 13:35:23 +0100 message: merge from next-mr ------------------------------------------------------------ revno: 2876.44.19 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2010-01-07 13:22:23 +0100 message: null upmerge ------------------------------------------------------------ revno: 2876.43.18 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Thu 2010-01-07 13:19:09 +0100 message: backport some changes from WL 4378 ------------------------------------------------------------ revno: 2661.412.31 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: unreap-51 timestamp: Thu 2010-01-07 13:17:54 +0100 message: backport some changes from WL 4378 ------------------------------------------------------------ revno: 2876.44.18 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2010-01-07 11:28:35 +0100 message: upmerge 49269 amendment ------------------------------------------------------------ revno: 2876.43.17 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Thu 2010-01-07 11:27:00 +0100 message: upmerge 49269 amendment ------------------------------------------------------------ revno: 2661.412.30 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: unreap-51 timestamp: Thu 2010-01-07 11:22:45 +0100 message: Bug #49269 mysqltest crashes on 'reap' if query executed after 'send' Undid amendment allowing pending reap after switching connections Moved check for pending reap earlier; failed if running with ps-protocol ------------------------------------------------------------ revno: 2876.44.17 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Wed 2010-01-06 13:01:16 +0100 message: upmerge 49269 amendment ------------------------------------------------------------ revno: 2876.43.16 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Wed 2010-01-06 12:59:41 +0100 message: upmerge 49269 amendment ------------------------------------------------------------ revno: 2661.412.29 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: case-51 timestamp: Wed 2010-01-06 12:56:22 +0100 message: Bug #49269 mysqltest crashes on 'reap' if query executed after 'send' Small amendment: ignore pending reap when switching connection, add test ------------------------------------------------------------ revno: 2876.44.16 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Wed 2010-01-06 10:01:11 +0100 message: merge 48863,49269,49345,49672,49761 ------------------------------------------------------------ revno: 2876.43.15 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Wed 2010-01-06 09:57:44 +0100 message: merge 48863,49269,49345,49672,49761 ------------------------------------------------------------ revno: 2661.412.28 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: case-51 timestamp: Wed 2010-01-06 09:54:43 +0100 message: merge 49345 ------------------------------------------------------------ revno: 2661.532.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: gprof-51 timestamp: Tue 2010-01-05 21:35:50 +0100 message: Bug #49345 re-introduce gprof to mysql-test-run.pl Was available in v1 Porting to v2 required some rewriting Updated after review comments ------------------------------------------------------------ revno: 2661.412.27 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: case-51 timestamp: Wed 2010-01-06 09:52:55 +0100 message: merge 49672 ------------------------------------------------------------ revno: 2661.531.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: exit1-51 timestamp: Tue 2009-12-15 10:12:24 +0100 message: Bug #49672 mtr should extract end of result log if mysqltest fails without output Extracts last 20 lines if no output after failure ------------------------------------------------------------ revno: 2661.412.26 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: case-51 timestamp: Wed 2010-01-06 09:47:25 +0100 message: Bug #49761 mysqltest.test does not have any tests for send/reap Added them NB the 6th case is adapted to Bug no. 49269, gives wrong output without it ------------------------------------------------------------ revno: 2661.412.25 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: case-51 timestamp: Wed 2010-01-06 09:45:28 +0100 message: Bug #49269 mysqltest crashes on 'reap' if query executed after 'send' Set a flag after send to trap the case ------------------------------------------------------------ revno: 2661.412.24 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: case-51 timestamp: Wed 2010-01-06 09:42:21 +0100 message: Bug #48863 mysql test: enable and disable case insensitive compare mode Implemented --lowercase_result which lower cases next result ------------------------------------------------------------ revno: 2876.43.14 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Tue 2010-01-05 13:35:22 +0100 message: silly upmerge of nothing after bzr mess-up ------------------------------------------------------------ revno: 2661.412.23 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: comb-51 timestamp: Tue 2010-01-05 13:31:38 +0100 message: Bug #49166 mtr --combination is broken after restrictions of combination names Combinations beginning with -- not allowed Allow them... ------------------------------------------------------------ revno: 2876.44.15 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Tue 2010-01-05 13:15:27 +0100 message: upmerge 49166 ------------------------------------------------------------ revno: 2876.43.13 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Tue 2010-01-05 13:13:16 +0100 message: upmerge 49166 ------------------------------------------------------------ revno: 2661.530.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: comb-51 timestamp: Tue 2010-01-05 13:05:00 +0100 message: Bug #49166 mtr --combination is broken after restrictions of combination names Combinations beginning with -- not allowed Allow them... ------------------------------------------------------------ revno: 2876.44.14 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-nx timestamp: Mon 2010-01-04 14:15:57 +0100 message: null upmerge ------------------------------------------------------------ revno: 2876.43.12 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-tr timestamp: Mon 2010-01-04 13:50:48 +0100 message: merge from mysql-trunk ------------------------------------------------------------ revno: 2876.44.13 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-nx timestamp: Mon 2010-01-04 14:12:30 +0100 message: merge from mysql-next-mr ------------------------------------------------------------ revno: 2876.44.12 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-nx timestamp: Mon 2009-12-21 14:40:00 +0100 message: null upmerge ------------------------------------------------------------ revno: 2876.43.11 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-tr timestamp: Mon 2009-12-21 12:58:48 +0100 message: null upmerge ------------------------------------------------------------ revno: 2661.412.22 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-51 timestamp: Mon 2009-12-21 12:54:45 +0100 message: merge from 5.1 again ------------------------------------------------------------ revno: 2876.43.10 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-tr timestamp: Mon 2009-12-21 12:56:39 +0100 message: merge from trunk ------------------------------------------------------------ revno: 2876.44.11 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-nx timestamp: Mon 2009-12-21 14:37:12 +0100 message: Merge from next-mr ------------------------------------------------------------ revno: 2876.44.10 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-nx timestamp: Wed 2009-12-16 12:23:12 +0100 message: upmerge ------------------------------------------------------------ revno: 2876.43.9 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-tr timestamp: Wed 2009-12-16 10:55:14 +0100 message: upmerge ------------------------------------------------------------ revno: 2661.412.21 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: sendeval-51 timestamp: Wed 2009-12-16 10:37:41 +0100 message: Merge from 5.1 main ------------------------------------------------------------ revno: 2661.412.20 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: sendeval-51 timestamp: Wed 2009-12-16 10:06:37 +0100 message: backport mysqltest send_eval from 42520 ------------------------------------------------------------ revno: 2876.43.8 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-tr timestamp: Wed 2009-12-16 10:43:02 +0100 message: merge from trunk ------------------------------------------------------------ revno: 2876.44.9 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: merge-nx timestamp: Wed 2009-12-16 12:14:14 +0100 message: Merge from next-mr ------------------------------------------------------------ revno: 2876.44.8 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2009-11-26 12:08:18 +0100 message: merge 48250, 48918, 49096 ------------------------------------------------------------ revno: 2876.43.7 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Thu 2009-11-26 11:36:37 +0100 message: merge 48250, 48918, 49096 ------------------------------------------------------------ revno: 2661.412.19 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: embmut-51 timestamp: Thu 2009-11-26 11:34:16 +0100 message: Bug #48918 MTR uses an un-initialized value in comparison mysqld->{proc} not defined for an embedded server Check only if {proc} defined ------------------------------------------------------------ revno: 2661.412.18 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: embmut-51 timestamp: Thu 2009-11-26 11:23:30 +0100 message: Bug #49096 mtr: --mem option should be ignored on Windows Ignored w/message in v1 and v2 ------------------------------------------------------------ revno: 2661.412.17 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: embmut-51 timestamp: Thu 2009-11-26 11:16:06 +0100 message: Bug #48250 mysqtest_embedded can lock destroyed mutex As suggested, replaced relevant uses of my_fopen with fopen (and close) Tested on HPUX where it was reproducable with test innodb_bug30919 ------------------------------------------------------------ revno: 2876.44.7 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Tue 2009-11-24 12:27:19 +0100 message: merge 47978,48683 ------------------------------------------------------------ revno: 2876.43.6 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Tue 2009-11-24 12:26:06 +0100 message: merge 47978,48683 ------------------------------------------------------------ revno: 2661.412.16 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: timer-51 timestamp: Tue 2009-11-24 09:16:14 +0100 message: merge 48683 ------------------------------------------------------------ revno: 2661.529.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: aboner-51 timestamp: Thu 2009-11-19 13:19:11 +0100 message: Bug #48683 mysql-stress-test fails with "Value ... invalid for option abort-on-error" Add =1 to --abort-on-error argument ------------------------------------------------------------ revno: 2661.412.15 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: timer-51 timestamp: Tue 2009-11-24 09:12:48 +0100 message: Bug #47978 timer : expired after 90 seconds Problems occur after killing threads on Windows Get rid of the timeout threads, implement simple timer in wait_any_timeout() ------------------------------------------------------------ revno: 2876.44.6 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2009-11-19 10:25:57 +0100 message: upmerge 35543,48367,48671,48806,48808 ------------------------------------------------------------ revno: 2876.43.5 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Thu 2009-11-19 10:24:24 +0100 message: upmerge 35543,48367,48671,48806,48808 ------------------------------------------------------------ revno: 2661.412.14 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: srvdies-51 timestamp: Thu 2009-11-19 10:19:18 +0100 message: merge 48808 ------------------------------------------------------------ revno: 2661.528.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: devenv-51 timestamp: Wed 2009-11-18 10:27:43 +0100 message: Bug #48808 mysql-test-run.pl --debugger=devenv does not work Wrong argument order, fixed ------------------------------------------------------------ revno: 2661.412.13 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: srvdies-51 timestamp: Thu 2009-11-19 10:17:56 +0100 message: merge 48806 ------------------------------------------------------------ revno: 2661.527.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: helpsrc-51 timestamp: Tue 2009-11-17 12:13:22 +0100 message: Bug #48806 mysql-test-run.pl --help should work even in the absence of binaries Searches for my_safe_process binary too early Put this into a sub() and call it after examining options (incl. --help) ------------------------------------------------------------ revno: 2661.412.12 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: srvdies-51 timestamp: Thu 2009-11-19 10:16:03 +0100 message: merge 48671 ------------------------------------------------------------ revno: 2661.526.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: perlinsrc-51 timestamp: Wed 2009-11-11 12:46:19 +0100 message: Bug #48671 mysqltest fails on 'perl' in file sourced inside 'while' Actually, fails on 'perl' in any while Fixed essentially the same way as for append_file ------------------------------------------------------------ revno: 2661.412.11 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: srvdies-51 timestamp: Thu 2009-11-19 10:14:25 +0100 message: merge 35543 ------------------------------------------------------------ revno: 2661.525.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: localload-51 timestamp: Thu 2009-11-19 10:10:21 +0100 message: Bug #35543 mysqlbinlog.cc does not properly work with tmp files mtr patch ported to v2 ------------------------------------------------------------ revno: 2661.412.10 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: srvdies-51 timestamp: Thu 2009-11-19 09:58:50 +0100 message: Bug #48367 MTR should react to server dying, rather than to resulting failure of mysqltest For some reason it usually picks up mysqltest Wait .1s and then see if a server has died Change from first commit: label on separate line ------------------------------------------------------------ revno: 2876.44.5 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Tue 2009-11-17 09:36:09 +0100 message: mtr ignoring of skip-im incorrectly removed by backport of WL#4085 ------------------------------------------------------------ revno: 2876.44.4 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Mon 2009-11-16 15:33:08 +0100 message: merge 48795 ------------------------------------------------------------ revno: 2876.43.4 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Mon 2009-11-16 15:30:25 +0100 message: merge 48795 ------------------------------------------------------------ revno: 2661.412.9 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: valgsumm-51 timestamp: Mon 2009-11-16 14:46:33 +0100 message: minor fix of a valgrind suppress pattern ------------------------------------------------------------ revno: 2661.412.8 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: valgsumm-51 timestamp: Mon 2009-11-16 11:18:16 +0100 message: Bug #48795 Valgrind summary from tests where server has been restarted cause test failure Seen in a few tests after 43418 Add code in extract_warning_lines() to skip this part ------------------------------------------------------------ revno: 2876.44.3 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Thu 2009-11-12 11:20:24 +0100 message: merge 43418 ------------------------------------------------------------ revno: 2876.43.3 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Thu 2009-11-12 11:14:56 +0100 message: merge 43418 ------------------------------------------------------------ revno: 2661.412.7 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: valgleak-51 timestamp: Thu 2009-11-12 11:04:01 +0100 message: Bug #43418 MTR2: does not notice a memory leak occuring at shutdown of mysqld w/ --valgrind Checking is done before server is terminated Adds post processing of server logs if --valgrind Also had to remove --quiet option to valgrind ------------------------------------------------------------ revno: 2876.44.2 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Wed 2009-11-04 15:00:03 +0100 message: merge 47663 and 48209 ------------------------------------------------------------ revno: 2876.43.2 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Wed 2009-11-04 14:57:16 +0100 message: merge 47663 and 48209 ------------------------------------------------------------ revno: 2661.412.6 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: weird-51 timestamp: Wed 2009-11-04 14:44:19 +0100 message: merge 48209 ------------------------------------------------------------ revno: 2661.524.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: testhas-51 timestamp: Fri 2009-10-23 13:04:55 +0200 message: Bug #48209 Confusing message "Test has succeeded" after test fails due to warnings There's no need for --verbose for the mysqltest in check-warnings, remove it ------------------------------------------------------------ revno: 2661.412.5 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: weird-51 timestamp: Wed 2009-11-04 13:42:22 +0100 message: Bug #47663 mtr --parallel has weird output Some output is written, some is not Finally concluded it's a Perl bug: after running with parallel threads for a while, print suddenly ignores all but the first argument. Workaround: concatenate all the arguments into one, except in output that only comes before we start running tests ------------------------------------------------------------ revno: 2876.44.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-nx timestamp: Mon 2009-10-26 15:30:49 +0100 message: upmerge 48240 ------------------------------------------------------------ revno: 2876.43.1 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: upmerge-tr timestamp: Mon 2009-10-26 15:29:38 +0100 message: upmerge 48240 ------------------------------------------------------------ revno: 2661.412.4 committer: Bjorn Munch <Bjorn.Munch@sun.com> branch nick: summary-51 timestamp: Mon 2009-10-26 14:28:51 +0100 message: Bug #48240 "Test suite timeout" and "Too many tests failed" is masked from status page Prepend "Completed", "Timeout" or "Too many failed" to summary line ------------------------------------------------------------ revno: 3090 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Sat 2010-02-20 08:58:18 +0100 message: add_executable => mysql_add_executable (just for uniformity) ------------------------------------------------------------ revno: 3089 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: xxx timestamp: Sat 2010-02-20 08:17:44 +0100 message: Fix configure.js : set the variabes in cache, so they can overwrite cache variables in CMakeLists.txt ------------------------------------------------------------ revno: 3088 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Sat 2010-02-20 02:12:01 +0100 message: SET FN_NO_CASE_SENSE to 1 on Windows ------------------------------------------------------------ revno: 3087 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Fri 2010-02-19 18:04:35 +0100 message: Install extremely useful program "replace" ------------------------------------------------------------ revno: 3086 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Fri 2010-02-19 17:51:53 +0100 message: When installing, exclude some documents in Docs ------------------------------------------------------------ revno: 3085 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Fri 2010-02-19 18:30:08 +0100 message: Fix some glitches with INSTALL_LAYOUT=STANDALONE - mysql_install_db is in scripts dir now - sql-bench is installed -some extra support-files (e.g ini) are in support-files ------------------------------------------------------------ revno: 3084 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Thu 2010-02-18 14:43:56 +0100 message: merge ------------------------------------------------------------ revno: 3082.1.1 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Wed 2010-02-17 04:14:09 +0100 message: Fix test that did not work in out-of-source build . There are 2 different share directories, one if builddir/share (with compiled errmsg.sys) and another one is $sourcedir/share and contains some /charsets/*.xml files. second one should be refered to as MYSQL_CHARSETSDIR and MYSQL_SHAREDIR $builddir/share ------------------------------------------------------------ revno: 3083 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Thu 2010-02-18 14:09:35 +0100 message: merge ------------------------------------------------------------ revno: 2914.1.50 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr-bar2 timestamp: Wed 2010-02-17 14:37:55 +0300 message: Re-adding 'include/probes_mysql_nodtrace.h' removed by accident in 'kostja@sun.com-20091210084103-l4f8u62u4evoy3dc'. This file is necessary for Windows builds. ------------------------------------------------------------ revno: 2914.1.49 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Wed 2010-02-17 12:24:47 +0400 message: Merging from mysql-next-mr ------------------------------------------------------------ revno: 2914.1.48 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Tue 2010-02-16 13:16:12 +0400 message: Post-fix for WL#3090. Compilation failure problems on non-i386 platforms. Adding missing parenthesis. ------------------------------------------------------------ revno: 2914.1.47 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr-bar2 timestamp: Mon 2010-02-15 09:57:24 +0400 message: WL#3090 Japanese Character Set adjustments added: @ mysql-test/include/ctype_utf8_table.inc Adding a share file to populate all utf8 values [U+0000..U+FFFF] modified: @ include/m_ctype.h Introducing MB2 and MY_PUT_MB2 macros @ mysql-test/r/ctype_cp932_binlog_stm.result @ mysql-test/r/ctype_eucjpms.result @ mysql-test/r/ctype_sjis.result @ mysql-test/r/ctype_ujis.result @ mysql-test/t/ctype_cp932_binlog_stm.test @ mysql-test/t/ctype_eucjpms.test @ mysql-test/t/ctype_sjis.test @ mysql-test/t/ctype_ujis.test Adding test @ strings/ctype-cp932.c @ strings/ctype-eucjpms.c @ strings/ctype-sjis.c @ strings/ctype-ujis.c Adding new functions using Big-Table approach. ------------------------------------------------------------ revno: 3082 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Wed 2010-02-17 00:27:45 +0100 message: fix typo ------------------------------------------------------------ revno: 3081 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Tue 2010-02-16 23:58:15 +0100 message: postmerge fix ------------------------------------------------------------ revno: 3080 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Tue 2010-02-16 23:19:47 +0100 message: merge ------------------------------------------------------------ revno: 2914.35.160 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Tue 2010-02-16 13:12:08 +0300 message: Prohibit running semi-sync rpl tests in the embedded mode. ------------------------------------------------------------ revno: 2914.35.159 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Mon 2010-02-15 19:35:53 +0300 message: A fix and a test case for Bug#47648 "main.merge fails sporadically". If a prepared statement used both a MyISAMMRG table and a stored function or trigger, execution could fail with "No such table" error or crash. The error would come from a failure of the MyISAMMRG engine to meet the expectations of the prelocking algorithm, in particular maintain lex->query_tables_own_last pointer in sync with lex->query_tables_last pointer/the contents of lex->query_tables. When adding merge children, the merge engine would extend the table list. Then, when adding prelocked tables, the prelocking algorithm would use a pointer to the last merge child to assign to lex->query_tables_own_last. Then, when merge children were removed at the end of open_tables(), lex->query_tables_own_last was not updated, and kept pointing to a removed merge child. The fix ensures that query_tables_own_last is always in sync with lex->query_tables_last. This is a regression introduced by WL#4144 and present only in next-4284 tree and 6.0. ------------------------------------------------------------ revno: 2914.35.158 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Mon 2010-02-15 17:08:38 +0300 message: Auto-merge from mysql-next-4284. ------------------------------------------------------------ revno: 2914.44.4 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-bg51093 timestamp: Mon 2010-02-15 15:37:48 +0300 message: Fix for bug #51093 "Crash (possibly stack overflow) in MDL_lock::find_deadlock". On some platforms deadlock detector in metadata locking subsystem under certain conditions might have exhausted stack space causing server crashes. Particularly this caused failures of rqg_mdl_stability test on Solaris in PushBuild. During search for deadlock MDL deadlock detector could sometimes encounter loop in the waiters graph in which MDL_context which has started search for a deadlock does not participate. In such case our algorithm will continue looping assuming that either this deadlock will be resolved by MDL_context which has created it (i.e. by one of loop participants) or maximum search depth will be reached. Since max search depth was set to 1000 in the latter case on platforms where each iteration of deadlock search algorithm needs more than DEFAULT_STACK_SIZE/1000 bytes of stack (around 192 bytes for 32-bit and around 256 bytes for 64-bit platforms) we might have exhausted stack space. This patch solves this problem by reducing maximum search depth for MDL deadlock detector to 32. This should be safe at the moment as it is unlikely that each iteration of the current deadlock detector algorithm will consume more than 1K of stack (thus total amount of stack required can't be more than 32K) and we require at least 80K of stack in order to open any table. Also this value should be (hopefully) big enough to not cause too much false deadlock errors (there is an anecdotal evidence that real-life deadlocks are typically shorter than that). Additional reasearch should be conducted in future in order to determine the more optimal value of maximum search depth. This patch does not include test case as existing rqg_mdl_stability test can serve as one. ------------------------------------------------------------ revno: 2914.44.3 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug45225 timestamp: Mon 2010-02-15 13:11:20 +0100 message: Followup to Bug#45225 Locking: hang if drop table with no timeout This patch removes the unused server variable "table_lock_wait_timeout". ------------------------------------------------------------ revno: 2914.35.157 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Mon 2010-02-15 15:04:05 +0300 message: Auto-merge from mysql-next-4284. ------------------------------------------------------------ revno: 2914.44.2 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-bg51136 timestamp: Mon 2010-02-15 14:23:36 +0300 message: Fix for bug #51136 "Crash in pthread_rwlock_rdlock on TEMPORARY + HANDLER + LOCK + SP". Server crashed when one: 1) Opened HANDLER or acquired global read lock 2) Then locked one or several temporary tables with LOCK TABLES statement (but no base tables). 3) Then issued any statement causing commit (explicit or implicit). 4) Issued statement which should have closed HANDLER or released global read lock. The problem was that when entering LOCK TABLES mode in the scenario described above we incorrectly set transactional MDL sentinel to zero. As result during commit all metadata locks were released (including lock for open HANDLER or global metadata shared lock). Indeed, attempt to release metadata lock for the second time which happened during HANLDER CLOSE or during release of GLR caused crash. This patch fixes problem by changing MDL_context's set_trans_sentinel() method to set sentinel to correct value (it should point to the most recent ticket). ------------------------------------------------------------ revno: 2914.44.1 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-bg51134 timestamp: Mon 2010-02-15 13:23:34 +0300 message: Fix for bug #51134 "Crash in MDL_lock::destroy on a concurrent DDL workload". When a RENAME TABLE or LOCK TABLE ... WRITE statement which mentioned the same table several times were aborted during the process of acquring metadata locks (due to deadlock which was discovered or because of KILL statement) server might have crashed. When attempt to acquire all locks requested had failed we went through the list of requests and released locks which we have managed to acquire by that moment one by one. Since in the scenario described above list of requests contained duplicates this led to releasing the same ticket twice and a crash as result. This patch solves the problem by employing different approach to releasing locks in case of failure to acquire all locks requested. Now we take a MDL savepoint before starting acquiring locks and simply rollback to it if things go bad. ------------------------------------------------------------ revno: 2914.35.156 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Mon 2010-02-15 15:00:45 +0300 message: After-merge fix. ------------------------------------------------------------ revno: 2914.35.155 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Mon 2010-02-15 14:16:49 +0300 message: Manual merge from mysql-next-mr. Conflicts: - sql/log_event.cc - sql/sql_class.h ------------------------------------------------------------ revno: 2914.1.46 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Sun 2010-02-14 13:23:09 +0300 message: Empty merge from mysql-trunk. ------------------------------------------------------------ revno: 2875.11.37 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-trunk timestamp: Sun 2010-02-14 13:22:03 +0300 message: Fix tree name. ------------------------------------------------------------ revno: 2914.35.154 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-bg50908 timestamp: Fri 2010-02-12 10:05:43 +0300 message: Fix for bug #50908 "Assertion `handler_tables_hash.records == 0' failed in enter_locked_tables_mode". Server was aborted due to assertion failure when one tried to execute statement requiring prelocking (i.e. firing triggers or using stored functions) while having open HANDLERs. The problem was that THD::enter_locked_tables_mode() method which was called at the beginning of execution of prelocked statement assumed there are no open HANDLERs. It had to do so because corresponding THD::leave_locked_tables_mode() method was unable to properly restore MDL sentinel when leaving LOCK TABLES/prelocked mode in the presence of open HANDLERs. This patch solves this problem by changing the latter method to properly restore MDL sentinel and thus removing need for this assumption. As a side-effect, it lifts unjustified limitation by allowing to keep HANDLERs open when entering LOCK TABLES mode. ------------------------------------------------------------ revno: 2914.35.153 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Thu 2010-02-11 19:10:34 +0300 message: next-4284 tree: fix lock_sync.test failure in row based replication mode. ------------------------------------------------------------ revno: 2914.35.152 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Thu 2010-02-11 19:02:21 +0300 message: Fix a sporadic failure of rpl_sp.test in next-4284 tree: when doing SELECT * FROM t1 on slave, first make sure that the slave has received the CREATE TABLE from the master. ------------------------------------------------------------ revno: 2914.35.151 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Thu 2010-02-11 18:19:04 +0300 message: next-4284 tree: fix the failures of processlist_val_* tests, update the condition to wait for in wait_condition to reflect type-of-operation aware metadata locks. ------------------------------------------------------------ revno: 2914.35.150 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-mytest timestamp: Thu 2010-02-11 12:59:12 +0100 message: Followup to Bug#34604 handler::ha_rnd_end(): Assertion `inited==RND' failed. The test case for this bug relies on getting a ER_LOCK_WAIT_TIMEOUT error. However with the introduction of MDL, the test would hang forever since the metadata locks would not timeout. MDL timeouts are now introduced in the scope of Bug#45225. This patch changes the testcase for Bug#34604 to set the new server variable "lock_wait_timeout" to one second which makes the test generate the necessary timeout again. ------------------------------------------------------------ revno: 2914.35.149 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug45225 timestamp: Thu 2010-02-11 11:23:39 +0100 message: Bug #45225 Locking: hang if drop table with no timeout This patch introduces timeouts for metadata locks. The timeout is specified in seconds using the new dynamic system variable "lock_wait_timeout" which has both GLOBAL and SESSION scopes. Allowed values range from 1 to 31536000 seconds (= 1 year). The default value is 1 year. The new server parameter "lock-wait-timeout" can be used to set the default value parameter upon server startup. "lock_wait_timeout" applies to all statements that use metadata locks. These include DML and DDL operations on tables, views, stored procedures and stored functions. They also include LOCK TABLES, FLUSH TABLES WITH READ LOCK and HANDLER statements. The patch also changes thr_lock.c code (table data locks used by MyISAM and other simplistic engines) to use the same system variable. InnoDB row locks are unaffected. One exception to the handling of the "lock_wait_timeout" variable is delayed inserts. All delayed inserts are executed with a timeout of 1 year regardless of the setting for the global variable. As the connection issuing the delayed insert gets no notification of delayed insert timeouts, we want to avoid unnecessary timeouts. It's important to note that the timeout value is used for each lock acquired and that one statement can take more than one lock. A statement can therefore block for longer than the lock_wait_timeout value before reporting a timeout error. When lock timeout occurs, ER_LOCK_WAIT_TIMEOUT is reported. Test case added to lock_multi.test. ------------------------------------------------------------ revno: 2914.35.148 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Wed 2010-02-10 19:31:34 +0300 message: Update result file. ------------------------------------------------------------ revno: 2914.35.147 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-bg50998 timestamp: Wed 2010-02-10 18:46:03 +0300 message: Fix for bug #50998 "Deadlock in MDL code during test rqg_mdl_stability". When start of statement's waiting on a metadata lock created more than one loop in waiters graph server might have entered deadlock condition. The problem was that in the case described above MDL deadlock detector had to perform several searches for deadlock but forgot to reset Deadlock_detection_context before performing new search. Failure to do so has broken assumption in code resposible for choosing victim that if Deadlock_detection_context::victim is set we also have read lock on m_waiting_for_lock for this context. As result this lock could have been unlocked more times than it was acquired which corrupted rwlock's state which led to server deadlock. This fix ensures that such reset is done before each attempt to find a deadlock. ------------------------------------------------------------ revno: 2914.35.146 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Tue 2010-02-09 13:40:08 +0300 message: Auto-merge from mysql-next-mr. ------------------------------------------------------------ revno: 2914.35.145 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-bg50913 timestamp: Mon 2010-02-08 23:19:55 +0300 message: Fix for bug #50913 "Deadlock between open_and_lock_tables_derived and MDL". Concurrent execution of a multi-DELETE statement and ALTER TABLE statement which affected one of the tables used in the multi-DELETE sometimes led to deadlock. Similar deadlocks might have occured when one performed INSERT/UPDATE/DELETE on a view and concurrently executed ALTER TABLE for the view's underlying table, or when one concurrently executed TRUNCATE TABLE for InnoDB table and ALTER TABLE for the same table. These deadlocks were caused by a discrepancy between types of metadata and thr_lock.cc locks acquired by those statements. What happened was that multi-DELETE/TRUNCATE/DML-through-the- view statement in the first connection acquired SR lock on a table, then ALTER TABLE would come in in the second connection and acquire SNW metadata lock and TL_WRITE_ALLOW_READ thr_lock.c lock and then would start waiting for the first connection during lock upgrade. After that the statement in the first connection would try to acquire TL_WRITE lock on table and would start waiting for the second connection, creating a deadlock. This patch solves this problem by ensuring that we acquire SW metadata lock in all cases in which we acquiring write thr_lock.c lock. This guarantees that deadlocks like the one described above won't occur since all lock conflicts in such situation are resolved within MDL subsystem. This patch also adds assert which should guarantee that such situations won't arise in future. ------------------------------------------------------------ revno: 2914.35.144 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Sat 2010-02-06 13:30:07 +0300 message: Merge next-4284 -> next-4284-merge ------------------------------------------------------------ revno: 2914.43.1 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug50912 timestamp: Sat 2010-02-06 10:44:03 +0100 message: Bug #50912 Assertion `ticket->m_type >= mdl_request->type' failed on HANDLER + I_S This assert was triggered when an I_S query tried to acquire a metadata lock on a table which was already locked by a HANDLER statement in the same connection. First the HANDLER took a MDL_SHARED lock. Afterwards, the I_S query requested a MDL_SHARED_HIGH_PRIO lock. The existing MDL_SHARED ticket is found in find_ticket() since it satisfies ticket->has_stronger_or_equal_type(mdl_request->type) as MDL_SHARED and MDL_SHARED_HIGH_PRIO have equal strengths, just different priority. However, two asserts later check lock type strengths using relational operators (>= and <=) rather than MDL_ticket::has_stronger_or_equal_type(). These asserts are triggered since MDL_SHARED >= MDL_SHARED_HIGH_PRIORITY is false (mapped to 1 and 2 respectively). This patch updates the asserts to use MDL_ticket::has_stronger_or_equal_type() rather than relational operators to check lock type strength. Test case added to include/handler.inc. ------------------------------------------------------------ revno: 2914.35.143 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Sat 2010-02-06 13:28:06 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.142 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Fri 2010-02-05 20:41:00 +0300 message: Merge next-4284 -> next-4284-merge. ------------------------------------------------------------ revno: 2914.42.1 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug50907 timestamp: Fri 2010-02-05 15:52:17 +0100 message: Bug #50907 Assertion `hash_tables->table->next == __null' on HANDLER OPEN The problem was a too restrictive assert in the code for HANDLER ... OPEN and HANDLER ... READ that checked table->next to verify that we didn't open views or merge tables. This pointer is also used to link temporary tables together (see thd->temporary_tables). In this case TABLE::next can be set even if we're trying to open a single table. This patch adjust the two asserts to also check for the presence of temporary tables. Test case added to handler_myisam.test. ------------------------------------------------------------ revno: 2914.35.141 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Fri 2010-02-05 20:04:38 +0300 message: next-mr -> next-4284 merge. After merge fixes. Adjust replication test cases. ------------------------------------------------------------ revno: 2914.35.140 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Fri 2010-02-05 18:05:13 +0300 message: Add a suppression for use of functions unsafe in statement format. ------------------------------------------------------------ revno: 2914.35.139 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Fri 2010-02-05 17:58:43 +0300 message: next-mr -> next-4284 merge: Change the error code for ER_WARN_I_S_SKIPPED_TABLE, to not upset the tests that rely on ER_SLAVE_CONVERSION_ERROR error code = 1667. Fix a merge bug with binlogging of CREATE TABLE (temporary tables). ------------------------------------------------------------ revno: 2914.35.138 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Fri 2010-02-05 13:25:32 +0300 message: next-mr -> next-4284 merge: fix a merge bug when write_bin_log called from mysql_routine_grant() would chew up the error. rpl_do_grant test would fail on assert that the diagnostics area is empty. ------------------------------------------------------------ revno: 2914.35.137 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Fri 2010-02-05 01:37:44 +0300 message: A post-merge fix for next-mr -> next-4284 merge: Make all mutexes and conditions of type mysql_mutex_t, mysql_cond_t, since it's now the expectation of THD::awake(). ------------------------------------------------------------ revno: 2914.35.136 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Fri 2010-02-05 01:08:08 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.135 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Thu 2010-02-04 23:15:47 +0300 message: Merge next-mr -> next-4284. Cherry-pick a fix Bug#37148 from next-mr, to preserve file ids of the added files, and ensure that all the necessary changes have been pulled. Since initially Bug#37148 was null-merged into 6.0, the changeset that is now being cherry-picked was likewise null merged into next-4284. Now that Bug#37148 has been reapplied to 6.0, try to make it work with next-4284. This is also necessary to be able to pull other changes from 5.1-rep into next-4284. To resolve the merge issues use this changeset applied to 6.0: revid:jperkin@sun.com-20091216103628-ylhqf7s6yegui2t9 revno: 3776.1.1 committer: He Zhenxing <zhenxing.he@sun.com> branch nick: 6.0-codebase-bugfixing timestamp: Thu 2009-12-17 17:02:50 +0800 message: Fix merge problem with Bug#37148 ------------------------------------------------------------ revno: 2914.35.134 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Thu 2010-02-04 20:34:15 +0300 message: Merge next-mr -> next-4284-merge. ------------------------------------------------------------ revno: 2914.35.133 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284 timestamp: Thu 2010-02-04 16:06:29 +0300 message: Small clean-up in CREATE TABLE LIKE implementation. Removed local variables which became unused when we have switched to new approach for CREATE TABLE LIKE (i.e. abondoned .FRM file copying) and were causing warnings during compilation. ------------------------------------------------------------ revno: 2914.35.132 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug50821 timestamp: Thu 2010-02-04 10:00:36 +0100 message: Bug #50821 Deadlock between LOCK TABLES and ALTER TABLE This was a deadlock between ALTER TABLE and another DML statement (or LOCK TABLES ... READ). ALTER TABLE would wait trying to upgrade its lock to MDL_EXCLUSIVE and the DML statement would wait trying to acquire a TL_READ_NO_INSERT table level lock. This could happen if one connection first acquired a MDL_SHARED_READ lock on a table. In another connection ALTER TABLE is then started. ALTER TABLE eventually blocks trying to upgrade to MDL_EXCLUSIVE, but while holding a TL_WRITE_ALLOW_READ table level lock. If the first connection then tries to acquire TL_READ_NO_INSERT, it will block and we have a deadlock since neither connection can proceed. This patch fixes the problem by allowing TL_READ_NO_INSERT locks to be granted if another connection holds TL_WRITE_ALLOW_READ on the same table. This will allow the DML statement to proceed such that it eventually can release its MDL lock which in turn makes ALTER TABLE able to proceed. Note that TL_READ_NO_INSERT was already partially compatible with TL_WRITE_ALLOW_READ as the latter would be granted if the former lock was held. This patch just makes the opposite true as well. Also note that since ALTER TABLE takes an upgradable MDL lock, there will be no starvation of ALTER TABLE statements by statements acquiring TL_READ or TL_READ_NO_INSERT. Test case added to lock_sync.test. ------------------------------------------------------------ revno: 2914.35.131 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-hash timestamp: Thu 2010-02-04 09:25:32 +0300 message: Improve concurrency in metadata locking subsystem by moving calculation of hash value when looking up MDL_lock objects in MDL_map out of critical section. ------------------------------------------------------------ revno: 2914.35.130 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Thu 2010-02-04 01:06:07 +0300 message: Merge next-4284 -> next-4284-merge ------------------------------------------------------------ revno: 2914.41.1 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284 timestamp: Wed 2010-02-03 22:55:46 +0300 message: A follow-up for the patch which implemented new type-of-operation-aware metadata locks and added a wait-for graph based deadlock detector to the MDL subsystem (this patch fixed bug #46272 "MySQL 5.4.4, new MDL: unnecessary deadlock" and bug #37346 "innodb does not detect deadlock between update and alter table"). Removed unused and redundant method. ------------------------------------------------------------ revno: 2914.35.129 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Thu 2010-02-04 00:48:40 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.128 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Wed 2010-02-03 18:12:39 +0300 message: Merge next-4248 -> next-4284-merge ------------------------------------------------------------ revno: 2914.40.1 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug50786 timestamp: Wed 2010-02-03 15:09:27 +0100 message: Bug #50786 Assertion `thd->mdl_context.trans_sentinel() == __null' failed in open_ltable() The problem was too restrictive asserts that enforced that open_ltable() was called without any active HANDLERs, LOCK TABLES or global read locks. However, this can happen in several cases when opening system tables. The assert would, for example, be triggered when drop function was called from a connection with active HANDLERs as this would cause open_ltable() to be called for mysql.proc. The assert could also be triggered when using table-based general log (mysql.general_log). This patch removes the asserts since they will be triggered in several legitimate cases and because the asserts are no longer relevant due to changes in how locks are released. The patch also fixes set_needs_thr_lock_abort() that before ignored its parameter and always set the member variable to TRUE. Test case added to mdl_sync.test. Thanks to Dmitry Lenev for help with this bug! ------------------------------------------------------------ revno: 2914.35.127 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Wed 2010-02-03 18:10:56 +0300 message: Fix a failure of rpl_cross_version, caused by hand-initalization of the TABLE_LIST instance, which did not initialize the MDL request properly. Use init_one_table() to initialize the MDL request. ------------------------------------------------------------ revno: 2914.35.126 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Wed 2010-02-03 17:10:36 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.125 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Wed 2010-02-03 16:43:03 +0300 message: Merge next-mr -> next-4284 ------------------------------------------------------------ revno: 2914.35.124 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Wed 2010-02-03 14:10:37 +0300 message: Merge next-4284 -> next-4284-merge. ------------------------------------------------------------ revno: 2914.39.1 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-bg50784 timestamp: Wed 2010-02-03 08:32:38 +0300 message: Fix for bug #50784 "MDL: Assertion `m_tickets.is_empty() || m_tickets.front() == m_trans_sentinel'". Debug build of server crashed due to assert failure in MDL subsystem when one tried to execute multi-table REPAIR or OPTIMIZE in autocommit=0 mode. The assert failure occured when multi-table REPAIR or OPTIMIZE started processing of second table from its table list and tried to acquire upgradable metadata lock on this table. The cause of the assert failure were MDL locks left over from processing of previous table. It turned out that in autocommit=0 mode close_thread_tables() which happens at the end of table processing doesn't release metadata locks. This fix solves problem by releasing locks explicitly using MDL_context::release_trans_locks() call. ------------------------------------------------------------ revno: 2914.35.123 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Wed 2010-02-03 14:09:36 +0300 message: Merge next-mr -> next-4284. Post merge fixes. In sys_vars tests suite, whenever we use LOCK TABLE WRITE, adjust to lock the subject table indirecty via a view, to ensure that there the desired lock conflict in thr_lock.c is still taking place. If locked directly in LOCK TABLES list, thr_lock.c does not get involved. Adjust the thread wait state names in information_schema.processlist. ------------------------------------------------------------ revno: 2914.35.122 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Wed 2010-02-03 03:06:42 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.121 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Tue 2010-02-02 16:58:15 +0300 message: Merge next-mr -> next-4284. Fix Bug#50555 "handler commands crash server in my_hash_first()" as a post-merge fix (the new handler tests are not passing otherwise). - in hash.c, don't call calc_hash if ! my_hash_inited(). - add tests and results for the test case for Bug#50555 ------------------------------------------------------------ revno: 2914.35.120 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Tue 2010-02-02 12:22:17 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.119 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Tue 2010-02-02 02:22:16 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.118 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284-merge timestamp: Tue 2010-02-02 00:21:54 +0300 message: next-4284-merge: temporarily disable failing SSL tests. ------------------------------------------------------------ revno: 2914.35.117 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-nl-push timestamp: Mon 2010-02-01 20:59:59 +0300 message: Fix for sporadical hangs of mdl_sync.test caused by patch which implemented new type-of-operation-aware metadata locks and added a wait-for graph based deadlock detector to the MDL subsystem (this patch fixed bug #46272 "MySQL 5.4.4, new MDL: unnecessary deadlock" and bug #37346 "innodb does not detect deadlock between update and alter table"). These hangs were caused by missing include of wait_condition.inc. This fix simply adds them. ------------------------------------------------------------ revno: 2914.35.116 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-nl-push timestamp: Mon 2010-02-01 17:38:50 +0300 message: Fix for sporadical crashes of lock_multi_bug38499.test caused by patch which implemented new type-of-operation-aware metadata locks and added a wait-for graph based deadlock detector to the MDL subsystem (this patch fixed bug #46272 "MySQL 5.4.4, new MDL: unnecessary deadlock" and bug #37346 "innodb does not detect deadlock between update and alter table"). Crashes were caused by a race in MDL_context::try_acquire_lock(). This method added MDL_ticket to the list of granted tickets and released lock protecting list before setting MDL_ticket::m_lock. Thus some other thread was able to see ticket without properly set m_lock member for some short period of time. If this thread called method involving this member during this period crash happened. This fix ensures that MDL_ticket::m_lock is set in all cases when ticket is added to granted/pending lists in MDL_lock. ------------------------------------------------------------ revno: 2914.35.115 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Mon 2010-02-01 17:12:56 +0300 message: Fix a Windows compilation warning (req_count is later used in a pointer arithmetics expression). ------------------------------------------------------------ revno: 2914.35.114 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-nl-push timestamp: Mon 2010-02-01 14:43:06 +0300 message: Implement new type-of-operation-aware metadata locks. Add a wait-for graph based deadlock detector to the MDL subsystem. Fixes bug #46272 "MySQL 5.4.4, new MDL: unnecessary deadlock" and bug #37346 "innodb does not detect deadlock between update and alter table". The first bug manifested itself as an unwarranted abort of a transaction with ER_LOCK_DEADLOCK error by a concurrent ALTER statement, when this transaction tried to repeat use of a table, which it has already used in a similar fashion before ALTER started. The second bug showed up as a deadlock between table-level locks and InnoDB row locks, which was "detected" only after innodb_lock_wait_timeout timeout. A transaction would start using the table and modify a few rows. Then ALTER TABLE would come in, and start copying rows into a temporary table. Eventually it would stumble on the modified records and get blocked on a row lock. The first transaction would try to do more updates, and get blocked on thr_lock.c lock. This situation of circular wait would only get resolved by a timeout. Both these bugs stemmed from inadequate solutions to the problem of deadlocks occurring between different locking subsystems. In the first case we tried to avoid deadlocks between metadata locking and table-level locking subsystems, when upgrading shared metadata lock to exclusive one. Transactions holding the shared lock on the table and waiting for some table-level lock used to be aborted too aggressively. We also allowed ALTER TABLE to start in presence of transactions that modify the subject table. ALTER TABLE acquires TL_WRITE_ALLOW_READ lock at start, and that block all writes against the table (naturally, we don't want any writes to be lost when switching the old and the new table). TL_WRITE_ALLOW_READ lock, in turn, would block the started transaction on thr_lock.c lock, should they do more updates. This, again, lead to the need to abort such transactions. The second bug occurred simply because we didn't have any mechanism to detect deadlocks between the table-level locks in thr_lock.c and row-level locks in InnoDB, other than innodb_lock_wait_timeout. This patch solves both these problems by moving lock conflicts which are causing these deadlocks into the metadata locking subsystem, thus making it possible to avoid or detect such deadlocks inside MDL. To do this we introduce new type-of-operation-aware metadata locks, which allow MDL subsystem to know not only the fact that transaction has used or is going to use some object but also what kind of operation it has carried out or going to carry out on the object. This, along with the addition of a special kind of upgradable metadata lock, allows ALTER TABLE to wait until all transactions which has updated the table to go away. This solves the second issue. Another special type of upgradable metadata lock is acquired by LOCK TABLE WRITE. This second lock type allows to solve the first issue, since abortion of table-level locks in event of DDL under LOCK TABLES becomes also unnecessary. Below follows the list of incompatible changes introduced by this patch: - From now on, ALTER TABLE and CREATE/DROP TRIGGER SQL (i.e. those statements that acquire TL_WRITE_ALLOW_READ lock) wait for all transactions which has *updated* the table to complete. - From now on, LOCK TABLES ... WRITE, REPAIR/OPTIMIZE TABLE (i.e. all statements which acquire TL_WRITE table-level lock) wait for all transaction which *updated or read* from the table to complete. As a consequence, innodb_table_locks=0 option no longer applies to LOCK TABLES ... WRITE. - DROP DATABASE, DROP TABLE, RENAME TABLE no longer abort statements or transactions which use tables being dropped or renamed, and instead wait for these transactions to complete. - Since LOCK TABLES WRITE now takes a special metadata lock, not compatible with with reads or writes against the subject table and transaction-wide, thr_lock.c deadlock avoidance algorithm that used to ensure absence of deadlocks between LOCK TABLES WRITE and other statements is no longer sufficient, even for MyISAM. The wait-for graph based deadlock detector of MDL subsystem may sometimes be necessary and is involved. This may lead to ER_LOCK_DEADLOCK error produced for multi-statement transactions even if these only use MyISAM: session 1: session 2: begin; update t1 ... lock table t2 write, t1 write; -- gets a lock on t2, blocks on t1 update t2 ... (ER_LOCK_DEADLOCK) - Finally, support of LOW_PRIORITY option for LOCK TABLES ... WRITE was abandoned. LOCK TABLE ... LOW_PRIORITY WRITE from now on has the same priority as the usual LOCK TABLE ... WRITE. SELECT HIGH PRIORITY no longer trumps LOCK TABLE ... WRITE in the wait queue. - We do not take upgradable metadata locks on implicitly locked tables. So if one has, say, a view v1 that uses table t1, and issues: LOCK TABLE v1 WRITE; FLUSH TABLE t1; -- (or just 'FLUSH TABLES'), an error is produced. In order to be able to perform DDL on a table under LOCK TABLES, the table must be locked explicitly in the LOCK TABLES list. ------------------------------------------------------------ revno: 2914.35.113 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-concurr timestamp: Thu 2010-01-21 23:43:03 +0300 message: Patch that changes metadata locking subsystem to use mutex per lock and condition variable per context instead of one mutex and one conditional variable for the whole subsystem. This should increase concurrency in this subsystem. It also opens the way for further changes which are necessary to solve such bugs as bug #46272 "MySQL 5.4.4, new MDL: unnecessary deadlock" and bug #37346 "innodb does not detect deadlock between update and alter table". Two other notable changes done by this patch: - MDL subsystem no longer implicitly acquires global intention exclusive metadata lock when per-object metadata lock is acquired. Now this has to be done by explicit calls outside of MDL subsystem. - Instead of using separate MDL_context for opening system tables/tables for purposes of I_S we now create MDL savepoint in the main context before opening tables and rollback to this savepoint after closing them. This means that it is now possible to get ER_LOCK_DEADLOCK error even not inside a transaction. This might happen in unlikely case when one runs DDL on one of system tables while also running DDL on some other tables. Cases when this ER_LOCK_DEADLOCK error is not justified will be addressed by advanced deadlock detector for MDL subsystem which we plan to implement. ------------------------------------------------------------ revno: 2914.35.112 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug50412 timestamp: Wed 2010-01-20 09:17:31 +0100 message: Bug #50412 Assertion `! is_set()' failed in Diagnostics_area::set_ok_status at PREPARE The problem occured during processing of stored routines. Routines are loaded from mysql.proc, parsed and put into the sp cache by sp_cache_routine(). The assert occured because the return value from sp_cache_routine() was not checked for top level CALLs. This meant that any errors during sp_cache_routine() went unoticed and triggered the assert when my_ok() was later called. This is a regression introduced by the patch for Bug#30977, only visible in source trees with MDL and using debug builds of the server. This patch fixes the problem by checking the return value from sp_cache_routine() for top level CALLs and propagating any errors similar to what is done for other calls to sp_cache_routine(). No test case added. ------------------------------------------------------------ revno: 2914.35.111 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-mytest timestamp: Fri 2010-01-15 12:47:22 +0100 message: Bug #43685 Lock table affects other non-related tables The problem was that FLUSH TABLE <table_list> would block, waiting for all tables with old versions to be removed from the table definition cache, rather than waiting for only the tables in <table_list>. This could happen if FLUSH TABLE was used in combination with LOCK TABLES. With the new MDL code, this problem is no longer repeatable. Regression test case added to lock.test. This commit contains no code changes. ------------------------------------------------------------ revno: 2914.35.110 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp timestamp: Thu 2010-01-14 14:03:24 +0100 message: Partial backport of: revno: 2762 [merge] committer: Matthias Leich <mleich@mysql.com> branch nick: mysql-6.0-bugteam-push timestamp: Wed 2008-08-13 22:05:34 +0200 message: Upmerge 5.1 -> 6.0 ------------------------------------------------------------ revno: 2497.374.2 committer: Matthias Leich <mleich@mysql.com> branch nick: mysql-5.1-bugteam-push timestamp: Wed 2008-08-13 21:44:54 +0200 message: Fix for Bug#37853 Test "funcs_1.processlist_val_ps" fails in various ways + corrections of logic in poll routines + minor improvements ------------------------------------------------------------ revno: 2914.35.109 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug49988_simple timestamp: Tue 2010-01-12 16:15:21 +0100 message: Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache This was a deadlock between LOCK TABLES/CREATE DATABASE in one connection and DROP DATABASE in another. It only happened if the table locked by LOCK TABLES was in the database to be dropped. The deadlock is similar to the one in Bug#48940, but with LOCK TABLES instead of an active transaction. The order of events needed to trigger the deadlock was: 1) Connection 1 locks table db1.t1 using LOCK TABLES. It will now have a metadata lock on the table name. 2) Connection 2 issues DROP DATABASE db1. This will wait inside the MDL subsystem for the lock on db1.t1 to go away. While waiting, it will hold the LOCK_mysql_create_db mutex. 3) Connection 1 issues CREATE DATABASE (database name irrelevant). This will hang trying to lock the same mutex. Since this is the connection holding the metadata lock blocking Connection 2, we have a deadlock. This deadlock would also happen for earlier trees without MDL, but there DROP DATABASE would wait for a table to be removed from the table definition cache. This patch fixes the problem by prohibiting CREATE DATABASE in LOCK TABLES mode. In the example above, this prevents Connection 1 from hanging trying to get the LOCK_mysql_create_db mutex. Note that other commands that use LOCK_mysql_create_db (ALTER/DROP DATABASE) are already prohibited in LOCK TABLES mode. Incompatible change: CREATE DATABASE is now disallowed in LOCK TABLES mode. Test case added to schema.test. ------------------------------------------------------------ revno: 2914.35.108 committer: Tor Didriksen <tor.didriksen@sun.com> branch nick: next-4284 timestamp: Tue 2010-01-12 12:32:55 +0100 message: Backport of Bug#45523 "Objects of class base_ilist should not be copyable". Suppress the compiler-generated public copy constructor and assignment operator of class base_ilist; instead, implement move_elements_to() function which transfers ownership of elements from one list to another. ------------------------------------------------------------ revno: 2914.35.107 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug48538 timestamp: Fri 2010-01-08 11:26:32 +0100 message: Fix for bug #48538 "Assertion in thr_lock() on LOAD DATA CONCURRENT INFILE". Attempts to execute an INSERT statement for a MEMORY table which invoked a trigger or called a stored function which tried to perform LOW_PRIORITY update on the table being inserted into, resulted in debug servers aborting due to an assertion failure. On non-debug servers such INSERTs failed with "Can't update table t1 in stored function/trigger because it is already used by statement which invoked this stored function/trigger" as expected. The problem was that in the above scenario TL_WRITE_CONCURRENT_INSERT is converted to TL_WRITE inside the thr_lock() function since the MEMORY engine does not support concurrent inserts. This triggered an assertion which assumed that for the same table, one thread always requests locks with higher thr_lock_type value first. When TL_WRITE_CONCURRENT_INSERT is upgraded to TL_WRITE after the locks have been sorted, this is no longer true. In this case, TL_WRITE was requested after acquiring a TL_WRITE_LOW_PRIORITY lock on the table, triggering the assert. This fix solves the problem by adjusting this assert to take this scenario into account. An alternative approach to change handler::store_locks() methods for all engines which do not support concurrent inserts in such way that TL_WRITE_CONCURRENT_INSERT is upgraded to TL_WRITE there instead, was considered too intrusive. Commit on behalf of Dmitry Lenev. ------------------------------------------------------------ revno: 2914.35.106 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-4284-deadlock timestamp: Wed 2009-12-30 20:53:30 +0300 message: Implementation of simple deadlock detection for metadata locks. This change is supposed to reduce number of ER_LOCK_DEADLOCK errors which occur when multi-statement transaction encounters conflicting metadata lock in cases when waiting is possible. The idea is not to fail ER_LOCK_DEADLOCK error immediately when we encounter conflicting metadata lock. Instead we release all metadata locks acquired by current statement and start to wait until conflicting lock go away. To avoid deadlocks we use simple empiric which aborts waiting with ER_LOCK_DEADLOCK error if it turns out that somebody is waiting for metadata locks owned by this transaction. This patch also fixes bug #46273 "MySQL 5.4.4 new MDL: Bug#989 is not fully fixed in case of ALTER". The bug was that concurrent execution of UPDATE or MULTI-UPDATE statement as a part of multi-statement transaction that already has used table being updated and ALTER TABLE statement might have resulted of loss of isolation between this transaction and ALTER TABLE statement, which manifested itself as changes performed by ALTER TABLE becoming visible in transaction and wrong binary log order as a consequence. This problem occurred when UPDATE or MULTI-UPDATE's wait in mysql_lock_tables() call was aborted due to metadata lock upgrade performed by concurrent ALTER TABLE. After such abort all metadata locks held by transaction were released but transaction silently continued to be executed as if nothing has happened. We solve this problem by changing our code not to release all locks in such case. Instead we release only locks which were acquired by current statement and then try to reacquire them by restarting open/lock tables process. We piggyback on simple deadlock detector implementation since this change has to be done anyway for it. ------------------------------------------------------------ revno: 2914.35.105 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Tue 2009-12-29 21:12:06 +0300 message: Disable test case for Bug#49972. ------------------------------------------------------------ revno: 2914.35.104 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-4284 timestamp: Tue 2009-12-29 18:50:01 +0300 message: A test case for Bug#49972 (Crash in prepared statements). ------------------------------------------------------------ revno: 2914.35.103 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-30977 timestamp: Tue 2009-12-29 15:19:05 +0300 message: Apply and review: 3655 Jon Olav Hauglid 2009-10-19 Bug #30977 Concurrent statement using stored function and DROP FUNCTION breaks SBR Bug #48246 assert in close_thread_table Implement a fix for: Bug #41804 purge stored procedure cache causes mysterious hang for many minutes Bug #49972 Crash in prepared statements The problem was that concurrent execution of DML statements that use stored functions and DDL statements that drop/modify the same function might result in incorrect binary log in statement (and mixed) mode and therefore break replication. This patch fixes the problem by introducing metadata locking for stored procedures and functions. This is similar to what is done in Bug#25144 for views. Procedures and functions now are locked using metadata locks until the transaction is either committed or rolled back. This prevents other statements from modifying the procedure/function while it is being executed. This provides commit ordering - guaranteeing serializability across multiple transactions and thus fixes the reported binlog problem. Note that we do not take locks for top-level CALLs. This means that procedures called directly are not protected from changes by simultaneous DDL operations so they are executed at the state they had at the time of the CALL. By not taking locks for top-level CALLs, we still allow transactions to be started inside procedures. This patch also changes stored procedure cache invalidation. Upon a change of cache version, we no longer invalidate the entire cache, but only those routines which we use, only when a statement is executed that uses them. This patch also changes the logic of prepared statement validation. A stored procedure used by a prepared statement is now validated only once a metadata lock has been acquired. A version mismatch causes a flush of the obsolete routine from the cache and statement reprepare. Incompatible changes: 1) ER_LOCK_DEADLOCK is reported for a transaction trying to access a procedure/function that is locked by a DDL operation in another connection. 2) Procedure/function DDL operations are now prohibited in LOCK TABLES mode as exclusive locks must be taken all at once and LOCK TABLES provides no way to specifiy procedures/functions to be locked. Test cases have been added to sp-lock.test and rpl_sp.test. Work on this bug has very much been a team effort and this patch includes and is based on contributions from Davi Arnaut, Dmitry Lenev, Magne M?hre and Konstantin Osipov. ------------------------------------------------------------ revno: 2914.35.102 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-46224 timestamp: Tue 2009-12-22 19:09:15 +0300 message: A prerequisite patch for the fix for Bug#46224 "HANDLER statements within a transaction might lead to deadlocks". Introduce a notion of a sentinel to MDL_context. A sentinel is a ticket that separates all tickets in the context into two groups: before and after it. Currently we can have (and need) only one designated sentinel -- it separates all locks taken by LOCK TABLE or HANDLER statement, which must survive COMMIT and ROLLBACK and all other locks, which must be released at COMMIT or ROLLBACK. The tricky part is maintaining the sentinel up to date when someone release its corresponding ticket. This can happen, e.g. if someone issues DROP TABLE under LOCK TABLES (generally, see all calls to release_all_locks_for_name()). MDL_context::release_ticket() is modified to take care of it. ****** A fix and a test case for Bug#46224 "HANDLER statements within a transaction might lead to deadlocks". An attempt to mix HANDLER SQL statements, which are transaction- agnostic, an open multi-statement transaction, and DDL against the involved tables (in a concurrent connection) could lead to a deadlock. The deadlock would occur when HANDLER OPEN or HANDLER READ would have to wait on a conflicting metadata lock. If the connection that issued HANDLER statement also had other metadata locks (say, acquired in scope of a transaction), a classical deadlock situation of mutual wait could occur. Incompatible change: entering LOCK TABLES mode automatically closes all open HANDLERs in the current connection. Incompatible change: previously an attempt to wait on a lock in a connection that has an open HANDLER statement could wait indefinitely/deadlock. After this patch, an error ER_LOCK_DEADLOCK is produced. The idea of the fix is to merge thd->handler_mdl_context with the main mdl_context of the connection, used for transactional locks. This makes deadlock detection possible, since all waits with locks are "visible" and available to analysis in a single MDL context of the connection. Since HANDLER locks and transactional locks have a different life cycle -- HANDLERs are explicitly open and closed, and so are HANDLER locks, explicitly acquired and released, whereas transactional locks "accumulate" till the end of a transaction and are released only with COMMIT, ROLLBACK and ROLLBACK TO SAVEPOINT, a concept of "sentinel" was introduced to MDL_context. All locks, HANDLER and others, reside in the same linked list. However, a selected element of the list separates locks with different life cycle. HANDLER locks always reside at the end of the list, after the sentinel. Transactional locks are prepended to the beginning of the list, before the sentinel. Thus, ROLLBACK, COMMIT or ROLLBACK TO SAVEPOINT, only release those locks that reside before the sentinel. HANDLER locks must be released explicitly as part of HANDLER CLOSE statement, or an implicit close. The same approach with sentinel is also employed for LOCK TABLES locks. Since HANDLER and LOCK TABLES statement has never worked together, the implementation is made simple and only maintains one sentinel, which is used either for HANDLER locks, or for LOCK TABLES locks. ------------------------------------------------------------ revno: 2914.35.101 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-mytest timestamp: Thu 2009-12-17 16:40:02 +0100 message: Partial backport of: ------------------------------------------------------------ revno: 2617.14.26 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-6.0-wtf timestamp: Wed 2008-11-05 11:19:19 +0100 message: CMakeLists.txt files cleanup. - remove SAFEMALLOC and SAFE_MUTEX definitions that were present in *each* CMakeLists.txt. Instead, put them into top level MakeLists.txt, but disable on Windows, because a) SAFEMALLOC does not add any functionality that is not already present in Debug C runtime ( and 2 safe malloc one on top of the other only unnecessarily slows down the server) b)SAFE_MUTEX does not work on Windows and have been explicitely disabled on Windows with #undef previously. Fortunately, ntdll does pretty good job identifying l problems with CRITICAL_SECTIONs. (DebugBreak()s on using uninited critical section, unlocking unowned critical section) -Remove occationally used -D_DEBUG (added by compiler anyway) -Remove MAP file generation, it became obsolete . There are many ways to get callstack of a crash now, with stacktrace in error log , minidump etc ------------------------------------------------------------ revno: 2914.35.100 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug48724 timestamp: Thu 2009-12-17 13:43:07 +0100 message: Bug #48724 Deadlock between INSERT DELAYED and FLUSH TABLES If the handler (or delayed insert) thread failed to lock a table due to being killed, the "dead" flag was used to notify the connection thread of this failure. However, with the changes introduced by Bug#45949, the handler thread will no longer try to lock the table if it was killed. This meant that the "dead" flag would not be set, and the connection thread would not notice that the handler thread had failed. This could happen with concurrent INSERT DELAYED and FLUSH TABLES. FLUSH TABLES would kill any active INSERT DELAYED that had opened any table(s) to be flushed. This could cause the INSERT DELAYED connection thread to be stuck waiting for the handler thread to lock its table, while the handler thread would be looping, trying to get the connection thread to notice the error. The root of the problem was that the handler thread had both the "dead" flag and "thd->killed" to indicate that it had been killed. Most places both were set, but some only set "thd->killed". And Delayed_insert::get_local_table() only checked "dead" while waiting for the table to be locked. This patch removes the "dead" variable and replaces its usage with "thd->killed", thereby resolving the issue. ------------------------------------------------------------ revno: 2914.35.99 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug48541 timestamp: Wed 2009-12-16 12:32:11 +0100 message: Bug #48541 Deadlock between LOCK_open and LOCK_mdl The reason for the deadlock was an improper exit from MDL_context::wait_for_locks() which caused mysys_var->current_mutex to remain LOCK_mdl even though LOCK_mdl was no longer held by that connection. This could for example lead to a deadlock in the following way: 1) INSERT DELAYED tries to open a table but fails, and trying to recover it calls wait_for_locks(). 2) Due to a pending exclusive request, wait_for_locks() fails and exits without resetting mysys_var->current_mutex for the delayed insert handler thread. So it continues to point to LOCK_mdl. 3) The handler thread manages to open a table. 4) A different connection takes LOCK_open and tries to take LOCK_mdl. 5) FLUSH TABLES from a third connection notices that the handler thread has a table open, and tries to kill it. This involves locking mysys_var->current_mutex while having LOCK_open locked. Since current_mutex mistakenly points to LOCK_mdl, we have a deadlock. This patch makes sure MDL_EXIT_COND() is called before exiting wait_for_locks(). This clears mysys->current_mutex which resolves the issue. An assert is added to recover_from_failed_open_table_attempt() after wait_for_locks() is called, to check that current_mutex is indeed reset. With this assert in place, existing tests in (e.g.) mdl_sync.test will fail without this patch. ------------------------------------------------------------ revno: 2914.35.98 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-16 11:33:54 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.97 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-16 11:15:40 +0300 message: Merge next-mr -> next-4284. Null-merge the fix for Bug#37148, since it is null-merged into 6.0. ------------------------------------------------------------ revno: 2914.35.96 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-16 10:48:07 +0300 message: Merge next-mr -> next-4284 ------------------------------------------------------------ revno: 2914.35.95 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-15 22:59:07 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.94 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-15 22:03:56 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.93 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-15 21:45:22 +0300 message: Merge next-mr -> next-4284. ------------------------------------------------------------ revno: 2914.35.92 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bug48940 timestamp: Tue 2009-12-15 14:18:10 +0100 message: Bug #48940 MDL deadlocks against mysql_rm_db This deadlock would occur between two connections A and B if statements where executed in the following way: 1) Connection A executes a DML statement against table s1.t1 with autocommit off. This causes a shared metadata lock on s1.t1 to be acquired. (With autocommit on, the metadata lock will be dropped once the statment completes and the deadlock will not occour.) 2) Connection B tries to DROP DATABASE s1. This will block against the metadata lock connection A holds on s1.t1. While blocking, connection B will hold the LOCK_mysql_create_db mutex. 3) Connection A tries to ALTER DATABASE s1. This will block when trying to get LOCK_mysql_create_db mutex held by connection B. 4) Deadlock between DROP DATABASE and ALTER DATABASE (which has autocommit off). If Connection A used an explicitly started transaction rather than having autocommit off, this deadlock did not happen as ALTER DATABASE is disallowed inside transactions. This patch fixes the problem by changing ALTER DATABASE to cause an implicit commit before executing. This will cause the metadata lock on s1.t1 to be dropped, allowing DROP DATABASE to proceed. This will in turn cause the LOCK_mysql_create_db mutex to be unlocked, allowing ALTER DATABASE to proceed. Note that SQL commands other than ALTER DATABASE that also use LOCK_mysql_create_db, already cause an implicit commit. Incompatible change: ALTER DATABASE (and its synonym ALTER SCHEMA) now cause an implicit commit. This must be reflected in the documentation. Test case added to schema.test. ------------------------------------------------------------ revno: 2914.35.91 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-11 15:24:23 +0300 message: Backport of: ------------------------------------------------------------ 2599.161.3 Ingo Struewing 2009-07-21 Bug#20667 - Truncate table fails for a write locked table TRUNCATE TABLE was not allowed under LOCK TABLES. The patch removes this restriction. mysql_truncate() does now handle that case. ------------------------------------------------------------ revno: 2914.35.90 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-11 14:18:59 +0300 message: Backport of: ----------------------------------------------------------- 2630.28.28 Magne Mahre 2008-12-05 Bug #38661 'all threads hang in "opening tables" or "waiting for table" and cpu is at 100%' Concurrent execution of FLUSH TABLES statement and at least two statements using the same table might have led to live-lock which caused all three connections to stall and hog 100% of CPU. tdc_wait_for_old_versions() wrongly assumed that there cannot be a share with an old version and no used TABLE instances and thus was failing to perform wait in situation when such old share was cached in MDL subsystem thanks to a still active metadata lock on the table. So it might have happened that two or more connections simultaneously executing statements which involve table being flushed managed to prevent each other from waiting in this function by keeping shared metadata lock on the table constantly active (i.e. one of the statements managed to take/hold this lock while other statements were calling tdc_wait_for_old_versions()). Thus they were forcing each other to loop infinitely in open_tables() - close_thread_tables_for_reopen() - tdc_wait_for_old_versions() cycle causing CPU hogging. This patch fixes this problem by removing this false assumption from tdc_wait_for_old_versions(). Note that the problem is specific only for server versions >= 6.0. No test case is submitted for this test, as the test infrastructure hasn't got the necessary primitives to test the behaviour. The manifestation is that throughput will decrease to a low level (possibly 0) after some time, and stay at that level. Several transactions will not complete. Manual testing can be done by running the code submitted by Shane Bester attached to the bug report. If the bug persists, the transaction thruput will almost immediately drop to near zero (shown as the transaction count output from the test program staying on a close to constant value, instead of increasing rapidly). ------------------------------------------------------------ revno: 2914.35.89 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-11 14:12:47 +0300 message: Partial backport of: ----------------------------------------------------------- 2497.392.1 Michael Widenius 2008-08-19 Fixes for Bug #38016 Maria: trying to access freed memory when committing a transaction. Don't write out states if they haven't changed. ------------------------------------------------------------ revno: 2914.35.88 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-11 14:07:38 +0300 message: Partial backport of: ---------------------------------------------------- 2736.2.10 Michael Widenius 2008-10-22 Fix for bug#39395 Maria: ma_extra.c:286: maria_extra: Assertion `share->reopen == 1' failed ------------------------------------------------------------ revno: 2914.35.87 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-11 13:39:45 +0300 message: Merge with next-4284. ------------------------------------------------------------ revno: 2914.38.7 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-next-4284 timestamp: Thu 2009-12-10 16:22:41 +0100 message: Bug#46374 crash, INSERT INTO t1 uses function, function modifies t1 An error occuring in the execution of a stored procedure, called from do_select is masked, since the error condition is not propagated back to the caller (join->conds->val_int() returns a result value, and not an error code) An explicit check was added to see if the thd error code has been set, and if so, the loop status is set to the error state. Backport from 6.0-codebase (revid: 2617.68.31) ------------------------------------------------------------ revno: 2914.38.6 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-next-4284 timestamp: Thu 2009-12-10 15:49:15 +0100 message: Bug#41425 Assertion in Protocol::end_statement() (pushbuild2) (diagnostics_area) Execution of CREATE TABLE ... SELECT statement was not atomic in the sense that concurrent statements trying to affect its target table might have sneaked in between the moment when the table was created and moment when it was filled according to SELECT clause. This resulted in inconsistent binary log, unexpected target table contents. In cases when concurrent statement was a DDL statement CREATE TABLE ... SELECT might have failed with ER_CANT_LOCK error. In more detail: Due to premature metadata lock downgrade which occured after CREATE TABLE SELECT statement created table but before it managed to obtain table-level lock on it other statements were allowed to open, lock and change target table in the middle of CREATE TABLE SELECT execution. This also meant that it was possible that CREATE TABLE SELECT would wait in mysql_lock_tables() when it was called for newly created table and that this wait could have been aborted by concurrent DDL. The latter led to execution of unexpected branch of code and CREATE TABLE SELECT ending with ER_CANT_LOCK error. The premature downgrade occured because open_table(), which was called for newly created table, decided that it is OK to downgrade metadata lock from exclusive to shared since table exists, even although it was not acquired within this call. This fix ensures that open_table() does not downgrade metadata lock if it is not acquired during its current invocation. Testing: The bug is exposed in a race condition, and is thus difficult to expose in a standard mysql-test-run test case. Instead, a stress test using the Random Query Generator (https://launchpad.net/randgen) will trip the problem occasionally. % perl runall.pl \ --basedir=<build dir> \ --mysqld=--table-lock-wait-timeout=5 \ --mysqld=--skip-safemalloc \ --grammar=conf/maria_bulk_insert.yy \ --reporters=ErrorLog,Backtrace,WinPackage \ --mysqld=--log-output=file \ --queries=100000 \ --threads=10 \ --engine=myisam Note: You will need a debug build to expose the bug When the bug is tripped, the server will abort and dump core. Backport from 6.0-codebase (revid: 2617.53.4) ------------------------------------------------------------ revno: 2914.38.5 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Thu 2009-12-10 15:09:56 +0100 message: Backport of revno: 3690 Postfix for Bug#48210 FLUSH TABLES WITH READ LOCK deadlocks against concurrent CREATE PROCEDURE Rewrote the second test to use DROP PROCEDURE instead of CREATE USER as CREATE USER does not work with embedded server. ------------------------------------------------------------ revno: 2914.38.4 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Thu 2009-12-10 15:09:00 +0100 message: Backport of revno: 3685 Bug #48210 FLUSH TABLES WITH READ LOCK deadlocks against concurrent CREATE PROCEDURE This deadlock occured between a) CREATE PROCEDURE (or other commands listed below) b) FLUSH TABLES WITH READ LOCK If the execution of them happened in the following order: - a) opens a table (e.g. mysql.proc) - b) locks the global read lock (or GRL) - a) sleeps inside wait_if_global_read_lock() - b) increases refresh_version and sleeps waiting for old tables to go away Note that a) must start waiting on the GRL before FLUSH increases refresh_version. Otherwise a) won't wait on the GRL and instead close its tables for reopen, allowing FLUSH to complete and thus avoid the deadlock. With this patch the deadlock is avoided by making CREATE PROCEDURE acquire a protection against global read locks before it starts executing. This means that FLUSH TABLES WITH READ LOCK will have to wait until CREATE PROCEDURE completes before acquiring the global read lock, thereby avoiding the deadlock. This is implemented by introducing a new SQL command flag called CF_PROTECT_AGAINST_GRL. Commands marked with this flag will acquire a GRL protection in the beginning of mysql_execute_command(). This patch adds the flag to CREATE, ALTER and DROP for PROCEDURE and FUNCTION, as well as CREATE USER, DROP USER, RENAME USER and REVOKE ALL. All these commands either call open_grant_tables() or open_system_table_for_updated() which make them susceptible for this deadlock. The patch also adds the CF_PROTECT_AGAINST_GRL flag to a number of commands that previously acquired GRL protection in their respective SQLCOM case in mysql_execute_command(). Test case that checks for GRL protection for CREATE PROCEDURE and CREATE USER added to mdl_sync.test. ------------------------------------------------------------ revno: 2914.38.3 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Thu 2009-12-10 14:41:41 +0100 message: Backport of revno: 2617.80.1 Also re-enables the test for Bug #43867 Followup to Bug#46654 False deadlock on concurrent DML/DDL with partitions, inconsistent behavior Partition_sync.test uses features only available in debug builds. Disabling the test for non-debug builds. ------------------------------------------------------------ revno: 2914.38.2 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Thu 2009-12-10 14:26:00 +0100 message: Backport of revno: 2617.68.37 Bug #46654 False deadlock on concurrent DML/DDL with partitions, inconsistent behavior The problem was that if one connection is running a multi-statement transaction which involves a single partitioned table, and another connection attempts to alter the table, the first connection gets ER_LOCK_DEADLOCK and cannot proceed anymore, even when the ALTER TABLE statement in another connection has timed out or failed. The reason for this was that the prepare phase for ALTER TABLE for partitioned tables removed all instances of the table from the table definition cache before it started waiting on the lock. The transaction running in the first connection would notice this and report ER_LOCK_DEADLOCK. This patch changes the prep_alter_part_table() ALTER TABLE code so that tdc_remove_table() is no longer called. Instead, only the TABLE instance changed by prep_alter_part_table() is marked as needing reopen. The patch also removes an unnecessary call to tdc_remove_table() from mysql_unpack_partition() as the changed TABLE object is destroyed by the caller at a later point. Test case added in partition_sync.test. ------------------------------------------------------------ revno: 2914.38.1 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Thu 2009-12-10 14:15:50 +0100 message: Backport of revno: 3514 Bug#40181 Made use of tdc_remove_table instead of just setting share->version to 0 to make sure all unused table instances go away as part of CREATE/ALTER TABLE. ------------------------------------------------------------ revno: 2914.35.86 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-10 16:43:04 +0300 message: Backport of: 2630.16.14 Sergei Golubchik 2008-08-25 fixed a crash in partition tests introduced by HA_EXTRA_PREPARE_FOR_DROP patch ------------------------------------------------------------ revno: 2914.35.85 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-10 16:38:03 +0300 message: Backport a part of Monty's fix for Bug#39396, rev. 2736.2.11 "ha_maria.cc:2415: assertion in ha_maria::store_lock()". ------------------------------------------------------------ revno: 2914.35.84 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Thu 2009-12-10 13:37:18 +0100 message: Backport of revno: 3673 Bug #47313 assert in check_key_in_view during CALL procedure View definitions are inlined in a stored procedure when the procedure is fist called. This means that if a temporary table is later added with the same name as the view, the stored procedure will still use the view. This happens even if temporary tables normally shadow base tables/views. The reason for the assert was that even if the stored procedure referenced the view, open_table() still tried to open the temporary table. This "half view/half temporary table" state caused the assert. The bug was not present in 5.1 as open_table() is not called for the view there. This code was changed with the introduction of MDL in order to properly lock the view and any objects it refers to. This patch fixes the problem by instructing open_table() to open base tables/views (using OT_BASE_ONLY) when reopening tables/views used by stored procedures. This also means that a prepared statement is no longer invalidated if a temporary table is created with the same name as a view used in the prepared statement. Test case added to sp.test. The test case also demonstrates the effect of sp cache invalidation between CALLs. ------------------------------------------------------------ revno: 2914.35.83 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp2 timestamp: Thu 2009-12-10 13:15:20 +0100 message: Backport of revno: 2617.68.45 Bug #47635 assert in start_waiting_global_read_lock during CREATE VIEW The problem was that CREATE VIEW would trigger an assert if a temporary table with the same name already existed. This bug was fixed by the patch for Bug#47335. CREATE/ALTER VIEW will now ignore temporary tables. See Bug#47335 for more information. Test case added to view.test. ------------------------------------------------------------ revno: 2914.35.82 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp2 timestamp: Thu 2009-12-10 13:02:37 +0100 message: Backport of revno: 2617.68.43 Bug #47335 assert in get_table_share The assert would happen if ALTER VIEW was used to alter a view (existing or non-existing) and a temporary table with the same name already existed. The assert is triggered if the current statement does not have a MDL lock on the view to be altered. This would happen because open_table() would open the temporary table instead and MDL locks are not taken for temporary tables (since they are local to one connection). The patch changes open_type for CREATE/ALTER VIEW to OT_BASE_ONLY. This prevents open_table() from trying to open a temporary table with the same name should one exist. Now the view will be altered if it exists or ER_NO_SUCH_TABLE will be reported if it does not. Test case added to view.test ------------------------------------------------------------ revno: 2914.35.81 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp2 timestamp: Thu 2009-12-10 12:46:16 +0100 message: Backport of revno: 2617.68.3 Followup to Bug#42546 Backup: RESTORE fails, thinking it finds an existing table This patch updates lowercase_table2.test with the changed error message CREATE TABLE produces if it fails because it finds an matching TABLE_SHARE in the TDC even if the .FRM/.MYD has been removed from disk. With the changes introduced in Bug#42546, CREATE TABLE uses open_tables() which will find the TDC entry and fail in open_table_from_share() with ER_FILE_NOT_FOUND. Before, CREATE TABLE would not use open_tables() and fail with ER_TABLE_EXISTS_ERROR upon finding the TDC entry in mysql_create_table_no_lock(). ------------------------------------------------------------ revno: 2914.35.80 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp2 timestamp: Thu 2009-12-10 11:53:20 +0100 message: Backport of revno: 2617.71.1 Bug#42546 Backup: RESTORE fails, thinking it finds an existing table The problem occured when a MDL locking conflict happened for a non-existent table between a CREATE and a INSERT statement. The code for CREATE interpreted this lock conflict to mean that the table existed, which meant that the statement failed when it should not have. The problem could occur for CREATE TABLE, CREATE TABLE LIKE and ALTER TABLE RENAME. This patch fixes the problem for CREATE TABLE and CREATE TABLE LIKE. It is based on code backported from the mysql-6.1-fk tree written by Dmitry Lenev. CREATE now uses normal open_and_lock_tables() code to acquire exclusive locks. This means that for the test case in the bug description, CREATE will wait until INSERT completes so that it can get the exclusive lock. This resolves the reported bug. The patch also prohibits CREATE TABLE and CREATE TABLE LIKE under LOCK TABLES. Note that this is an incompatible change and must be reflected in the documentation. Affected test cases have been updated. mdl_sync.test contains tests for CREATE TABLE and CREATE TABLE LIKE. Fixing the issue for ALTER TABLE RENAME is beyond the scope of this patch. ALTER TABLE cannot be prohibited from working under LOCK TABLES as this could seriously impact customers and a proper fix would require a significant rewrite. ------------------------------------------------------------ revno: 2914.35.79 committer: Magne Mahre <magne.mahre@sun.com> branch nick: mysql-next-4284 timestamp: Thu 2009-12-10 10:32:23 +0100 message: Bug #46495 Crash in reload_acl_and_cache on SIGHUP An assert in reload_acl_and_cache didn't account for the case when the function is called with a NULL thd. A null thd is used whenever the function is called from the SIGHUP signal handler. Backported from 6.0-codebase (revid: 2617.69.35) ------------------------------------------------------------ revno: 2914.35.78 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-10 11:41:03 +0300 message: Merge with next-4284. ------------------------------------------------------------ revno: 2914.37.10 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284 timestamp: Wed 2009-12-09 16:13:00 +0100 message: Backport of revno: 2617.68.18 Bug #42147 Concurrent DML and LOCK TABLE ... READ for InnoDB table cause warnings in errlog Concurrent execution of LOCK TABLES ... READ statement and DML statements affecting the same InnoDB table on debug builds of MySQL server might lead to "Found lock of type 6 that is write and read locked" warnings appearing in error log. The problem is that the table-level locking code allows a thread to acquire TL_READ_NO_INSERT lock on a table even if there is another thread which holds TL_WRITE_ALLOW_WRITE lock on the same table. At the same time, the locking code assumes that that such locks are incompatible (for example, see check_locks()). This doesn't lead to any problems other than warnings in error log for debug builds of server since for InnoDB tables TL_READ_NO_INSERT type of lock is only used for LOCK TABLES and for this statement InnoDB also performs its own table-level locking. Unfortunately, the table lock compatibility matrix cannot be updated to disallow TL_READ_NO_INSERT when another thread holds TL_WRITE_ALLOW_WRITE without causing starvation of LOCK TABLE READ in InnoDB under high write load. This patch therefore contains no code changes. The issue will be fixed later when LOCK TABLE READ has been updated to not use table locks. This bug will therefore be marked as "To be fixed later". Code comment in thr_lock.c expanded to clarify the issue and a test case based on the bug description added to innodb_mysql_lock.test. Note that a global suppression rule has been added to both MTR v1 and v2 for the "Found lock of type 6 that is write and read locked" warning. These suppression rules must be removed once this bug is properly fixed. ------------------------------------------------------------ revno: 2914.37.9 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Wed 2009-12-09 15:25:48 +0100 message: Backport of revno: 2617.68.13 Introduce a counter for protection against global read lock on thread level. The functions for protection against global read lock sometimes need a local variable to signal when the protection is set, and hence need to be released. It would be better to control this behaviour via a counter on the THD struct, telling how many times the protection has been claimed by the current thread. A side-effect of the fix is that if protection is claimed twice for a thread, only a simple increment is required for the second claim, instead of a mutex-protected increment of the global variable protect_against_global_read_lock. ------------------------------------------------------------ revno: 2914.37.8 committer: lars-erik.bjork@sun.com branch nick: 47098-mysql-next-4284 timestamp: Wed 2009-12-09 14:41:56 +0100 message: Backport of revno: 2617.68.36 --------------------------------------------- This is a patch for bug#47098 assert in MDL_context::destroy on HANDLER <damaged merge table> OPEN. The assert occurs in MDL_context::destroy when the connection is terminated, because all mdl_tickets have not been released. MERGE tables do not support being opened using the HANDLER ... OPEN command, and trying to do so will result in an error. In the event of an error, all tables that are opened, should be closed again. The fix for bug#45781 made sure that this also works for MERGE tables, which causes multiple tables to be opened. This fix extends the fix for bug#45781, by ensuring that also all locks are released, when MERGE tables are involved. ------------------------------------------------------------ revno: 2914.37.7 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Wed 2009-12-09 14:23:31 +0100 message: Backport of revno: 2617.31.30 Bug #21793 Missing CF_CHANGES_DATA and CF_STATUS_COMMAND for handful of commands CF_CHANGES_DATA and CF_STATUS_COMMAND flags added to the commands mentioned in the bug description. With the following two exceptions: 1) 4 commands do not exist: SQLCOM_RENAME_DB SQLCOM_LOAD_MASTER_DATA SQLCOM_LOAD_MASTER_TABLE SQLCOM_SHOW_COLUMN_TYPES 2) All SQLCOM_SHOW_* commands already had CF_STATUS_COMMAND, leaving only SQLCOM_BINLOG_BASE64_EVENT. Further, check_prepared_statement() in sql_prepare.cc has been simplified by taking advantage of the CF_STATUS_COMMAND flag. Note that no test case has been added. ------------------------------------------------------------ revno: 2914.37.6 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Wed 2009-12-09 14:03:37 +0100 message: Backport of revno: 3702 Bug #48248 assert in MDL_ticket::upgrade_shared_lock_to_exclusive The assert would happen if REPAIR TABLE was used on a table already locked by LOCK TABLES READ. REPAIR mistakenly tried to upgrade the read-lock to exclusive, thereby triggering the assert. The cause of the problem was that REPAIR TABLE ignored errors from opening and locking tables. This is by design, as REPAIR can be used to broken tables that cannot be opened. However, repair also ignored logical errors such as the inability to exclusivly lock a table due to conflicting LOCK TABLES. This patch fixes the problem by not ignoring errors from opening and locking tables if inside LOCK TABLES mode. In LOCK TABLES we already know that the table can be opened, so that the failure to open must be a logical error. Test added to repair.test. ------------------------------------------------------------ revno: 2914.37.5 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Wed 2009-12-09 13:27:24 +0100 message: Backport of revno: 2617.76.3 Bug#47107 Add missing line in previous change set. ------------------------------------------------------------ revno: 2914.37.4 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Wed 2009-12-09 13:15:35 +0100 message: Backport of revno: 2617.76.2 Bug #47107 assert in notify_shared_lock on incorrect CREATE TABLE , HANDLER Attempts to create a table (using CREATE TABLE, CREATE TABLE LIKE or CREATE TABLE SELECT statements) which already existed and was opened by the same connection through HANDLER statement, led to a stalled connection (for production builds of the server) or to the server being aborted due to an assertion failure (for debug builds of the server). This problem was introduced by the new implementation of a metadata locking subsystem and didn't affect earlier versions of the server. The cause of the problem was that the HANDLER was not closed by CREATE TABLE before CREATE tried to open and lock the table. Acquiring an exclusive MDL lock on the table to be created would therefore fail since HANDLER already had a shared MDL lock. This triggered an assert as the HANDLER and CREATE statements came from the same thread (self-deadlock). This patch resolves the issue by closing any open HANDLERs on tables to be created by CREATE TABLE, similar to what is already done for DROP and ALTER TABLE. Test case added to create.test. ------------------------------------------------------------ revno: 2914.37.3 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Wed 2009-12-09 12:58:52 +0100 message: Backport of revno: 3711.1.1 Bug #48725 Assert !thd->is_error() in delayed_get_table() This bug is a regression introduced by the patch for Bug #45949. If the handler thread for INSERT DELAYED was killed by e.g. FLUSH TABLES, the error message is copied from the handler thread to the connection thread. But the error was not reacted on, so the connection thread continued as normal, leading to an eventual assert. No test case added as it would have required sync points to work for handler threads. The plan is to add this in the scope of Bug #48725 / Bug #48541. The patch has been tested with the non-deterministic test case given in the bug description. ------------------------------------------------------------ revno: 2914.37.2 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Wed 2009-12-09 12:51:45 +0100 message: Backport of revno: 2617.69.34 Bug #45949 Assertion `!tables->table' in open_tables() on ALTER + INSERT DELAYED The assertion was caused by improperly closing tables when INSERT DELAYED needed to reopen tables. This patch replaces the call to close_thread_tables with close_tables_for_reopen which fixes the problem. The only way I was able to trigger the reopen code path and thus the assertion, was if ALTER TABLE killed the delayed insert thread and the delayed insert thread was able to enter the reopen code path before it noticed that thd->killed had been set. Note that in these cases reopen will always fail since open_table() will check thd->killed and return. This patch therefore adds two more thd->killed checks to minimize the chance of entering the reopen code path without hope for success. The patch also changes it so that if the delayed insert is killed using KILL_CONNECTION, the error message that is copied to the connection thread is ER_QUERY_INTERRUPTED rather than ER_SERVER_SHUTDOWN. This means that if INSERT DELAYED fails, the user will now see "Query execution was interrupted" rather than the misleading "Server shutdown in progress". No test case is supplied. This is for two reasons: 1) Unable to reproduce the error without having the delayed insert thread in a killed state which means that reopen is futile and was not supposed to be attempted. 2) Difficulty of using sync points in other threads than the connection thread. The patch has been successfully tested with the RQG and the grammar supplied in the bug description. ------------------------------------------------------------ revno: 2914.35.77 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-10 11:21:38 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.68.25 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-bg-pre2-2 timestamp: Wed 2009-09-16 18:26:50 +0400 message: Follow-up for one of pre-requisite patches for fixing bug #30977 "Concurrent statement using stored function and DROP FUNCTION breaks SBR". Made enum_mdl_namespace enum part of MDL_key class and removed MDL_ prefix from the names of enum members. In order to do the latter changed name of PROCEDURE symbol to PROCEDURE_SYM (otherwise macro which was automatically generated for this symbol conflicted with MDL_key::PROCEDURE enum member). ------------------------------------------------------------ revno: 2914.35.76 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 19:11:26 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.68.24 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-bg-pre2-2 timestamp: Wed 2009-09-16 17:25:29 +0400 message: Pre-requisite patch for fixing bug #30977 "Concurrent statement using stored function and DROP FUNCTION breaks SBR". Added MDL_request for stored routine as member to Sroutine_hash_entry in order to be able perform metadata locking for stored routines in future (Sroutine_hash_entry is an equivalent of TABLE_LIST class for stored routines). (WL#4284, follow up fixes). ------------------------------------------------------------ revno: 2914.35.75 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 19:00:46 +0300 message: ------------------------------------------------------------ revno: 2617.68.23 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-bg-pre1 timestamp: Wed 2009-09-16 09:34:42 +0400 message: Pre-requisite patch for fixing bug #30977 "Concurrent statement using stored function and DROP FUNCTION breaks SBR". CREATE TABLE SELECT statements take exclusive metadata lock on table being created. Invariant of metadata locking subsystem states that such lock should be taken before taking any kind of shared locks. Once metadata locks on stored routines are introduced statements like "CREATE TABLE ... SELECT f1()" will break this invariant by taking shared locks on routines before exclusive lock on target table. To avoid this, open_tables() is reworked to process tables which are directly used by the statement before stored routines are processed. ------------------------------------------------------------ revno: 2914.35.74 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 18:56:34 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.68.10 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-bg46673 timestamp: Tue 2009-09-01 19:57:05 +0400 message: Fix for bug #46673 "Deadlock between FLUSH TABLES WITH READ LOCK and DML". Deadlocks occured when one concurrently executed transactions with several statements modifying data and FLUSH TABLES WITH READ LOCK statement or SET READ_ONLY=1 statement. These deadlocks were introduced by the patch for WL 4284: "Transactional DDL locking"/Bug 989: "If DROP TABLE while there's an active transaction, wrong binlog order" which has changed FLUSH TABLES WITH READ LOCK/SET READ_ONLY=1 to wait for pending transactions. What happened was that FLUSH TABLES WITH READ LOCK blocked all further statements changing tables by setting global_read_lock global variable and has started waiting for all pending transactions to complete. Then one of those transactions tried to executed DML, detected that global_read_lock non-zero and tried to wait until global read lock will be released (i.e. global_read_lock becomes 0), indeed, this led to a deadlock. Proper solution for this problem should probably involve full integration of global read lock with metadata locking subsystem (which will allow to implement waiting for pending transactions without blocking DML in them). But since it requires significant changes another, short-term solution for the problem is implemented in this patch. Basically, this patch restores behavior of FLUSH TABLES WITH READ LOCK/ SET READ_ONLY=1 before the patch for WL 4284/bug 989. By ensuring that extra references to TABLE_SHARE are not stored for active metadata locks it changes these statements not to wait for pending transactions. As result deadlock is eliminated. Note that this does not change the fact that active FLUSH TABLES WITH READ LOCK lock or SET READ_ONLY=1 prevent modifications to tables as they also block transaction commits. ------------------------------------------------------------ revno: 2914.35.73 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 18:48:42 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.68.7 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-bg46044 timestamp: Thu 2009-08-27 10:22:17 +0400 message: Fix for bug #46044 "MDL deadlock on LOCK TABLE + CREATE TABLE HIGH_PRIORITY FOR UPDATE". Deadlock occured when during execution of query to I_S we tried to open a table or its .FRM in order to get information about it and had to wait because we have encountered exclusive metadata lock on this table held by a DDL operation from another connection which in its turn waited for some resource currently owned by connection executing this I_S query. For example, this might have happened if one under LOCK TABLES executed I_S query targeted to particular table (which was not among locked) and also concurrently tried to create this table using CREATE TABLE SELECT which had to wait for one of tables locked by the first connection. Another situation in which deadlock might have occured is when I_S query, which was executed as part of transaction, tried to get information about table which just has been dropped by concurrent DROP TABLES executed under LOCK TABLES and this DROP TABLES for its completion also had to wait transaction from the first connection. This problem stemmed from the fact that opening of tables/.FRMs for I_S filling is happening outside of connection's main MDL_context so code which tries to detect deadlocks due to conflicting metadata locks doesn't work in this case. Indeed, this led to deadlocks when during I_S filling we tried to wait for conflicting metadata lock to go away, while its owner was waiting for some resource held by connection executing I_S query. This patch solves this problem by avoiding waiting in such situation. Instead we skip this table and produce warning that information about it was omitted from I_S due to concurrent DDL operation. We still wait for conflicting metadata lock to go away when it is known that deadlock is not possible (i.e. when connection executing I_S query does not hold any metadata or table-level locks). Basically, we apply our standard deadlock avoidance technique for metadata locks to the process of filling of I_S tables but replace ER_LOCK_DEADLOCK error with a warning. Note that this change is supposed to be safe for 'mysqldump' since the only its mode which is affected by this change is --single-transaction mode is not safe in the presence of concurrent DDL anyway (and this fact is documented). Other modes are unaffected because they either use SHOW TABLES/SELECT * FROM I_S.TABLE_NAMES which do not take any metadata locks in the process of I_S table filling and thus cannot skip tables or execute I_S queries for tables which were previously locked by LOCK TABLES (or in the presence of global read lock) which excludes possibility of encountering conflicting metadata lock. ------------------------------------------------------------ revno: 2914.35.72 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 12:46:13 +0300 message: Merge. ------------------------------------------------------------ revno: 2914.37.1 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Wed 2009-12-09 10:44:01 +0100 message: Backport of revno: 2617.68.39 Bug #47249 assert in MDL_global_lock::is_lock_type_compatible This assert could be triggered if LOCK TABLES were used to lock both a table and a view that used the same table. The table would have to be first WRITE locked and then READ locked. So "LOCK TABLES v1 WRITE, t1 READ" would eventually trigger the assert, "LOCK TABLES v1 READ, t1 WRITE" would not. The reason is that the ordering of locks in the interal representation made a difference when executing FLUSH TABLE on the table. During FLUSH TABLE, a lock was upgraded to exclusive. If this lock was of type MDL_SHARED and not MDL_SHARED_UPGRADABLE, an internal counter in the MDL subsystem would get out of sync. This would happen if the *last* mention of the table in LOCK TABLES was a READ lock. The counter in question is the number exclusive locks (active or intention). This is used to make sure a global metadata lock is only taken when the counter is zero (= no conflicts). The counter is increased when a MDL_EXCLUSIVE or MDL_SHARED_UPGRADABLE lock is taken, but not when upgrade_shared_lock_to_exclusive() is used to upgrade directly from MDL_SHARED to MDL_EXCLUSIVE. This patch fixes the problem by searching for a TABLE instance locked with MDL_SHARED_UPGRADABLE or MDL_EXCLUSIVE before calling upgrade_shared_lock_to_exclusive(). The patch also adds an assert checking that only MDL_SHARED_UPGRADABLE locks are upgraded to exclusive. Test case added to lock_multi.test. ------------------------------------------------------------ revno: 2914.35.71 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 12:44:05 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.69.37 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-bg46748 timestamp: Fri 2009-08-21 18:17:02 +0400 message: Fix for bug #46748 "Assertion in MDL_context::wait_for_locks() on INSERT + CREATE TRIGGER". Concurrent execution of statements involving stored functions or triggers which were using several tables and DDL statements which affected those tables on debug build of server might have led to assertion failures in MDL_context::wait_for_locks(). Non-debug build was not affected. The problem was that during back-off which happens when open_tables() encounters conflicting metadata lock for one of the tables being open we didn't reset MDL_request::ticket value for requests which correspond to tables from extended prelocking set. Since these requests are part of of list of requests to be waited for in Open_table_context this broke assumption that ticket value for them is 0 in MDL_context::wait_for_locks() and caused assertion failure. This fix ensures that close_tables_for_reopen(), which performs this back-off resets MDL_request::ticket value not only for tables directly used by the statement but also for tables from extended prelocking set, thus satisfying assumption described above. ------------------------------------------------------------ revno: 2914.35.70 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 12:37:54 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.69.32 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-bg46747 timestamp: Wed 2009-08-19 18:12:27 +0400 message: Fix for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". Server crashed when one tried to drop trigger which had its subject table shadowed by a temporary table with the same name. This problem occured because in such situation DROP TRIGGER has opened temporary table instead of base table on which trigger was defined. Attempt to upgrade metadata lock on this temporary table led to crash (we don't acquire metadata locks for temporary tables). This fix ensures that DROP TRIGGER ignores temporary tables when trying to open table on which trigger to be dropped is defined. ------------------------------------------------------------ revno: 2914.35.69 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 12:29:36 +0300 message: ---------------------------------------------------------- revno: 2617.69.33 committer: Konstantin Osipov <kostja@sun.com> branch nick: mysql-next-46452 timestamp: Wed 2009-08-19 18:39:31 +0400 message: Bug#46452 "Crash in MDL, HANDLER OPEN + TRUNCATE TABLE". Flush open HANDLER tables before TRUNCATE, which is a DDL. ------------------------------------------------------------ revno: 2914.35.68 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 12:17:17 +0300 message: Backpo ---------------------------------------------------------- revno: 2617.69.28 committer: Konstantin Osipov <kostja@sun.com> branch nick: 5.4-azalea-bugfixing timestamp: Tue 2009-08-18 15:27:35 +0400 message: An attempt to fix a link failure on Windows -- Sroutine_hash_entry is forward-declared as class. (Part of WL#4284). ------------------------------------------------------------ revno: 2914.35.67 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-09 12:04:55 +0300 message: Backport of: ---------------------------------------------------------- revno: 2617.69.25 committer: Konstantin Osipov <kostja@sun.com> branch nick: 5.4-42546 timestamp: Fri 2009-08-14 23:52:00 +0400 message: A cleanup in open_tables() and lock_tables(): change return type of these functions to bool from int, to follow convention in the rest of the code. (Part of WL#4284 review fixes). ------------------------------------------------------------ revno: 2914.35.66 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp2 timestamp: Wed 2009-12-09 09:51:20 +0100 message: Backport of revno: 2617.69.40 A pre-requisite patch for Bug#30977 "Concurrent statement using stored function and DROP FUNCTION breaks SBR". This patch changes the MDL API by introducing a namespace for lock keys: MDL_TABLE for tables and views and MDL_PROCEDURE for stored procedures and functions. The latter is needed for the fix for Bug#30977. ------------------------------------------------------------ revno: 2914.35.65 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Wed 2009-12-09 09:32:29 +0100 message: Backport of revno: 2599.169.2 Bug #42074 concurrent optimize table and alter table = Assertion failed: thd->is_error() This assertion could occur if OPTIMIZE TABLE was started on a InnoDB table and the table was altered to different storage engine after OPTIMIZE had started. This allowed OPTIMIZE to pass the initial checks for storage engine support, but fail once it reached "recreate+analyze" if this operation was not supported by the new storage engine. The bug had no consequences for non-debug builds of the server. In detail, the assertion was triggered when ha_analyze() returned HA_ADMIN_NOT_IMPLEMENTED. This led to a code path which included an assert checking for diagnostics area contents. Since this area had not been filled, the assertion was triggered. The diagnostics area is in this case only used to provide more detailed information about why optimize failed. The triggered code path sends this information to the client and clears the diagnostic area. This patch fixed the problem by adding an error message to the diagnostic area if ha_analyze() fails. This error message contains the error code returned by ha_analyze(). Test case added to innodb_mysql_sync.test. ------------------------------------------------------------ revno: 2914.35.64 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp1 timestamp: Tue 2009-12-08 15:56:06 +0100 message: Backport of revno: 2617.68.9 Bug #43272 HANDLER SQL command does not work under LOCK TABLES HANDLER commands are now explicitly disallowed in LOCK TABLES mode. Before, HANDLER OPEN gave the misleading error message: "Table x was not locked with LOCK TABLES". This patch changes HANDLER OPEN/READ/CLOSE to give ER_LOCK_OR_ACTIVE_TRANSACTION "Can't execute the given command because you have active locked tables or an active transaction" in LOCK TABLES mode. Test case added to lock.test. ------------------------------------------------------------ revno: 2914.35.63 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp2 timestamp: Tue 2009-12-08 15:38:58 +0100 message: Backport of revno: 2617.65.10 Bug #45067 Assertion `stmt_da->is_error()' in Delayed_insert::open_and_lock_table The assert was triggered when delayed insert was killed by another connection using mysql_notify_thread_having_shared_lock(). During handling of thd->killed, thd.fatal_error() was called without a previous call to my_error() which triggered the assert. This patch allows the assert to pass if thd->killed has been set. ------------------------------------------------------------ revno: 2914.35.62 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-08 17:13:12 +0300 message: Backport of: ---------------------------------------------------------- revno: 2617.69.24 committer: Konstantin Osipov <kostja@sun.com> branch nick: 5.4-42546 timestamp: Fri 2009-08-14 19:22:05 +0400 message: A pre-requisite for a fix for Bug#42546 "Backup: RESTORE fails, thinking it finds an existing table" Back-port from WL 148 "Foreign keys" feature tree a patch that introduced Prelocking_strategy class -- a way to parameterize open_tables() behaviour, implemented by Dmitry Lenev. (Part of WL#4284). ------------------------------------------------------------ revno: 2914.35.61 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-08 16:59:54 +0300 message: Merge with next-4284. ------------------------------------------------------------ revno: 2914.36.3 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp2 timestamp: Tue 2009-12-08 14:27:33 +0100 message: Backport of revno: 2617.65.1 Bug #22876 Four-way deadlock This bug was fixed as a part of Bug#989 "If DROP TABLE while there's an active transaction, wrong binlog order" A statement which would have caused circular wait will now be aborted with ER_LOCK_DEADLOCK. Test case based on bug description added to innodb_mysql_lock.test. Note that innodb_lock_wait_timeout is set to 5 mins to prevent race conditions in the test. ------------------------------------------------------------ revno: 2914.36.2 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp2 timestamp: Tue 2009-12-08 14:22:26 +0100 message: Backport of revno: 2617.62.1 Bug #39675 rename tables on innodb tables with pending transactions causes slave data issue Bug was already fixed as part of patch for Bug#989 (If DROP TABLE while there's an active transaction, wrong binlog order) Test case added to rpl_innodb.test. ------------------------------------------------------------ revno: 2914.36.1 committer: Jon Olav Hauglid <jon.hauglid@sun.com> branch nick: mysql-next-4284-bp2 timestamp: Tue 2009-12-08 14:14:05 +0100 message: Backport of revno: 2617.56.21 Bug #45066 FLUSH TABLES WITH READ LOCK deadlocks against LOCK TABLE Test coverage for combinations of LOCK TABLE READ / WRITE and FLUSH TABLES / FLUSH TABLES WITH READ LOCK added to lock.test. LOCK and FLUSH are executed sequentially from one connection. ------------------------------------------------------------ revno: 2914.35.60 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-08 16:57:25 +0300 message: Backport of revid 2617.69.21, 2617.69.22, 2617.29.23: ---------------------------------------------------------- revno: 2617.69.21 committer: Konstantin Osipov <kostja@sun.com> branch nick: 5.4-4284-1-assert timestamp: Thu 2009-08-13 20:13:55 +0400 message: A fix and a test case for Bug#46610 "MySQL 5.4.4: MyISAM MRG engine crash on auto-repair of child". Also fixes Bug#42862 "Crash on failed attempt to open a children of a merge table". MERGE engine needs to extend the global table list with TABLE_LIST elements for child tables, so that they are opened and locked. Previously these table list elements were allocated in memory of ha_myisammrg object (MERGE engine handler). That would lead to access to freed memory in recover_from_failed_open_table_attempt(), which would try to recover a MERGE table child (MyISAM table) and use for that TABLE_LIST of that child. But by the time recover_from_failed_open_table_attempt() is invoked, ha_myisammrg object that owns this TABLE_LIST may be destroyed, and thus TABLE_LIST memory freed. The fix is to ensure that TABLE_LIST elements that are added to the global table list (lex->query_tables) are always allocated in thd->mem_root, which is not destroyed until end of execution. If previously TABLE_LIST elements were allocated at ha_myisammrg::open() (i.e. when the TABLE object was created and added to the table cache), now they are allocated in ha_myisammrg::add_chidlren_list() (i.e. right after "open" of the merge parent in open_tables()). We still create a list of children names at ha_myisammrg::open() to use as a basis for creation of TABLE_LISTs, that allows to avoid reading the merge handler data file on every execution. ------------------------------------------------------------ revno: 2914.35.59 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-08 12:57:07 +0300 message: Backport of: ---------------------------------------------------------- revno: 2617.69.20 committer: Konstantin Osipov <kostja@sun.com> branch nick: 5.4-4284-1-assert timestamp: Thu 2009-08-13 18:29:55 +0400 message: WL#4284 "Transactional DDL locking" A review fix. Since WL#4284 implementation separated MDL_request and MDL_ticket, MDL_request becamse a utility object necessary only to get a ticket. Store it by-value in TABLE_LIST with the intent to merge MDL_request::key with table_list->table_name and table_list->db in future. Change the MDL subsystem to not require MDL_requests to stay around till close_thread_tables(). Remove the list of requests from the MDL context. Requests for shared metadata locks acquired in open_tables() are only used as a list in recover_from_failed_open_table_attempt(), which calls mdl_context.wait_for_locks() for this list. To keep such list for recover_from_failed_open_table_attempt(), introduce a context class (Open_table_context), that collects all requests. A lot of minor cleanups and simplications that became possible with this change. ------------------------------------------------------------ revno: 2914.35.58 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-08 11:38:45 +0300 message: Backport of: ---------------------------------------------------------- revno: 2617.69.2 committer: Konstantin Osipov <kostja@sun.com> branch nick: 5.4-azalea-bugfixing timestamp: Mon 2009-08-03 19:26:04 +0400 message: A fix and a test case for Bug#45035 "Altering table under LOCK TABLES results in "Error 1213 Deadlock found...". If a user had a table locked with LOCK TABLES for READ and for WRITE in the same connection, ALTER TABLE could fail. Root cause analysis: If a connection issues LOCK TABLE t1 write, t1 a read, t1 b read; the new LOCK TABLES code in 6.0 (part of WL 3726) will create the following list of TABLE_LIST objects (thd->locked_tables_list->m_locked_tables): {"t1" "b" tl_read_no_insert}, {"t1" "a" tl_read_no_insert}, {"t1" "t1" tl_write } Later on, when we try to ALTER table t1, mysql_alter_table() closes all TABLE instances and releases its thr_lock locks, keeping only an exclusive metadata lock on t1. But when ALTER is finished, Locked_table_list::reopen_tables() tries to restore the original list of open and locked tables. Before this patch, it used to do so one by one: Open t1 b, get TL_READ_NO_INSERT lock, Open t1 a, get TL_READ_NO_INSERT lock Open t1, try to get TL_WRITE lock, deadlock. The cause of the deadlock is that thr_lock.c doesn't resolve the situation when the read list only consists of locks taken by the same thread, followed by this very thread trying to take a WRITE lock. Indeed, since thr_lock_multi always gets a sorted list of locks, WRITE locks always precede READ locks in the list to lock. Don't try to fix thr_lock.c deficiency, keep this code simple. Instead, try to take all thr_lock locks at once in ::reopen_tables(). ------------------------------------------------------------ revno: 2914.35.57 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-08 11:26:49 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.65.6 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-azalea-bg39674 timestamp: Sat 2009-07-25 00:28:43 +0400 message: Fix for bug #39674 "On shutdown mdl_destroy() called before plugin_shutdown()". Attempt to shutdown PBXT engine plugin led to assertion failure caused by using already destroyed mutex in metadata locking subsystem. This problem stemmed from the fact that we MDL subsystem and table definition cache were deinitialized before plugin shutdown while PBXT plugin during its shutdown process accessed tables and therefore expected them to be in working shape. This patch solves this problem by moving deinitialization of these two subsystems after plugins are shut down. No test case is provided since such test case would require using PBXT or other plugin which accesses tables during its shutdown process. ------------------------------------------------------------ revno: 2914.35.56 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-08 10:53:40 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.43.3 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 40188-6.0 timestamp: Thu 2009-05-07 13:15:54 +0200 message: Sort results as the file list of the database directory is not sorted (MY_DONT_SORT). (This is a follow-up fix for WL#4284). ------------------------------------------------------------ revno: 2914.35.55 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-08 10:39:49 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.31.7 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: mysql-6.0-runtime timestamp: Wed 2009-03-25 19:22:00 -0300 message: WL#4284: Transactional DDL locking Post-merge fixes for test cases. ------------------------------------------------------------ revno: 2914.35.54 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Sat 2009-12-05 02:02:48 +0300 message: Backport of revno ## 2617.31.1, 2617.31.3, 2617.31.4, 2617.31.5, 2617.31.12, 2617.31.15, 2617.31.15, 2617.31.16, 2617.43.1 - initial changeset that introduced the fix for Bug#989 and follow up fixes for all test suite failures introduced in the initial changeset. ------------------------------------------------------------ revno: 2617.31.1 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 4284-6.0 timestamp: Fri 2009-03-06 19:17:00 -0300 message: Bug#989: If DROP TABLE while there's an active transaction, wrong binlog order WL#4284: Transactional DDL locking Currently the MySQL server does not keep metadata locks on schema objects for the duration of a transaction, thus failing to guarantee the integrity of the schema objects being used during the transaction and to protect then from concurrent DDL operations. This also poses a problem for replication as a DDL operation might be replicated even thought there are active transactions using the object being modified. The solution is to defer the release of metadata locks until a active transaction is either committed or rolled back. This prevents other statements from modifying the table for the entire duration of the transaction. This provides commitment ordering for guaranteeing serializability across multiple transactions. - Incompatible change: If MySQL's metadata locking system encounters a lock conflict, the usual schema is to use the try and back-off technique to avoid deadlocks -- this schema consists in releasing all locks and trying to acquire them all in one go. But in a transactional context this algorithm can't be utilized as its not possible to release locks acquired during the course of the transaction without breaking the transaction commitments. To avoid deadlocks in this case, the ER_LOCK_DEADLOCK will be returned if a lock conflict is encountered during a transaction. Let's consider an example: A transaction has two statements that modify table t1, then table t2, and then commits. The first statement of the transaction will acquire a shared metadata lock on table t1, and it will be kept utill COMMIT to ensure serializability. At the moment when the second statement attempts to acquire a shared metadata lock on t2, a concurrent ALTER or DROP statement might have locked t2 exclusively. The prescription of the current locking protocol is that the acquirer of the shared lock backs off -- gives up all his current locks and retries. This implies that the entire multi-statement transaction has to be rolled back. - Incompatible change: FLUSH commands such as FLUSH PRIVILEGES and FLUSH TABLES WITH READ LOCK won't cause locked tables to be implicitly unlocked anymore. ------------------------------------------------------------ revno: 2914.35.53 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-04 02:57:01 +0300 message: Backport of: ---------------------------------------------------------- revno: 2617.23.22 committer: Konstantin Osipov <kostja@sun.com> branch nick: mysql-6.0-runtime timestamp: Wed 2009-03-04 23:29:16 +0300 message: WL#4284, "Transactional DDL locking": fix a Windows compilation warning. ------------------------------------------------------------ revno: 2914.35.52 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-04 02:55:26 +0300 message: Backport of (WL#4284): ------------------------------------------------------------ revno: 2617.23.23 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: mysql-6.0-runtime timestamp: Thu 2009-03-05 18:39:58 -0300 message: Fix for broken build: SHARED is defined by Solaris headers. ------------------------------------------------------------ revno: 2914.35.51 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-04 02:52:05 +0300 message: Backport of: ---------------------------------------------------------- revno: 2617.23.20 committer: Konstantin Osipov <kostja@sun.com> branch nick: mysql-6.0-runtime timestamp: Wed 2009-03-04 16:31:31 +0300 message: WL#4284 "Transactional DDL locking" Review comments: "Objectify" the MDL API. MDL_request and MDL_context still need manual construction and destruction, since they are used in environment that is averse to constructors/destructors. ------------------------------------------------------------ revno: 2914.35.50 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-04 02:34:19 +0300 message: Backport of: ---------------------------------------------------------- revno: 2617.23.19 committer: Konstantin Osipov <kostja@sun.com> branch nick: mysql-6.0-runtime timestamp: Tue 2009-03-03 01:20:44 +0300 message: Metadata locking: realign comments. No semantical changes, only enforce a bit of the coding style. This is a review fix for WL#4284 "Transactional DDL locking". ------------------------------------------------------------ revno: 2914.35.49 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-04 02:29:40 +0300 message: Backport of: ------------------------------------------------------------ revno: 2617.23.18 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 4284-6.0 timestamp: Mon 2009-03-02 18:18:26 -0300 message: Bug#989: If DROP TABLE while there's an active transaction, wrong binlog order WL#4284: Transactional DDL locking This is a prerequisite patch: These changes are intended to split lock requests from granted locks and to allow the memory and lifetime of granted locks to be managed within the MDL subsystem. Furthermore, tickets can now be shared and therefore are used to satisfy multiple lock requests, but only shared locks can be recursive. The problem is that the MDL subsystem morphs lock requests into granted locks locks but does not manage the memory and lifetime of lock requests, and hence, does not manage the memory of granted locks either. This can be problematic because it puts the burden of tracking references on the users of the subsystem and it can't be easily done in transactional contexts where the locks have to be kept around for the duration of a transaction. Another issue is that recursive locks (when the context trying to acquire a lock already holds a lock on the same object) requires that each time the lock is granted, a unique lock request/granted lock structure structure must be kept around until the lock is released. This can lead to memory leaks in transactional contexts as locks taken during the transaction should only be released at the end of the transaction. This also leads to unnecessary wake ups (broadcasts) in the MDL subsystem if the context still holds a equivalent of the lock being released. These issues are exacerbated due to the fact that WL#4284 low-level design says that the implementation should "2) Store metadata locks in transaction memory root, rather than statement memory root" but this is not possible because a memory root, as implemented in mysys, requires all objects allocated from it to be freed all at once. This patch combines review input and significant code contributions from Konstantin Osipov (kostja) and Dmitri Lenev (dlenev). ------------------------------------------------------------ revno: 2914.35.48 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-04 01:55:58 +0300 message: WL#4284, "Transactional DDL locking". Add two more files to .bzrignore. ------------------------------------------------------------ revno: 2914.35.47 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-04 01:55:34 +0300 message: WL#4284, "Transactional DDL locking". Add two more files to .bzrignore. ------------------------------------------------------------ revno: 2914.35.46 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-04 01:48:14 +0300 message: Backport of: ---------------------------------------------------------- revno: 2617.22.7 committer: Konstantin Osipov <kostja@sun.com> branch nick: mysql-6.0-runtime timestamp: Tue 2009-01-27 16:41:58 +0300 message: WL#4284 "Transactional DDL locking" review. Improve a comment. ------------------------------------------------------------ revno: 2914.35.45 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Fri 2009-12-04 01:46:14 +0300 message: ------------------------------------------------------------ revno: 2617.22.4 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: mysql-6.0-runtime timestamp: Mon 2009-01-26 15:19:14 -0200 message: Move checks for OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN to a separate helper function. ------------------------------------------------------------ revno: 2914.35.44 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 23:08:27 +0300 message: Backport of: ------------------------------------------------------------ revno: 3035.4.1 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 39897-6.0 timestamp: Thu 2009-01-15 12:17:57 -0200 message: Bug#39897: lock_multi fails in pushbuild: timeout waiting for processlist The problem is that relying on the "Table lock" thread state in its current position to detect that a thread is waiting on a lock is race prone. The "Table lock" state change happens before the thread actually tries to grab a lock on a table. The solution is to move the "Table lock" state so that its set only when a thread is actually going to wait for a lock. The state change happens after the thread fails to grab the lock (because it is owned by other thread) and proceeds to wait on a condition. This is considered part of work related to WL#4284 "Transactional DDL locking" Warning: this patch contains an incompatible change. When waiting on a lock in thr_lock.c, the server used to display "Locked" processlist state. After this patch, the state is "Table lock". The new state was actually intended to be display since year 2002, when Monty added it. But up until removal of thd->locked boolean member, this state was ignored by SHOW PROCESSLIST code. ------------------------------------------------------------ revno: 2914.35.43 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 21:59:52 +0300 message: Backport of: ----------------------------------------------------------- 2497.479.10 Sergei Golubchik 2008-08-27 proc_info_hook, mysys access to thd->proc_info This patch is necessary for backport of WL#4284 "Transactional DDL locking". ------------------------------------------------------------ revno: 2914.35.42 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 21:37:38 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.22.3 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 4284-6.0 timestamp: Thu 2008-08-07 22:33:43 -0300 message: WL#4284: Transactional DDL locking Make transaction management more modular through a new interface. The overall objective of this change is to provide groundwork for the design of transactional DDL locking by cleaning up the transaction high level API to better distinguish operations implicit and explicit, and single statement transaction from operations on the normal transaction. Having a a high-level interface for transaction management provides a better base for implementing transactional concepts that are not always tied to storage engines and also makes it easier to interect with other higher level modules of the server. ------------------------------------------------------------ revno: 2914.35.41 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 18:52:21 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.13.17 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 4284-6.0 timestamp: Sun 2008-07-27 10:14:46 -0300 message: Post-merge fixes: Remove dependency on binlog, require not embedded as test uses the event scheduler and disable abort on error for syntax only available on servers built with debugging support. This is a patch in scope of WL#4284 "Transactional DDL locking" ------------------------------------------------------------ revno: 2914.35.40 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 18:47:20 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.13.16 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: WL#4284 timestamp: Sat 2008-07-26 13:38:20 -0300 message: WL#4284: Transactional DDL locking SQL statements' effect on transactions. Currently the MySQL server and its storage engines are not capable of rolling back operations that define or modify data structures (also known as DDL statements) or operations that alter any of the system tables (the mysql database). Allowing these group of statements to participate in transactions is unfeasible at this time (since rollback has no effect whatsoever on them) and goes against the design of our metadata locking subsystem. The solution is to issue implicit commits before and after those statements execution. This effectively confines each of those statements to its own special transaction and ensures that metadata locks taken during this special transaction are not leaked into posterior statements/transactions. ------------------------------------------------------------ revno: 2914.35.39 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 14:47:05 +0300 message: Backport of: ---------------------------------------------------------- revno: 2630.2.7 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-runtime timestamp: Wed 2008-06-04 15:18:52 +0400 message: Fix a code regression (not observable externally) that I introduced in the fix for Bug#26141 (backporting as part of all patches related to WL#3726) ------------------------------------------------------------ revno: 2914.35.38 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 14:41:29 +0300 message: WL#3726 "DDL locking", post-review fixes. ---------------------------------------------------------- revno: 2630.2.23 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-runtime timestamp: Fri 2008-06-27 21:15:11 +0400 message: Add an assert that we never call COMMIT or ROLLBACK while having a table lock. ------------------------------------------------------------ revno: 2914.35.37 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 14:37:42 +0300 message: Merge next-mr -> next-4284 ------------------------------------------------------------ revno: 2914.35.36 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 14:32:29 +0300 message: Backport of (WL#3726) ------------------------------------------------------------ revno: 2630.13.4 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-runtime timestamp: Mon 2008-07-07 19:51:20 +0400 message: Fixed outdated comment describing mdl_init_lock() function. ------------------------------------------------------------ revno: 2914.35.35 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 14:12:53 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.39 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Thu 2008-06-26 13:08:27 +0400 message: Fix warnings about passing pointer to not fully-initialized THD object to constructor of base Open_tables_state classe, which appeared on Windows and were introduced by one of the patches implementing WL#3726 "DDL locking for all metadata objects". ------------------------------------------------------------ revno: 2914.35.34 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 02:09:22 +0300 message: Backport of: ---------------------------------------------------------- revno: 2630.4.38 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-4144 timestamp: Wed 2008-06-25 22:07:06 +0400 message: WL#4144 - Lock MERGE engine children. Committing a version of the patch merged with WL#3726 on behalf of Ingo. Step #1: Move locking from parent to children. MERGE children are now left in the query list of tables after inserted there in open_tables(). So they are locked by lock_tables() as all other tables are. The MERGE parent does not store locks any more. It appears in a MYSQL_LOCK with zero lock data. This is kind of a "dummy" lock. All other lock handling is also done directly on the children. To protect against parent or child modifications during LOCK TABLES, the children are detached after every statement and attached before every statement, even under LOCK TABLES. The children table list is removed from the query list of tables on every detach and on close of the parent. Step #2: Move MERGE specific functionality from SQL layer into table handler. Functionality moved from SQL layer (mainly sql_base.cc) to the table handler (ha_myisammrg.cc). Unnecessary code is removed from the SQL layer. Step #3: Moved all MERGE specific members from TABLE to ha_myisammrg. Moved members from TABLE to ha_myisammrg. Renamed some mebers. Fixed comments. Step #4: Valgrind and coverage testing Valgrind did not uncover new problems. Added purecov comments. Added a new test for DATA/INDEX DIRECTORY options. Changed handling of ::reset() for non-attached children. Fixed the merge-big test. Step #5: Fixed crashes detected during review Changed detection when to attach/detach. Added new tests. Backport also the fix for Bug#44040 "MySQL allows creating a MERGE table upon VIEWs but crashes when using it" ------------------------------------------------------------ revno: 2914.35.33 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 00:24:10 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.37 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Wed 2008-06-25 20:28:57 +0400 message: Fix build failure of mysql-6.0-3726 tree on Windows. The failure was caused by the fact that sql/mdl.cc was using __func__ macro without including sql_profile.h header which contained definition of this macro for those platforms that miss it. This patch solves this problem by moving this define to include/my_global.h which makes it available in modules which don't/can't include sql/mysql_priv.h. This is a patch that is part of WL#3726. ------------------------------------------------------------ revno: 2914.35.32 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Thu 2009-12-03 00:08:51 +0300 message: Backport of: ---------------------------------------------------------- revno: 2630.4.36 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3726 timestamp: Wed 2008-06-25 17:03:37 +0400 message: As per discussion with Serg and Dmitri, remove the code that is trying to emulate LOCK TABLES when locking tables for prelocking. This code was worked around by the engines, and has no effect. We may still have to do something to ensure that statement-based replication is consistent in MVCC engines, or other engines that downgrade table level locks, but this will have to be done somehow differently. ------------------------------------------------------------ revno: 2914.35.31 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-02 23:47:23 +0300 message: Backport of: ---------------------------------------------------------- revno: 2630.4.35 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3726 timestamp: Wed 2008-06-25 16:44:00 +0400 message: Fix a MyISAM-specific bug in the new implementation of LOCK TABLES (WL#3726). If more than one instance of a MyISAM table are open in the same connection, all of them must share the same status_param. Otherwise, unlock of a table may lead to lost records. See also comments in thr_lock.c. ------------------------------------------------------------ revno: 2914.35.30 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-02 19:31:57 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.33 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Fri 2008-06-20 17:11:20 +0400 message: WL#3726 "DDL locking for all metadata objects". After-review fixes in progress. Minimized dependency of mdl.cc on other modules (particularly made it independant of mysql_priv.h) in order to be able write unit tests for metadata locking subsystem. ------------------------------------------------------------ revno: 2914.35.29 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-02 19:15:40 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.32 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Thu 2008-06-19 16:39:58 +0400 message: WL#3726 "DDL locking for all metadata objects". After-review fixes in progress. Ensure that metadata locking subsystem properly handles out-of-memory conditions. Clarified MDL interface by separating release of locks and removal of lock requests from the context. ------------------------------------------------------------ revno: 2914.35.28 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-02 18:37:10 +0300 message: Backport of: ---------------------------------------------------------- revno: 2630.4.31 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3726 timestamp: Thu 2008-06-12 06:23:08 +0400 message: Extend the signature of TABLE_LIST::init_one_table() to initialize lengths This is part of WL#3726 post-review fixes. ------------------------------------------------------------ revno: 2914.35.27 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-02 18:33:51 +0300 message: Backport of: ---------------------------------------------------------- revno: 2630.4.30 Konstantin Osipov 2008-06-11 Fix a potential cause of test failures. ------------------------------------------------------------ revno: 2914.35.26 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Wed 2009-12-02 18:22:15 +0300 message: Backport of: ---------------------------------------------------------- revno: 2630.10.1 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-lock-tables-tidyup timestamp: Wed 2008-06-11 15:49:58 +0400 message: WL#3726, review fixes. Now that we have metadata locks, we don't need to keep a crippled TABLE instance in the table cache to indicate that a table is locked. Remove all code that used this technique. Instead, rely on metadata locks and use the standard open_table() and close_thread_table() to manipulate with the table cache tables. Removes a list of functions that have become unused (see the comment for sql_base.cc for details). Under LOCK TABLES, keep a TABLE_LIST instance for each table that may be temporarily closed. For that, implement an own class for LOCK TABLES mode, Locked_tables_list. This is a pre-requisite patch for WL#4144. This is not exactly a backport: there is no new online ALTER table in Celosia, so the old alter table code was changed to work with the new table cache API. ------------------------------------------------------------ revno: 2914.35.25 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 22:13:01 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.9.3 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w3 timestamp: Wed 2008-06-11 08:33:36 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Changed close_cached_tables() not to flush all unused TABLE instances when flushing individual table. Renamed expel_table_from_cache() to tdc_remove_table() and added enum parameter to be able more explicitly specify type of removal, rewrote its code to be more efficient. ****** Backport of: ------------------------------------------------------------ revno: 2630.9.4 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w3 timestamp: Wed 2008-06-11 15:53:53 +0400 message: WL#3726 "DDL locking for all metadata objects". After-review fixes in progress. Minor changes in order to improve code readability and simplify debugging. ------------------------------------------------------------ revno: 2914.35.24 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 18:20:43 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.9.2 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w3 timestamp: Tue 2008-06-10 18:01:56 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. ------------------------------------------------------------ revno: 2914.35.23 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 18:04:32 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.9.1 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w3 timestamp: Sun 2008-06-08 22:13:58 +0400 message: WL#3726 "DDL locking for all metadata objects" After review fixes in progress. Some adjustments to the patch that removes thd->locked_tables ------------------------------------------------------------ revno: 2914.35.22 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 17:58:31 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.27 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Mon 2008-06-09 14:01:19 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Changed open_table() to return bool. This allows more easily to distinguish cases when this function succeeds but returns no TABLE instance (in case of view or in case of special kind of open) from cases when we have an error. Pointer to TABLE instance is now always returned in TABLE_LIST::table member. This change allows to get rid of false assumption in open_tables() implementation and makes it more clear. ------------------------------------------------------------ revno: 2914.35.21 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 17:39:03 +0300 message: Backport of: ---------------------------------------------------------- revno: 2630.4.26 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-prelocked_mode-to-push timestamp: Fri 2008-06-06 23:19:04 +0400 message: WL#3726: work on review comments. Remove thd->locked_tables. Always store MYSQL_LOCK instances in thd->lock. Rename thd->prelocked_mode to thd->locked_tables_mode. Use thd->locked_tables_mode to determine if we are under LOCK TABLES. Update the code to not assume that if thd->lock is set, LOCK TABLES mode is off. Review comments. ------------------------------------------------------------ revno: 2914.35.20 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 17:02:32 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.25 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Fri 2008-06-06 15:32:48 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Clarified some comments explaining control flow in prepare_for_repair(). ------------------------------------------------------------ revno: 2914.35.19 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 16:59:11 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.24 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Fri 2008-06-06 14:28:58 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Get rid of upgradability and priority attributes of metadata lock requests by replacing them with two new types of lock requests MDL_SHARED_UPGRADABLE and MDL_SHARED_HIGH_PRIO correspondingly. ------------------------------------------------------------ revno: 2914.35.18 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 16:55:45 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.22 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Thu 2008-06-05 22:06:48 +0400 message: WL#3726 "DDL locking for all metadata objects" After review fixes in progress. Moved code checking that current lock request can be satisfied given the current state of individual or global metadata lock to separate well-documented functions. ------------------------------------------------------------ revno: 2914.35.17 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 16:51:50 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.8.3 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w4 timestamp: Thu 2008-06-05 10:48:36 +0400 message: WL#3726 "DDL locking for all metadata objects". After-review fixes in progress. Adjust some comments that were using old terminology (name locks instead of exclusive metadata locks), brought some of them up-to-date with current situation in code. ------------------------------------------------------------ revno: 2914.35.16 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 16:42:28 +0300 message: Backport of: ---------------------------------------------------------- revno: 2630.2.20 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-runtime timestamp: Fri 2008-06-27 20:10:42 +0400 message: Fix a regression introduced by WL#3726 when a table was left in the table cache after DROP DATABASE. Implementation of DROP DATABASE reads a list of files in the database directory and constructs from it the list of tables to be dropped. If the filesystem is case-insensitive and case-preserving, the table names should be lowercased, because the same has been done when entries for them were inserted into the table cache. Skipping this step will lead to orphaned TABLEs left in the table cache. Fixes lowercase_table2 failure on powermacg5. ------------------------------------------------------------ revno: 2914.35.15 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 16:38:00 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.20 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Wed 2008-06-04 16:27:06 +0400 message: WL#3726 "DDL locking for all metadata objects" After review fixes in progress. Got rid of TABLE_LIST::mdl_upgradable member and related functions by using special flag which to be passed to open_table() which asks it to take upgradable metadata lock on table being opened. ------------------------------------------------------------ revno: 2914.35.14 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 16:27:03 +0300 message: Backport of: --------------------------------------------- 2630.7.3 Konstantin Osipov 2008-06-02 Various style changes preceding the removal of reopen_table(). (Post-review fixes for WL#3726). ------------------------------------------------------------ revno: 2914.35.13 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 16:14:06 +0300 message: Backport of: --------------------------------------------------------- 2630.7.2 Konstantin Osipov 2008-06-02 Fix alignment in sql_table.cc (no other changes). ------------------------------------------------------------ revno: 2914.35.12 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 01:39:13 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.18 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Tue 2008-06-03 21:07:58 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Now during upgrading/downgrading metadata locks we deal with individual metadata lock requests rather than with all requests for this object in the context. This makes API a bit more clear and makes adjust_mdl_locks_upgradability() much nicer. ------------------------------------------------------------ revno: 2914.35.11 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 01:33:22 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.17 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w2 timestamp: Thu 2008-05-29 16:52:56 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. "The great correction of names". Renamed MDL_LOCK and MDL_LOCK_DATA classes to make usage of these names in metadata locking subsystem consistent with other parts of server (i.e. thr_lock.cc). Now we MDL_LOCK_DATA corresponds to request for a lock and MDL_LOCK to the lock itself. Adjusted code in MDL subsystem and other places using these classes accordingly. Did similar thing for GLOBAL_MDL_LOCK_DATA class and also changed name of its members to correspond to names of MDL_LOCK_DATA members. Finally got rid of usage of one letter variables in MDL code since it makes code harder to search in (according to reviewer). ------------------------------------------------------------ revno: 2914.35.10 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 01:13:06 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.16 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Thu 2008-05-29 09:45:02 +0400 message: WL#3726 "DDL locking for all metadata objects". After review changes in progress. Tweaked some comments and did some renames to avoid ambiguites. ------------------------------------------------------------ revno: 2914.35.9 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 01:01:27 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.14 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Wed 2008-05-28 12:16:03 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Removed unused code and adjusted names of functions/methods to better reflect their current function. ------------------------------------------------------------ revno: 2914.35.8 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Tue 2009-12-01 00:44:05 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.13 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Wed 2008-05-28 12:07:30 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Get rid of remove_table_from_cache() function since it was doing two things at once -- waiting while no one uses particular table (now job of metadata locking) and removing TABLE/TABLE_SHARE instances from table definition cache (now job of expel_table_from_cache()). ------------------------------------------------------------ revno: 2914.35.7 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Mon 2009-11-30 22:38:25 +0300 message: Backport of: ------------------------------------------------------------------- revno: 2630.6.6 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3726 timestamp: Tue 2008-05-27 16:15:44 +0400 message: Implement code review fixes for WL#3726 "DDL locking for all metadata objects": cleanup the code from share->mutex acquisitions, which are now obsolete. ------------------------------------------------------------ revno: 2914.35.6 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Mon 2009-11-30 22:11:32 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.6.1 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3726 timestamp: Tue 2008-05-27 13:45:34 +0400 message: Remove an unused argument from release_table_share(). Remove unused members from TABLE_SHARE struct. Review comments in scope of WL#3726 "DDL locking for all metadata objects" ------------------------------------------------------------ revno: 2914.35.5 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Mon 2009-11-30 22:03:37 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.11 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Tue 2008-05-27 21:31:53 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Changed mysql_lock_tables() to be no longer responsible for reopening table if waiting for the lock on it was aborted. This allows to get rid of several annoying functions. ------------------------------------------------------------ revno: 2914.35.4 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Mon 2009-11-30 19:44:46 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.10 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Mon 2008-05-26 15:11:26 +0400 message: WL#3726 "DDL locking for all metadata objects". After review changes in progress. Implemented some renames suggested by reviewer. ------------------------------------------------------------ revno: 2914.35.3 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Mon 2009-11-30 19:21:40 +0300 message: Backport of: ---------------------------------------------------------------- 2630.4.9 Dmitry Lenev 2008-05-26 WL#3726 "DDL locking for all metadata objects". After review fixes in progress. Adjusted test case according to review. ------------------------------------------------------------ revno: 2914.35.2 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Mon 2009-11-30 19:09:42 +0300 message: Backport of: ------------------------------------------------------------ revno: 2630.4.7 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Sun 2008-05-25 11:19:02 +0400 message: WL#3726 "DDL locking for all metadata objects". Fixed silly mistake in test case which caused sporadic kill.test failures. ------------------------------------------------------------ revno: 2914.35.1 committer: Konstantin Osipov <kostja@sun.com> branch nick: next-4284 timestamp: Mon 2009-11-30 18:55:03 +0300 message: Initial import of WL#3726 "DDL locking for all metadata objects". Backport of: ------------------------------------------------------------ revno: 2630.4.1 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Fri 2008-05-23 17:54:03 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. ------------------------------------------------------------ This is the first patch in series. It transforms the metadata locking subsystem to use a dedicated module (mdl.h,cc). No significant changes in the locking protocol. The import passes the test suite with the exception of deprecated/removed 6.0 features, and MERGE tables. The latter are subject to a fix by WL#4144. Unfortunately, the original changeset comments got lost in a merge, thus this import has its own (largely insufficient) comments. This patch fixes Bug#25144 "replication / binlog with view breaks". Warning: this patch introduces an incompatible change: Under LOCK TABLES, it's no longer possible to FLUSH a table that was not locked for WRITE. Under LOCK TABLES, it's no longer possible to DROP a table or VIEW that was not locked for WRITE. ****** Backport of: ------------------------------------------------------------ revno: 2630.4.2 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Sat 2008-05-24 14:03:45 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. ****** Backport of: ------------------------------------------------------------ revno: 2630.4.3 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Sat 2008-05-24 14:08:51 +0400 message: WL#3726 "DDL locking for all metadata objects" Fixed failing Windows builds by adding mdl.cc to the lists of files needed to build server/libmysqld on Windows. ****** Backport of: ------------------------------------------------------------ revno: 2630.4.4 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Sat 2008-05-24 21:57:58 +0400 message: WL#3726 "DDL locking for all metadata objects". Fix for assert failures in kill.test which occured when one tried to kill ALTER TABLE statement on merge table while it was waiting in wait_while_table_is_used() for other connections to close this table. These assert failures stemmed from the fact that cleanup code in this case assumed that temporary table representing new version of table was open with adding to THD::temporary_tables list while code which were opening this temporary table wasn't always fulfilling this. This patch changes code that opens new version of table to always do this linking in. It also streamlines cleanup process for cases when error occurs while we have new version of table open. ****** WL#3726 "DDL locking for all metadata objects" Add libmysqld/mdl.cc to .bzrignore. ****** Backport of: ------------------------------------------------------------ revno: 2630.4.6 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Sun 2008-05-25 00:33:22 +0400 message: WL#3726 "DDL locking for all metadata objects". Addition to the fix of assert failures in kill.test caused by changes for this worklog. Make sure we close the new table only once. ------------------------------------------------------------ revno: 3079 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Sun 2010-02-14 20:30:41 +0100 message: check for poll.h ------------------------------------------------------------ revno: 3078 committer: Vladislav Vaintroub <vv221804@astra04> branch nick: mysql-next-mr-cmake timestamp: Sun 2010-02-14 14:32:27 +0100 message: remove use of undocumented __sparcv8plus - this macro does not seem to be defined anymore with Sun Studio 12 ------------------------------------------------------------ revno: 3077 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-next-mr-cmake timestamp: Sat 2010-02-13 17:01:32 +0100 message: merge ------------------------------------------------------------ revno: 2914.1.45 committer: Alexander Nozdrin <alik@sun.com> branch nick: mysql-next-mr timestamp: Sat 2010-02-13 11:33:27 +0300 message: Null-merge (configure.in) from mysql-trunk. ------------------------------------------------------------ revno: 2875.11.36 author: joerg.bruehe@sun.com committer: MySQL Build Team <build@mysql.com> branch nick: mysql-5.5 timestamp: Fri 2010-02-12 20:17:53 +0100 message: Raise version number after cloning 5.5.2-m2 ------------------------------------------------------------ revno: 2914.1.44 committer: Joerg Bruehe <joerg@mysql.com> branch nick: next-bugfix timestamp: Fri 2010-02-12 17:51:26 +0100 message: Upmerge a merge changeset, whose contents was already here, so this one doesn't have any contents change. ------------------------------------------------------------ revno: 2875.11.35 tags: mysql-5.5.2-m2, clone-5.5.2-m2-build committer: Joerg Bruehe <joerg@mysql.com> branch nick: bug33248-3-5.5 timestamp: Fri 2010-02-12 17:41:00 +0100 message: Automerge from central "trunk-bugfixing". ------------------------------------------------------------ revno: 2914.1.43 committer: Joerg Bruehe <joerg@mysql.com> branch nick: next-bugfix timestamp: Fri 2010-02-12 17:30:52 +0100 message: Null-upmerge a fix to the RPM spec file, this one was already correct. |