- 03 Jun, 2010 1 commit
-
-
Konstantin Osipov authored
Encapsulate the deadlock detection functionality into a visitor class, and separate it from the wait-for graph traversal code. Use "Internal iterator" and "Visitor" patterns to achieve the desired separation of responsibilities. Add comments.
-
- 02 Jun, 2010 1 commit
-
-
Konstantin Osipov authored
and methods.
-
- 01 Jun, 2010 3 commits
-
-
Konstantin Osipov authored
transactional SELECT and ALTER TABLE ... REBUILD PARTITION". Make open flags part of Open_table_context. This allows to simplify some code and (in future) enforce the invariant that we don't, say, request a back off on the table when there is MYSQL_OPEN_IGNORE_FLUSH flag.
-
Konstantin Osipov authored
transactional SELECT and ALTER TABLE ... REBUILD PARTITION". Move declarations of sql_base.cc classes to sql_base.h (previously declared in sql_class.h). Became possible after a header file split.
-
Konstantin Osipov authored
transactional SELECT and ALTER TABLE ... REBUILD PARTITION". Remove unused code - TL_WRITE_ALLOW_READ thr_lock.c lock.
-
- 30 May, 2010 3 commits
-
-
Dmitry Lenev authored
bug #46947 "Embedded SELECT without FOR UPDATE is causing a lock". Fixed comments in tests. Improved comments and performance of auxiliary scripts.
-
Dmitry Lenev authored
RENAME is allowed on views (not documented, broken)". Adjusted test cases in funcs_1 suite after removing support of ALTER TABLE RENAME for views.
-
Dmitry Lenev authored
bug #51263 "Deadlock between transactional SELECT and ALTER TABLE ... REBUILD PARTITION" and has been causing compilation error when server was built with NDB support.
-
- 28 May, 2010 1 commit
-
-
Dmitry Lenev authored
is allowed on views (not documented, broken)". Remove support of ALTER TABLE RENAME for views as: a) this feature was not documented, c) does not add any compatibility with other databases, b) its implementation doesn't follow metadata locking protocol by accessing .FRM without holding any metadata lock, c) its implementation complicates ALTER TABLE's code by introducing yet another separate branch to it. After this patch one can rename a view by using the documented way - RENAME TABLE statement.
-
- 27 May, 2010 3 commits
-
-
Davi Arnaut authored
objects whose length is stored in a size_t type.
-
Davi Arnaut authored
Post-merge fix: Pass the right parameter type to open_and_lock_tables. Passing FALSE ensures that derived table handling is disabled, truncate only operates on base tables.
-
Davi Arnaut authored
Post-merge fix: Retrieve handler statistics to workaround quirks of the archive storage engine.
-
- 26 May, 2010 2 commits
-
-
Dmitry Lenev authored
The problem was that mdl_sync.test was failing sporadically, due to fact that part of the test didn't take into account effects of MyISAM's concurrent insert. This patch solves the problem by making test case robust against concurrent insert.
-
Dmitry Lenev authored
SELECT and ALTER TABLE ... REBUILD PARTITION". ALTER TABLE on InnoDB table (including partitioned tables) acquired exclusive locks on rows of table being altered. In cases when there was concurrent transaction which did locking reads from this table this sometimes led to a deadlock which was not detected by MDL subsystem nor by InnoDB engine (and was reported only after exceeding innodb_lock_wait_timeout). This problem stemmed from the fact that ALTER TABLE acquired TL_WRITE_ALLOW_READ lock on table being altered. This lock was interpreted as a write lock and thus for table being altered handler::external_lock() method was called with F_WRLCK as an argument. As result InnoDB engine treated ALTER TABLE as an operation which is going to change data and acquired LOCK_X locks on rows being read from old version of table. In case when there was a transaction which already acquired SR metadata lock on table and some LOCK_S locks on its rows (e.g. by using it in subquery of DML statement) concurrent ALTER TABLE was blocked at the moment when it tried to acquire LOCK_X lock before reading one of these rows. The transaction's attempt to acquire SW metadata lock on table being altered led to deadlock, since it had to wait for ALTER TABLE to release SNW lock. This deadlock was not detected and got resolved only after timeout expiring because waiting were happening in two different subsystems. Similar deadlocks could have occured in other situations. This patch tries to solve the problem by changing ALTER TABLE implementation to use TL_READ_NO_INSERT lock instead of TL_WRITE_ALLOW_READ. After this step handler::external_lock() is called with F_RDLCK as an argument and InnoDB engine correctly interprets ALTER TABLE as operation which only reads data from original version of table. Thanks to this ALTER TABLE acquires only LOCK_S locks on rows it reads. This, in its turn, causes inter-subsystem deadlocks to go away, as all potential lock conflicts and thus deadlocks will be limited to metadata locking subsystem: - When ALTER TABLE reads rows from table being altered it can't encounter any locks which conflict with LOCK_S row locks. There should be no concurrent transactions holding LOCK_X row locks. Such a transaction should have been acquired SW metadata lock on table first which would have conflicted with ALTER's SNW lock. - Vice versa, when DML which runs concurrently with ALTER TABLE tries to lock row it should be requesting only LOCK_S lock which is compatible with locks acquired by ALTER, as otherwise such DML must own an SW metadata lock on table which would be incompatible with ALTER's SNW lock.
-
- 25 May, 2010 2 commits
-
-
Davi Arnaut authored
The problem was that TRUNCATE TABLE didn't take a exclusive lock on a table if it resorted to truncating via delete of all rows in the table. Specifically for InnoDB tables, this could break proper isolation as InnoDB ends up aborting some granted locks when truncating a table. The solution is to take a exclusive metadata lock before TRUNCATE TABLE can proceed. This guarantees that no other transaction is using the table. Incompatible change: Truncate via delete no longer fails if sql_safe_updates is activated (this was a undocumented side effect).
-
Dmitry Lenev authored
transactional SELECT and ALTER TABLE ... REBUILD PARTITION". The goal of this patch is to decouple type of metadata lock acquired for table by open_tables() from type of table-level lock to be acquired on it. To achieve this we change approach to how we determine what type of metadata lock should be acquired on table to be open. Now instead of inferring it at open_tables() time from flags and type of table-level lock we rely on that type of metadata lock is properly set at parsing time and is not changed further.
-
- 21 May, 2010 1 commit
-
-
Dmitry Lenev authored
FOR UPDATE is causing a lock". This patch tries to address problems which were exposed during backporting of original patch to 5.1 tree. - It ensures that we don't change locking behavior of simple SELECT statements on InnoDB tables when they are executed under LOCK TABLES ... READ and with @@innodb_table_locks=0. Also we no longer pass TL_READ_DEFAULT/TL_WRITE_DEFAULT lock types, which are supposed to be parser-only, to handler::start_stmt() method. - It makes check_/no_concurrent_insert.inc auxiliary scripts more robust against changes in test cases that use them and also ensures that they don't unnecessarily change environment of caller.
-
- 19 May, 2010 1 commit
-
-
Jon Olav Hauglid authored
The problem was that OPTMIZE TABLE was allowed to run on a table in use by a transaction in a different connection. This caused repeatable read to break. This bug was fixed by the introduction of metadata locking, WL#4284. OPTIMIZE TABLE will now be blocked until the transaction using the table, has ended. This patch contains a regression test added to innodb_mysql_lock.test and no code changes.
-
- 18 May, 2010 3 commits
-
-
Jon Olav Hauglid authored
-
Andrei Elkin authored
-
Andrei Elkin authored
-
- 17 May, 2010 2 commits
-
-
Alexander Nozdrin authored
That was a pure test issue -- filter implementation in Perl did not work on some platform (the bug occurred on Windows Server 2008 with Cygwin Perl 5.10.0).
-
Alexander Nozdrin authored
in a multiquery packet): fix NDB test failures.
-
- 16 May, 2010 2 commits
-
-
Andrei Elkin authored
removing disabled line for rpl_row_create_table due to Bug#45576. Anyway, the test is still there because of Bug#51574
-
Andrei Elkin authored
pushing to next-mr-bugfixing from working branch
-
- 14 May, 2010 3 commits
-
-
Alexander Nozdrin authored
multiquery packet). Background: - a query can contain multiple SQL statements; - the server frees resources allocated to process a query when the whole query is handled. In other words, resources allocated to process one SQL statement from a multi-statement query are freed when all SQL statements are handled. The problem was that the parser allocated a buffer of size of the whole query for each SQL statement in a multi-statement query. Thus, if a query had many SQL-statements (so, the query was long), but each SQL statement was short, ther parser tried to allocate huge amount of memory (number of small SQL statements * length of the whole query). The memory was allocated for a so-called "cpp buffer", which is intended to store pre-processed SQL statement -- SQL text without version specific comments. The fix is to allocate memory for the "cpp buffer" once for all SQL statements (once for a query).
-
Konstantin Osipov authored
approved): 3161 Vladislav Vaintroub 2010-04-29 Bug#53196 : CMake builds don't support 'make tags' and 'make ctags' targets. - Added tags and ctags targets
-
Alexander Nozdrin authored
for ALTER TABLE, LOAD DATA). ROW_COUNT is now assigned according to the following rules: - In my_ok(): - for DML statements: to the number of affected rows; - for DDL statements: to 0. - In my_eof(): to -1 to indicate that there was a result set. We derive this semantics from the JDBC specification, where int java.sql.Statement.getUpdateCount() is defined to (sic) "return the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned". - In my_error(): to -1 to be compatible with the MySQL C API and MySQL ODBC driver. - For SIGNAL statements: to 0 per WL#2110 specification. Zero is used since that's the "default" value of ROW_COUNT in the diagnostics area.
-
- 13 May, 2010 3 commits
-
-
Konstantin Osipov authored
-
Dmitry Lenev authored
type, which some time ago became part of Open_table_context class. Apparently standalone enum type was erroneously re-introduced during one of merges.
-
Dmitry Lenev authored
which was introduced by fix for bug 47459 "Assertion in Diagnostics_area::set_eof_status on OPTIMIZE TABLE.
-
- 12 May, 2010 4 commits
-
-
Jonathan Perkin authored
-
Jonathan Perkin authored
-
Jonathan Perkin authored
- Update/fix file layouts for each package type, add new types for native package formats including deb, rpm and svr4. - Build all plugins, including debug versions - Update compiler flags to match current release - Add missing @VAR@ expansions - Install correct mysqclient library symlinks - Fix icc/ia64 builds - Fix install of libmysqld-debug - Don't include mysql_embedded - Remove unpackaged manual pages to avoid missing files warnings - Don't install mtr's test suite
-
Jonathan Perkin authored
with other merges from the old distribution-specific spec file. - update copyright notices - remove __os_install_post override, it was only necessary as a hack to build debuginfo packages - now that we no longer make them we can revert to the distribution macro which likely has other useful bits we might want - remove _unpackaged_files_terminate_build override, we want to know of any orphaned files - include native distribution support - no longer build separate debuginfo RPMs, instead just include debug/symbols in all binaries, which is more useful for support - include support for building commercial RPMs, requires a commercial source tree - remove cluster RPM support, we don't build them from this source tree - use CMake for building, and update package lists to match the new install layout/files. Remove any options which were only useful for automake builds (e.g. yassl/zlib). - other minor cleanups
-
- 11 May, 2010 2 commits
-
-
Mats Kindahl authored
via mysqld_safe Plugin dir was set to a hard-coded path instead of relative the base dir. This patch fixes this by using a path relative the basedir instead of the plugin directory indicated by the configuration.
-
Alexander Nozdrin authored
-
- 07 May, 2010 2 commits
-
-
Alexander Nozdrin authored
-
Alexander Nozdrin authored
-
- 05 May, 2010 1 commit
-
-
Konstantin Osipov authored
thd->in_multi_stmt_transaction() and thd->active_transaction().
-