Commit graph

4198 commits

Author SHA1 Message Date
Martin Hansson
d6ee2ecf90 Bug#56423: Different count with SELECT and CREATE SELECT queries
This is the 5.5 version of the fix. The 5.1 version was too complicated to
merge and was null merged.

This is a regression from the fix for bug no 38999. A storage engine capable
of reading only a subset of a table's columns updates corresponding bits in
the read buffer to signal that it has read NULL values for the corresponding
columns. It cannot, and should not, update any other bits. Bug no 38999
occurred because the implementation of UPDATE statements compare the NULL bits
using memcmp, inadvertently comparing bits that were never requested from the
storage engine. The regression was caused by the storage engine trying to
alleviate the situation by writing to all NULL bits, even those that it had no
knowledge of. This has devastating effects for the index merge algorithm,
which relies on all NULL bits, except those explicitly requested, being left
unchanged.

The fix reverts the fix for bug no 38999 in both InnoDB and InnoDB plugin and
changes the server's method of comparing records. For engines that always read
entire rows, we proceed as usual. For engines capable of reading only select
columns, the record buffers are now compared on a column by column basis. An
assertion was also added so that non comparable buffers are never read. Some
relevant copy-pasted code was also consolidated in a new function.
2010-10-07 12:01:51 +02:00
Magnus Blåudd
ef7300b838 Bug#56397 The version of NDB in MySQL Server should be constant
- Fix the version of NDB in MySQL Server to 5.5.7(although it's actually 6.2.18)
2010-10-07 11:13:30 +02:00
Magnus Blåudd
455d1f6ade WL#5503 SEAGULL: Move config/ac-macros/ha_ndbcluster.m4 to storage/ndb/
- Move file ha_ndbcluster.m4
 - Move "sinclude" directive from configure.in to storag/ndb/plug.in
2010-10-07 11:02:16 +02:00
Marko Mäkelä
fe2ff69061 Merge Bug#56716 from 5.1 2010-10-04 13:38:05 +03:00
Vasil Dimov
66bde6c26b Merge mysql-5.5-innodb -> mysql-5.5-bugteam 2010-10-01 16:36:35 +03:00
Vasil Dimov
f7b01a39b5 Fix a potential bug when using __sync_lock_test_and_set()
This is a manual merge from mysql-5.1-innodb of:

  revision-id: vasil.dimov@oracle.com-20100930102618-s9f9ytbytr3eqw9h
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  timestamp: Thu 2010-09-30 13:26:18 +0300
  message:
    Fix a potential bug when using __sync_lock_test_and_set()

    TYPE __sync_lock_test_and_set (TYPE *ptr, TYPE value, ...)

    it is not documented what happens if the two arguments are of different
    type like it was before: the first one was lock_word_t (byte) and the
    second one was 1 or 0 (int).

    Approved by:	Marko (via IRC)
2010-10-01 14:51:00 +03:00
Vasil Dimov
314d795bb0 Fix Bug#56340 innodb updates index stats too frequently after non-index updates
This is a manual merge from mysql-5.1-innodb of:

  revno: 3618
  revision-id: vasil.dimov@oracle.com-20100930124844-yglojy7c3vaji6dx
  parent: vasil.dimov@oracle.com-20100930102618-s9f9ytbytr3eqw9h
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-5.1-innodb
  timestamp: Thu 2010-09-30 15:48:44 +0300
  message:
    Fix Bug#56340 innodb updates index stats too frequently after non-index updates

    This is a simple optimization issue. All stats are related to only indexed
    columns, index size or number of rows in the whole table. UPDATEs that touch
    only non-indexed columns cannot affect stats and we can avoid calling the
    function row_update_statistics_if_needed() which may result in unnecessary I/O.

    Approved by:	Marko (rb://466)

In addition to the above message: we know that
row_update_cascade_for_mysql() (the other place where
row_update_statistics_if_needed is called) always updates indexed
columns (FK-related), so there is no need to add this cond there.
2010-10-01 10:34:21 +03:00
Jon Olav Hauglid
a53f61e6e8 Merge from mysql-5.5-bugteam to mysql-5.5-runtime 2010-09-30 12:43:43 +02:00
Georgi Kodinov
216418e7b2 merge 2010-09-29 17:26:32 +03:00
Alexander Nozdrin
a79093cd94 Auto-merge from mysql-5.5-merge. 2010-09-28 19:15:58 +04:00
Vasil Dimov
64ef6416bf Manually merge a GCC warning fix from 5.1 to 5.5:
------------------------------------------------------------
  revno: 3615
  revision-id: vasil.dimov@oracle.com-20100928081234-22qbm6cwht521484
  parent: vasil.dimov@oracle.com-20100928063833-snn6cjwgksa6gk3b
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-5.1-innodb
  timestamp: Tue 2010-09-28 11:12:34 +0300
  message:
    Silence a GCC warning about reaching the end of non-void func
    
    Spotted by:	Marko
2010-09-28 11:14:42 +03:00
Vasil Dimov
3a43a2e265 Merge mysql-5.5-bugfixing -> mysql-5.5-innodb 2010-09-28 09:40:57 +03:00
Vasil Dimov
f661c09dd4 Use C-style comment instead of C++ in a C header.
Spotted by:	Davi Arnaut
2010-09-27 20:08:12 +03:00
Davi Arnaut
657f07151a Merge of mysql-5.1-bugteam into mysql-5.5-merge. 2010-09-24 19:19:30 -03:00
Davi Arnaut
d47e8991cb Bug#45288: pb2 returns a lot of compilation warnings on linux
Use UNINIT_VAR workaround instead of LINT_INIT. The former can
also be used to silence false-positives in non-debug builds as
it actually does not cause new code to be generated.
2010-09-24 19:13:51 -03:00
Jon Olav Hauglid
4ecf1d32ac Merge from mysql-5.5-bugfixing to mysql-5.5-runtime. 2010-09-24 08:46:43 +02:00
Sunny Bains
ae1f1a6798 This patch comes from Michael: See bug#56933. 2010-09-24 08:37:09 +10:00
Mark Leith
693f13463f Bug#56922 SHOW ENGINE INNODB STATUS truncation limit is too strict and not instrumented
rb://459 approved by Jimmuy / Inaam
2010-09-23 09:12:09 +01:00
Vasil Dimov
5af0e024ae (ut0rnd.ic:88) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:41:58 +03:00
Vasil Dimov
32e9abebd5 (trx0undo.c:1873) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:40:44 +03:00
Vasil Dimov
a5975d4304 (trx0undo.c:1075) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:40:13 +03:00
Vasil Dimov
862caf5d5c (trx0trx.c:1801) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:39:35 +03:00
Vasil Dimov
f5d1b4787a (trx0sys.c:252) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:37:53 +03:00
Vasil Dimov
53be9a8204 (trx0roll.c:746) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:36:08 +03:00
Vasil Dimov
c2fc573435 (trx0roll.c:747) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:35:13 +03:00
Vasil Dimov
19a4c1429f (trx0purge.c:1082) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:34:39 +03:00
Vasil Dimov
202cebad7c (trx0purge.c:674) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:33:38 +03:00
Vasil Dimov
0babdaf233 (trx0purge.c:316) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:32:35 +03:00
Vasil Dimov
78d7f7b19a (trx0purge.c:318) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:30:44 +03:00
Vasil Dimov
6f082344d5 (row0vers.c:74) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:17:20 +03:00
Vasil Dimov
7f1ffcfbb3 (row0umod.c:117) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:10:33 +03:00
Vasil Dimov
60cd54f3ec (row0purge.c:789) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:09:30 +03:00
Vasil Dimov
c07b437ffe (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
5f5bc71fcb (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
8fe3d04e6c (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
1bcb1d2da3 (que0que.c:1286) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:01:14 +03:00
Vasil Dimov
16215b6c1d (os0file.c:1485) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:00:28 +03:00
Vasil Dimov
4883683668 (os0file.c:1486) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:57:36 +03:00
Vasil Dimov
fb1338558d (log0recv.c:2905) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:55:54 +03:00
Vasil Dimov
07427cd8fb (log0recv.c:1660) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:53:07 +03:00
Vasil Dimov
e2b4074d82 (log0recv.c:572) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:51:51 +03:00
Vasil Dimov
4cce243414 (ibuf0ibuf.c:1300) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:51:11 +03:00
Vasil Dimov
d9d20d93c6 Remove redundant variable 2010-09-20 18:48:38 +03:00
Vasil Dimov
10ec98ca0e (eval0eval.c:388) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:47:51 +03:00
Vasil Dimov
72a65da579 (dict0dict.c:4458) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:47:15 +03:00
Vasil Dimov
977d0e0524 (dict0crea.c:630) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:46:24 +03:00
Vasil Dimov
2460ca43d9 (buf0flu.c:136) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:45:40 +03:00
Vasil Dimov
31d79a481e (btr0sea.c:1510) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:43:15 +03:00
Vasil Dimov
63072c7324 (btr0pcur.c:455) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:42:13 +03:00
Vasil Dimov
38c61d65a4 (btr0cur.c:4559) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 18:38:43 +03:00