Commit graph

66442 commits

Author SHA1 Message Date
Georgi Kodinov
047d47241c Addendum #4 to bug #53095
SHOW DATABASES LIKE ... was not converting to lowercase on comparison as the
documentation is suggesting. 
Fixed it to behave similarly to SHOW TABLES LIKE ... and updated the failing
on MacOSX lowercase_table2 test case.
2010-07-21 18:05:57 +03:00
Vasil Dimov
8152cd0ac8 Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
(resolving conflicts in mysql-test/suite/rpl/t/rpl_sync-slave.opt and
configure.cmake)
2010-07-21 17:22:29 +03:00
Alexey Kopytov
83ac7e6d4f Automerge. 2010-07-21 14:18:05 +04:00
Alexey Kopytov
e675e4ab09 Automerge. 2010-07-21 14:14:11 +04:00
Alexey Kopytov
7e7de8a92c Automerge. 2010-07-21 14:13:19 +04:00
Joerg Bruehe
619a19fe52 Merge the version number increase (5.1.49 -> 5.1.50) into the main tree. 2010-07-21 12:09:50 +02:00
Dmitry Shulga
49d327ebf7 Fixed bug #42496 - the server could crash on a debug assert after a failure
to write into a closed socket
2010-07-21 14:56:43 +07:00
Calvin Sun
abacbed6f4 Improve InnoDB synchronization primitives on Windows
This patch was originally developed by Vladislav Vaintroub.
The main changes are:

 * Use TryEnterCriticalSection in os_fast_mutex_trylock().
 * Use lightweight condition variables on Vista or later Windows;
   but fall back to events on older Windows, such as XP.

This patch also fixes the following bugs:
  bug# 52102 InnoDB Plugin shows performance drop compared to InnoDB
             on Windows
  bug# 53204 os_fastmutex_trylock is implemented incorrectly on Windows

rb://363 approved by Inaam Rana
2010-07-20 15:42:31 -05:00
Davi Arnaut
3ff34a4a32 Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5
due to GCC preprocessor change
      
Addendum for trunk: add -DMYSQL_ABI_CHECK to the cmake ABI check.
2010-07-20 16:53:39 -03:00
Davi Arnaut
5b19c1593f Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5
due to GCC preprocessor change

Addendum for trunk: do not include system header when checking
the ABI.
2010-07-20 16:34:20 -03:00
Davi Arnaut
6c15f6718f Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-20 16:30:10 -03:00
Matthias Leich
6a029cc54c Bug#53102 perfschema.pfs_upgrade fails on sol10 sparc64 max in parallel mode
The reason for the bug above is unclear but
- Modify pfs_upgrade so that it's result is easier to analyze in case something fails
- Fix several minor weaknesses which could cause that a successing test (either an
  already existing or a to be developed one) fails because of imperfect cleanup,
  too slow disconnected sessions etc.
should either fix the bug or reduce it's probability or at least
make the analysis of failures easier.
2010-07-20 21:15:29 +02:00
Davi Arnaut
c96b249fc3 Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix warnings flagged by the new warning option -Wunused-but-set-variable
that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The
option causes a warning whenever a local variable is assigned to but is
later unused. It also warns about meaningless pointer dereferences.
2010-07-20 15:07:36 -03:00
Davi Arnaut
8d407c5f70 Fix tree name. 2010-07-20 14:55:16 -03:00
Davi Arnaut
5cc33247a7 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-20 14:54:05 -03:00
Davi Arnaut
fdaefaa6d4 Null merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-20 14:45:44 -03:00
Davi Arnaut
d676c3ff0e Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5
due to GCC preprocessor change
      
The problem is that newer GCC versions treats missing headers
as fatal errors. The solution is to use a guard macro to prevent
the inclusion of system headers when checking the ABI with the
C Preprocessor.

Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638
           http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836
2010-07-20 14:44:29 -03:00
Davi Arnaut
17b9155f00 Bug#54453: Failing assertion: trx->active_trans when renaming a
table with active trx

Essentially, the problem is that InnoDB does a implicit commit
when a cursor (table handler) is unlocked/closed, creating
a dissonance between the transaction state within the server
layer and the storage engine layer. Theoretically, a statement
transaction can encompass several table instances in a similar
manner to a multiple statement transaction, hence it does not
make sense to limit a statement transaction to the lifetime of
the table instances (cursors) used within it.

Since this particular instance of the problem is only triggerable
on 5.1 and is masked on 5.5 due 2PC being skipped (assertion is in
the prepare phase of a 2PC), the solution (which is less risky) is
to explicitly end the transaction before the cached table is unlock
on rename table.

The patch is to be null merged into trunk.
2010-07-20 14:36:15 -03:00
Sven Sandberg
cf5e69c904 BUG#55322: SHOW BINLOG EVENTS increases @@SESSION.MAX_ALLOWED_PACKET
Problem: when SHOW BINLOG EVENTS was issued, it increased the value of
@@session.max_allowed_packet. This allowed a non-root user to increase
the amount of memory used by her thread arbitrarily. Thus, it removes
the bound on the amount of system resources used by a client, so it
presents a security risk (DoS attack).

Fix: it is correct to increase the value of @@session.max_allowed_packet
while executing SHOW BINLOG EVENTS (see BUG 30435). However, the
increase should only be temporary. Thus, the fix is to restore the value
when SHOW BINLOG EVENTS ends.
The value of @@session.max_allowed_packet is also increased in
mysql_binlog_send (i.e., the binlog dump thread). It is not clear if this
can cause any trouble, since normally the client that issues
COM_BINLOG_DUMP will not issue any other commands that would be affected
by the increased value of @@session.max_allowed_packet. However, we
restore the value just in case.
2010-07-20 17:27:13 +02:00
Davi Arnaut
9e01fddb5b Remove exceptions to the assert, bug has been fixed. 2010-07-20 08:57:02 -03:00
Davi Arnaut
3a22d332c7 Bug#22320: my_atomic-t unit test fails
Bug#52261: 64 bit atomic operations do not work on Solaris i386
           gcc in debug compilation

One of the various problems was that the source operand to
CMPXCHG8b was marked as a input/output operand, causing GCC
to use the EBX register as the destination register for the
CMPXCHG8b instruction. This could lead to crashes as the EBX
register is also implicitly used by the instruction, causing
the value to be potentially garbaged and a protection fault
once the value is used to access a position in memory.

Another problem was the lack of proper clobbers for the atomic
operations and, also, a discrepancy between the implementations
for the Compare and Set operation. The specific problems are
described and fixed by Kristian Nielsen patches:

Patch: 1

Fix bugs in my_atomic_cas*(val,cmp,new) that *cmp is accessed
after CAS succeds.

In the gcc builtin implementation, problem was that *cmp was
read again after atomic CAS to check if old *val == *cmp;
this fails if CAS is successful and another thread modifies
*cmp in-between.

In the x86-gcc implementation, problem was that *cmp was set
also in the case of successful CAS; this means there is a
window where it can clobber a value written by another thread
after successful CAS.

Patch 2:

Add a GCC asm "memory" clobber to primitives that imply a
memory barrier.

This signifies to GCC that any potentially aliased memory
must be flushed before the operation, and re-read after the
operation, so that read or modification in other threads of
such memory values will work as intended.

In effect, it makes these primitives work as memory barriers
for the compiler as well as the CPU. This is better and more
correct than adding "volatile" to variables.
2010-07-23 09:37:10 -03:00
Alexander Nozdrin
7543705718 Auto-merge (empty) from mysql-trunk. 2010-07-23 16:23:21 +04:00
Jonathan Perkin
83aebca534 Revert the ndb removal for now. 2010-07-20 10:35:55 +01:00
Alexander Nozdrin
e1b39c6336 Auto-merge from mysql-trunk-bugfixing. 2010-07-20 12:19:35 +04:00
Alexander Nozdrin
9d0ef81e27 Auto-merge from mysql-trunk-merge. 2010-07-20 12:09:51 +04:00
Davi Arnaut
ce2403e6ee Merge into mysql-trunk-merge.. 2010-07-19 16:03:59 -03:00
Davi Arnaut
13f856f57b Merge of mysql-5.1 into mysql-5.1-bugteam. 2010-07-19 15:34:28 -03:00
Evgeny Potemkin
589027b2f5 Bug#49771: Incorrect MIN/MAX for date/time values.
This bug is a design flaw of the fix for the bug#33546. It assumed that an
item can be used only in one comparison context, but actually it isn't the
case. Item_cache_datetime is used to store result for MIX/MAX aggregate
functions. Because Arg_comparator always compares datetime values as INTs when
possible the Item_cache_datetime most time caches only INT value. But
since all datetime values has STRING result type MIN/MAX functions are asked
for a STRING value when the result is being sent to a client. The
Item_cache_datetime was designed to avoid conversions and get INT/STRING
values from an underlying item, but at the moment the values is asked
underlying item doesn't hold it anymore thus wrong result is returned.
Beside that MIN/MAX aggregate functions was wrongly initializing cached result
and this led to a wrong result.

The Item::has_compatible_context helper function is added. It checks whether
this and given items has the same comparison context or can be compared as
DATETIME values by Arg_comparator. The equality propagation optimization is
adjusted to take into account that items which being compared as DATETIME
can have different comparison contexts.
The Item_cache_datetime now converts cached INT value to a correct STRING
DATETIME value by means of number_to_datetime & my_TIME_to_str functions.
The Arg_comparator::set_cmp_context_for_datetime helper function is added. 
It sets comparison context of items being compared as DATETIMEs to INT if
items will be compared as longlong.
The Item_sum_hybrid::setup function now correctly initializes its result
value.
In order to avoid unnecessary conversions Item_sum_hybrid now states that it
can provide correct longlong value if the item being aggregated can do it
too.
2010-07-19 21:11:47 +04:00
Georgi Kodinov
32dcc26b33 fix tree names 2010-07-19 17:47:17 +03:00
MySQL Build Team
f0771195ed 5.1.49 push to mysql-5.1 2010-07-19 16:30:34 +02:00
Jonathan Perkin
40856e830d bug#55250: 5.5.5-m3 incorrectly compiled with exceptions on Solaris/x86
Put '-features=no%except' back into Solaris/x86 CXXFLAGS.
2010-07-19 15:23:02 +01:00
Alexander Nozdrin
9503a8e23f Manual merge from mysql-trunk.
Conflicts:
  - scripts/CMakeLists.txt
2010-07-19 18:00:29 +04:00
sunanda.menon@sun.com
226852ea14 Merge from mysql-5.5.5-m3-release 2010-07-19 12:10:01 +02:00
Jon Olav Hauglid
d4885416b7 manual merge from mysql-5.1-bugteam 2010-07-19 11:21:24 +02:00
Jon Olav Hauglid
4b2378a148 Bug #54734 assert in Diagnostics_area::set_ok_status
This assert checks that the server does not try to send OK to the
client if there has been some error during processing. This is done
to make sure that the error is in fact sent to the client.

The problem was that view errors during processing of WHERE conditions
in UPDATE statements where not detected by the update code. It therefore
tried to send OK to the client, triggering the assert.
The bug was only noticeable in debug builds.

This patch fixes the problem by making sure that the update code
checks for errors during condition processing and acts accordingly.
2010-07-19 11:03:52 +02:00
Jon Olav Hauglid
52b1e11ee1 merge from mysql-trunk-bugfixing 2010-07-19 10:27:53 +02:00
Davi Arnaut
83c154dc34 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Post-merge fix: remove leftovers from safemalloc removal.
2010-07-17 11:56:00 -03:00
Andrei Elkin
c225cde943 merging for bug#54935 to trunk-bugfixing 2010-07-17 14:07:36 +03:00
Davi Arnaut
4d532f6ea6 Merge of mysql-trunk-merge into mysql-trunk-bugfixing. 2010-07-16 17:02:40 -03:00
Andrei Elkin
2d91f05e88 bug#54935
applying bundle made for next-mr-bugfixing to trunk-bugfixing branch of the bug
2010-07-16 21:25:38 +03:00
Andrei Elkin
48d1c50ac1 bug#54935
applying bundle made for next-mr-bugfixing to trunk-bugfixing branch of the bug
2010-07-16 21:25:00 +03:00
Davi Arnaut
7e9f53acdf Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-16 15:00:07 -03:00
Davi Arnaut
0b83096be5 Bug#48327: Some crashes specific to FreeBSD ("embedded")
Bug#47139: Test "merge" crashes in "embedded" run

Backport patch for Bug#47139
2010-07-16 14:33:35 -03:00
Georgi Kodinov
a95b184630 merge 2010-07-16 18:04:39 +03:00
Marc Alff
2fa98ec48f Bug#53255 Installed psi headers in wrong directory
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
2010-07-16 08:43:04 -06:00
Marc Alff
3fa071bbd6 Bug#53392 Tests: perfschema.query_cache fails
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
2010-07-16 08:28:19 -06:00
Marc Alff
d32d8f8d58 Bug#53394 Tests: perfschema.myisam_file_io fails
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
2010-07-16 08:21:07 -06:00
Marc Alff
9247f2252b Bug#54467 performance schema complains of wrong structure in bootstrap mode
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
2010-07-16 08:01:47 -06:00
Georgi Kodinov
d4931e4beb Addendum to bug #53814 : test results updates 2010-07-16 16:56:33 +03:00
Marc Alff
ae127ed601 Bug#54782 Performance schema per thread accounting and thread cache
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
2010-07-16 07:50:50 -06:00