Commit graph

67154 commits

Author SHA1 Message Date
Vasil Dimov
d4a2abcd2f (row0umod.c:117) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:10:33 +03:00
Vasil Dimov
17cc7b76be (row0purge.c:789) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:09:30 +03:00
Vasil Dimov
11a3945ef0 (i_s.cc:1111) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:07:54 +03:00
Vasil Dimov
86d0e51a9e (ha_innodb.cc:9037) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:04:14 +03:00
Vasil Dimov
ce3e9093d6 (ha_innodb.cc:7202) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:03:05 +03:00
Vasil Dimov
0f6113f6a3 (que0que.c:1286) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:01:14 +03:00
Vasil Dimov
ac67443afe (os0file.c:1485) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:00:28 +03:00
Vasil Dimov
b69c8895c9 (os0file.c:1486) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:57:36 +03:00
Vasil Dimov
70330ca917 (log0recv.c:2905) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:55:54 +03:00
Vasil Dimov
191b594322 (log0recv.c:1660) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:53:07 +03:00
Vasil Dimov
0b59b891c2 (log0recv.c:572) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:51:51 +03:00
Vasil Dimov
2efc8b2221 (ibuf0ibuf.c:1300) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:51:11 +03:00
Vasil Dimov
6dfcadafc9 Remove redundant variable 2010-09-20 18:48:38 +03:00
Vasil Dimov
6101698651 (eval0eval.c:388) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:47:51 +03:00
Vasil Dimov
666c01419d (dict0dict.c:4458) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:47:15 +03:00
Vasil Dimov
80226874dd (dict0crea.c:630) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:46:24 +03:00
Vasil Dimov
288a543332 (buf0flu.c:136) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:45:40 +03:00
Vasil Dimov
ef76f25d26 (btr0sea.c:1510) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:43:15 +03:00
Vasil Dimov
633971d464 (btr0pcur.c:455) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:42:13 +03:00
Vasil Dimov
dd7989d2b4 (btr0cur.c:4559) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:38:43 +03:00
Vasil Dimov
530a8c6f35 (btr0cur.c:1957) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:33:39 +03:00
Vasil Dimov
17d6947180 (btr0btr.c:2566) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:31:58 +03:00
Vasil Dimov
ab8cec7774 (btr0btr.c:1900) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:16:19 +03:00
Vasil Dimov
c37573590d (btr0btr.c:606) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 17:59:59 +03:00
Georgi Kodinov
353739fdef merge of mysql-5.5 into mysql-5.5-wl1054 2010-09-20 17:17:32 +03:00
Vasil Dimov
aad1419981 Whitespace fixup on ha_innodb.cc:2612 2010-09-20 17:14:21 +03:00
Georgi Kodinov
9fee5866be Bug #56798 : Wrong credentials assigned when using a proxy user.
Fixed incorrect handling of user credentials when authenticating
via proxy user. Now the server will use the proxies user's 
access mask and host to update the security context runtime 
structure when logging in.

Fixed a compilation warning with the embedded library.

Fixed a crash when doing a second GRANT PROXY on ''@'' due to 
incomplete equality check logic.
2010-09-20 16:51:42 +03:00
Vasil Dimov
f043b95262 Whitespace fixup on ha_innodb.cc:1274 2010-09-20 15:50:34 +03:00
Vasil Dimov
fe55bb0054 Increment InnoDB version from 1.1.2 to 1.1.3
InnoDB 1.1.2 was released with MySQL 5.5.6-rc
2010-09-20 15:31:34 +03:00
Bjorn Munch
c18a34bda6 Bug #55426 mysqltest crashes when trying to unlock not acquired mutex
Follow-up: don't call pthread_join() on Windows
This change only valid for 5.1
2010-09-20 11:21:27 +02:00
Bjorn Munch
4237920a40 small test fix after 56753 2010-09-20 10:21:55 +02:00
Bjorn Munch
bf89d47516 Bug #56787 MTR completion report should be more informative
Added counts of skipped test, inclusing how many by test itself
Also fixed misspelling in the (hitherto unused) variable name
2010-09-20 10:12:39 +02:00
Bjorn Munch
acf56b6d7a upmerge 56753 2010-09-20 10:08:32 +02:00
Bjorn Munch
3cafc38f0d merge from 5.5 2010-09-20 10:06:17 +02:00
Joerg Bruehe
f4444c0016 Merge 5.5.6-rc to the main tree. 2010-09-19 22:01:12 +02:00
Davi Arnaut
1d5209438c Bug#52419: x86 assembly based atomic CAS causes test failures
The problem was that the x86 assembly based atomic CAS
(compare and swap) implementation could copy the wrong
value to the ebx register, where the cmpxchg8b expects
to see part of the "comparand" value. Since the original
value in the ebx register is saved in the stack (that is,
the push instruction causes the stack pointer to change),
a wrong offset could be used if the compiler decides to
put the source of the comparand value in the stack.

The solution is to copy the comparand value directly from
memory. Since the comparand value is 64-bits wide, it is
copied in two steps over to the ebx and ecx registers.

include/atomic/x86-gcc.h:
  For reference, an excerpt from a faulty binary follows.
  
  It is a disassembly of my_atomic-t, compiled at -O3 with
  ICC 11.0. Most of the code deals with preparations for
  a atomic cmpxchg8b operation. This instruction compares
  the value in edx:eax with the destination operand. If the
  values are equal, the value in ecx:ebx is stored in the
  destination, otherwise the value in the destination operand
  is copied into edx:eax.
  
  In this case, my_atomic_add64 is implemented as a compare
  and exchange. The addition is done over temporary storage
  and loaded into the destination if the original term value
  is still valid.
  
    volatile int64 a64;
    int64 b=0x1000200030004000LL;
    a64=0;
        mov    0xfffffda8(%ebx),%eax
        xor    %ebp,%ebp
        mov    %ebp,(%eax)
        mov    %ebp,0x4(%eax)
    my_atomic_add64(&a64, b);
        mov    0xfffffda8(%ebx),%ebp      # Load address of a64
        mov    0x0(%ebp),%edx             # Copy value
        mov    0x4(%ebp),%ecx
        mov    %edx,0xc(%esp)             # Assign to tmp var in the stack
        mov    %ecx,0x10(%esp)
        add    $0x30004000,%edx           # Sum values
        adc    $0x10002000,%ecx
        mov    %edx,0x8(%esp)             # Save part of result for later
        mov    0x0(%ebp),%esi             # Copy value of a64 again
        mov    0x4(%ebp),%edi
        mov    0xc(%esp),%eax             # Load the value of a64 used
        mov    0x10(%esp),%edx            # for comparison
        mov    %esi,(%esp)
        mov    %edi,0x4(%esp)
        push   %ebx                       # Push %ebx into stack. Changes esp.
        mov    0x8(%esp),%ebx             # Wrong restore of the result.
        lock cmpxchg8b 0x0(%ebp)
        sete   %cl
        pop    %ebx
2010-09-17 17:34:15 -03:00
Alfranio Correia
873477ee82 merge mysql-5.1-bugteam --> mysql-5.5-merge 2010-09-17 21:22:34 +01:00
Marc Alff
14ac8c79ff Bug#50557 checksum table crashes server when used in performance_schema
CHECKSUM TABLE for performance schema tables could cause uninitialized
memory reads.

The root cause is a design flaw in the implementation of
mysql_checksum_table(), which do not honor null fields.

However, fixing this bug in CHECKSUM TABLE is risky, as it can cause the
checksum value to change.

This fix implements a work around, to systematically reset fields values
even for null fields, so that the field memory representation is always
initialized with a known value.
2010-09-17 13:03:09 -06:00
Marc Alff
fdb40d42e5 local merge 2010-09-17 10:21:53 -06:00
Alfranio Correia
0c74cc0d10 merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2010-09-17 14:55:23 +01:00
Alfranio Correia
51113c8aa3 merge mysql-5.5-bugfixing (local) --> mysql-5.5-bugfixing 2010-09-17 12:58:27 +01:00
Jimmy Yang
bc4c38ac43 Temporarily backout the Information Schema System Table Information Schema
interface related change, will put back in once gain approval.
2010-09-16 19:24:32 -07:00
Marc Alff
6b107fbbf8 Bug#56832 perfschema.server_init test output not consistent
Before this fix, the test output for perfschema.server_init would
vary between executions, because some of the objects tested were
not guaranteed to exist in all configurations / code paths.

This fix removes these weak tests.

Also, comments referring to abandonned code have been cleaned up.
2010-09-16 19:04:34 -06:00
Jon Olav Hauglid
a51a4b104c Merge from mysql-5.5-bugfixing to mysql-5.5-runtime. 2010-09-16 16:16:29 +02:00
Dmitry Lenev
be2061c051 Fix for merge.test failures in mysql-5.5-runtime
tree for embedded server

Test case for bug #56251 "Deadlock with INSERT
DELAYED and MERGE tables" can't be run against
embedded server. Embedded server converts all
DELAYED INSERTs into ordinary INSERTs and this
test can't work properly if such conversion
happens.

Moved this test from merge.test to delayed.test
which is skipped if test suite is run with
--embedded-server option.
2010-09-16 18:06:46 +04:00
Sergey Glukhov
5fc801dcd6 5.1-bugteam->5.5-merge 2010-09-16 16:20:35 +04:00
Sergey Glukhov
31a38c0fc5 Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
Subselect executes twice, at JOIN::optimize stage
and at JOIN::execute stage. At optimize stage
Innodb prebuilt struct which is used for the
retrieval of column values is initialized in.
ha_innobase::index_read(), prebuilt->sql_stat_start is true.
After QUICK_ROR_INTERSECT_SELECT finished his job it
restores read_set/write_set bitmaps with initial values
and deactivates one of the handlers used by
QUICK_ROR_INTERSECT_SELECT in JOIN::cleanup
(it's the case when we reuse original handler as one of
 handlers required by QUICK_ROR_INTERSECT_SELECT object).
On second subselect execution inactive handler is activated
in  QUICK_RANGE_SELECT::reset, file->ha_index_init().
In ha_index_init Innodb prebuilt struct is reinitialized
with inappropriate read_set/write_set bitmaps. Further
reinitialization in ha_innobase::index_read() does not
happen as prebuilt->sql_stat_start is false.
It leads to partial retrieval of required field values
and we get a mix of field values from different records
in the record buffer.
The fix is to reset
read_set/write_set bitmaps as these values
are required for proper intialization of
internal InnoDB struct which is used for
the retrieval of column values
(see build_template(), ha_innodb.cc)


mysql-test/include/index_merge_ror_cpk.inc:
  test case
mysql-test/r/index_merge_innodb.result:
  test case
mysql-test/r/index_merge_myisam.result:
  test case
sql/opt_range.cc:
  if ROR merge scan is used we need to reset
  read_set/write_set bitmaps as these values
  are required for proper intialization of
  internal InnoDB struct which is used for
  the retrieval of column values
  (see build_template(), ha_innodb.cc)
2010-09-16 16:13:53 +04:00
Magne Mahre
55ad009bed Merge from 5.1-bugteam 2010-09-16 13:00:53 +02:00
Magne Mahre
ebd207baa8 Bug #54606 innodb fast alter table + pack_keys=0 prevents
adding new indexes

A fast alter table requires that the existing (old) table
and indices are unchanged (i.e only new indices can be
added).  To verify this, the layout and flags of the old
table/indices are compared for equality with the new.

The PACK_KEYS option is a no-op in InnoDB, but the flag
exists, and is used in the table compare.  We need to
check this (table) option flag before deciding whether an 
index should be packed or not.  If the table has
explicitly set PACK_KEYS to 0, the created indices should
not be marked as packed/packable.
2010-09-16 12:51:08 +02:00
Dmitry Shulga
deacb7c8ab Auto-merge from mysql-5.1-bugteam for bug#42503. 2010-09-16 17:38:13 +07:00