Commit graph

60865 commits

Author SHA1 Message Date
Joerg Bruehe
f6df1770fc Upmerge "configure.in" text change from 5.0 to 5.1,
fixing bug#50950.
2010-02-08 21:40:17 +01:00
Dmitry Lenev
c7e7a7d20c 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.
2010-02-08 23:19:55 +03:00
Joerg Bruehe
15728d0721 Bug#50950 Obsolete reference to www.mysql.com
in message printed at end of configure

New text for the success message of "configure".
2010-02-08 21:10:37 +01:00
Horst.Hunger
1813cacc50 Patch to fix bug#50981. Replace now the result ::1 by localhost for Windows. Both is valid. 2010-02-08 11:43:56 +01:00
Bjorn Munch
6571ac43e1 null upmerge 2010-02-07 12:41:24 +01:00
Bjorn Munch
f21ab81dd5 merge from next-mr 2010-02-07 12:38:18 +01:00
Bjorn Munch
80bff2702a null upmerge 2010-02-07 12:37:13 +01:00
Bjorn Munch
52694b2bb5 merge from mysql-trunk 2010-02-07 12:30:38 +01:00
Bjorn Munch
e814ed95bf merge from 5.1 main 2010-02-07 12:21:11 +01:00
Konstantin Osipov
f750b5f160 Merge next-4284 -> next-4284-merge 2010-02-06 13:30:07 +03:00
Konstantin Osipov
9c030fe508 Merge next-mr -> next-4284. 2010-02-06 13:28:06 +03:00
Jon Olav Hauglid
a4819c5d04 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.
2010-02-06 10:44:03 +01:00
Konstantin Osipov
0b2f51664d Merge next-4284 -> next-4284-merge. 2010-02-05 20:41:00 +03:00
Konstantin Osipov
4e95b60b27 next-mr -> next-4284 merge.
After merge fixes.
Adjust replication test cases.
2010-02-05 20:04:38 +03:00
Vladislav Vaintroub
3afa1910e3 merge 2010-02-05 18:02:26 +01:00
Vladislav Vaintroub
ebcfde20e2 merge 2010-02-05 18:01:00 +01:00
Marc Alff
3630d78e6c Merge mysql-next-mr-marc --> mysql-next-mr-bugfixing 2010-02-05 09:56:55 -07:00
Vladislav Vaintroub
a5548f3f07 Bug#50057: SHOW PROFILE CPU for Windows
On QA request, adding test that causes new code to be called. 
Even if we cannot validate the result, this will at least increase the code coverage.
2010-02-05 17:31:34 +01:00
Marc Alff
a4fc3c7bd7 merge from mysql-next-mr 2010-02-05 09:23:57 -07:00
Alexander Nozdrin
2d75b6c0af Auto-merge (empty) from mysql-trunk-bugfixing. 2010-02-05 18:45:01 +03:00
Alexander Nozdrin
55152dc2f5 Auto-merge from mysql-next-mr. 2010-02-05 18:43:29 +03:00
Alexander Nozdrin
2d9ce608cd Auto-merge from mysql-trunk. 2010-02-05 18:43:22 +03:00
Alexander Nozdrin
19df110369 Auto-merge from mysql-trunk-merge. 2010-02-05 18:33:33 +03:00
Alexander Nozdrin
a93d838a12 Cherry-pick merge from mysql-5.1-bugteam.
Original revision:
------------------------------------------------------------
revision-id: kent.boortz@sun.com-20100204182709-dw1dwpglkd5qrehb
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
------------------------------------------------------------
2010-02-05 18:31:06 +03:00
Alexander Nozdrin
1b4b3f3e5b Auto-merge (empty) from mysql-trunk-merge. 2010-02-05 18:24:50 +03:00
Alexander Nozdrin
950e907bf7 Manual merge (empty) from mysql-5.1. 2010-02-05 18:14:01 +03:00
Alexander Nozdrin
ef03406674 Auto-merge (empty) from mysql-trunk-bugfixing. 2010-02-05 18:11:16 +03:00
Marc Alff
02fc9afe81 Merge mysql-next-mr (revno 2996) --> mysql-next-mr-marc 2010-02-05 08:10:20 -07:00
Alexander Nozdrin
bdbcea3f65 Auto-merge from mysql-next-mr. 2010-02-05 18:06:46 +03:00
Konstantin Osipov
ce0f429918 Add a suppression for use of functions unsafe in statement
format.
2010-02-05 18:05:13 +03:00
Konstantin Osipov
9ba54afd4f 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).
2010-02-05 17:58:43 +03:00
Jon Olav Hauglid
1ca7c51961 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.
2010-02-05 15:52:17 +01:00
Alexander Nozdrin
7366b09c26 Remove errmsg.txt and errmsg-cnv.sh. Use errmsg-utf8.txt instead. 2010-02-05 16:52:35 +03:00
Vladislav Vaintroub
fe6f55d6a2 Bug#50057: 'SHOW PROFILE CPU' port for Windows.
Patch contributed by Alex Budovski.
2010-02-05 13:57:15 +01:00
Alexander Nozdrin
1a0f34e6a4 Manual merge from mysql-next-mr.
Conflicts:
  - sql/sys_vars.cc
2010-02-05 15:05:37 +03:00
Alexander Nozdrin
94c1dc58ad Auto-merge from mysql-trunk. 2010-02-05 15:02:03 +03:00
Alexander Nozdrin
30b561b3c9 Auto-merge (empty) from mysql-trunk-bugfixing. 2010-02-05 14:50:43 +03:00
Konstantin Osipov
293268c6c2 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.
2010-02-05 13:25:32 +03:00
Konstantin Osipov
5deaf55a1c 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().
2010-02-05 01:37:44 +03:00
Konstantin Osipov
ad0f1f8021 Merge next-mr -> next-4284. 2010-02-05 01:08:08 +03:00
Konstantin Osipov
06e1a73af6 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
2010-02-04 23:15:47 +03:00
Omer BarNir
66f1469af6 Corrections to pseudi_thread_id_basic test (WL4738) 2010-02-04 12:14:51 -08:00
Konstantin Osipov
89269e5142 Merge next-mr -> next-4284-merge. 2010-02-04 20:34:15 +03:00
Dmitry Lenev
8bba05e802 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.
2010-02-04 16:06:29 +03:00
Bjorn Munch
ad89fa1bcd 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.
2010-02-04 13:15:42 +01:00
Bjorn Munch
2cf9aaa886 upmerge 39774 2010-02-04 12:57:45 +01:00
Bjorn Munch
75047c6147 upmerge 39774 2010-02-04 12:53:08 +01:00
hery.ramilison@sun.com
1c9ab8d6ee Raise version number after cloning 5.1.44 2010-02-04 12:23:33 +01:00
Georgi Kodinov
3e699a7972 merge 2010-02-04 12:14:44 +02:00
Georgi Kodinov
21dbe024cd tree name change 2010-02-04 12:13:29 +02:00