Commit graph

65411 commits

Author SHA1 Message Date
Magnus Blåudd
f142f5bf53 Merge trunk-bug53983 -> trunk-bugfixing 2010-06-02 11:03:26 +02:00
Magnus Blåudd
3b1cc6e357 Bug#53983 Placeholder for MASTER_BIND in master.info
- Reserve line 17 in master.info for master_bind which has been
   added in MySQL Cluster 6.3
 - move the line for "list of server id for ignorable servers" to line 18
2010-06-02 10:11:49 +02:00
Alfranio Correia
02fc237a2c BUG#50479 DDL stmt on row-only/stmt-only tables generate spurious binlog_format
errors
            
In the fix of BUG#39934 in 5.1-rep+3, errors are generated when
binlog_format=row and a statement modifies a table restricted to
statement-logging (ER_BINLOG_ROW_MODE_AND_STMT_ENGINE); or if
binlog_format=statement and a statement modifies a table restricted to
row-logging (ER_BINLOG_STMT_MODE_AND_ROW_ENGINE).
            
However, some DDL statements that lock tables (e.g. ALTER TABLE,
CREATE INDEX and CREATE TRIGGER) were causing spurious errors,
although no row might be inserted into the binary log.
            
To fix the problem, we tagged statements that may generate
rows into the binary log and thence the warning messages are
only printed out when the appropriate conditions hold and rows
might be changed.
2010-06-02 00:25:08 +01:00
Alfranio Correia
4ede1aa231 auto-merge mysql-trunk-bugfixing (local) --> mysql-trunk-bugfixing 2010-06-01 20:49:58 +01:00
Alfranio Correia
627e829e25 Post-merge fix for BUG#53421. 2010-06-01 20:34:40 +01:00
Alfranio Correia
678f515c50 auto-merge mysql-trunk-bugfixing (local) --> mysql-trunk-bugfixing.merge 2010-06-01 15:40:54 +01:00
Alfranio Correia
76fafacebc BUG#53421 Part of transaction not written in binlog after deadlock, replication
breaks
      
When a "CREATE TEMPORARY TABLE SELECT * FROM" was executed the OPTION_KEEP_LOG was
not set into the thd->variables.option_bits. For that reason, if the transaction
had updated only transactional engines and was rolled back at the end (.e.g due to
a deadlock) the changes were not written to the binary log, including the creation
of the temporary table.
      
To fix the problem, we have set the OPTION_KEEP_LOG into the
thd->variables.option_bits when a "CREATE TEMPORARY TABLE
SELECT * FROM" is executed.
2010-06-01 15:39:07 +01:00
Alfranio Correia
8f5165906a auto-merge mysql-trunk-bugfixing (local) --> mysql-trunk-bugfixing.merge 2010-06-01 14:49:31 +01:00
Alexander Nozdrin
9ab22b4e2b Auto-merge from mysql-trunk-innodb. 2010-06-01 16:40:34 +04:00
Alexander Nozdrin
522d9ac30f Auto-merge from mysql-trunk-bugfixing.
Due to a BZR bug, that merge was done by the following command:
bzr merge -r 'revid:tor.didriksen@sun.com-20100527074248-6qtv0p1ugy6o1hjo..' <mysql-trunk-bugfixing path>
2010-06-01 16:38:01 +04:00
Marko Mäkelä
ce461570ef Merge a change from mysql-5.1-innodb:
------------------------------------------------------------
  revno: 3490
  revision-id: marko.makela@oracle.com-20100601120751-1uq7bbta5n7ts0qr
  parent: marko.makela@oracle.com-20100601120521-q48hk05ne4j1s2o0
  committer: Marko Mäkelä <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Tue 2010-06-01 15:07:51 +0300
  message:
    Minor cleanup.

    lock_rec_unlock(): Cache first_lock and rewrite while() loops as for().

    btr_cur_optimistic_update(): Use common error handling return.

    row_create_prebuilt(): Add Valgrind instrumentation.
2010-06-01 15:09:33 +03:00
Marko Mäkelä
514144276f Merge a change from mysql-5.1-innodb:
------------------------------------------------------------
  revno: 3488
  revision-id: marko.makela@oracle.com-20100601103738-upm8awahesmeh9dr
  parent: vasil.dimov@oracle.com-20100531163540-9fu3prbn2asqwdi5
  committer: Marko Mäkelä <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Tue 2010-06-01 13:37:38 +0300
  message:
    Bug#53812: assert row/row0umod.c line 660 in txn rollback after crash recovery
    row_undo_mod_upd_exist_sec(): Tolerate a failure to build the index entry
    for a DYNAMIC or COMPRESSED table during crash recovery.
2010-06-01 15:05:01 +03:00
Marko Mäkelä
ea53f9af45 Merge from mysql-5.1-innodb:
------------------------------------------------------------
  revno: 3478.1.3
  revision-id: marko.makela@oracle.com-20100525123748-pmpehbg29oyhc1ns
  parent: marko.makela@oracle.com-20100524114349-5kaw52sz0yh4szkb
  committer: Marko Mäkelä <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Tue 2010-05-25 15:37:48 +0300
  message:
    Suppress bogus Valgrind warnings about buf_buddy_relocate()
    accessing uninitialized memory in Valgrind-instrumented builds.
2010-06-01 14:56:22 +03:00
Marko Mäkelä
2b47efb6e4 Merge from mysql-5.1-innodb:
------------------------------------------------------------
  revno: 3478.1.4
  revision-id: marko.makela@oracle.com-20100525125352-hgafpmqhrrj7pv5i
  parent: marko.makela@oracle.com-20100525123748-pmpehbg29oyhc1ns
  committer: Marko Mäkelä <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Tue 2010-05-25 15:53:52 +0300
  message:
    row_search_for_mysql(): Add assertions to track down Bug #53627.
2010-06-01 14:40:15 +03:00
Jonathan Perkin
6962ef4db9 Merge 2010-06-01 10:33:01 +01:00
Jonathan Perkin
4eb6de1ce0 Add SELinux checks from distribution-specific spec file, missed in
previous.

Convert some shell bits to standard 2-space indent, 80 columns, etc.
2010-06-01 10:24:38 +01:00
He Zhenxing
bf8b7a2306 Auto merge from trunk 2010-06-01 17:03:55 +08:00
He Zhenxing
1bcba61847 BUG#52748 Semi-Sync ACK packet isn't check for length
Check the length and use strncpy to make the code safer.
2010-06-01 16:59:48 +08:00
He Zhenxing
5725d2303e BUG#52748 Semi-Sync ACK packet isn't check for length
Check the length and use strncpy to make the code safer.
2010-06-01 16:54:52 +08:00
Alexander Nozdrin
eb51ac8b18 Patch for Bug#54123 (Build failure on HPUX). 2010-06-01 07:54:15 +04:00
Vasil Dimov
04dfc8c8d2 Fix Bug #53947 InnoDB: Assertion failure in thread 4224 in file .\sync\sync0sync.c line 324
Destroy the rw-lock object before freeing the memory it is occupying.
If we do not do this, then the mutex that is contained in the rw-lock
object btr_search_latch_temp->mutex gets "freed" and subsequently
mutex_free() from sync_close() hits a mutex whose memory has been
freed and crashes.

Approved by:	Heikki (via IRC)
Discussed with:	Calvin
2010-05-31 18:23:41 +03:00
Alexander Nozdrin
893dced429 Backport of
- revid:sp1r-svoj@mysql.com/june.mysql.com-20080324111246-00461
  - revid:sp1r-svoj@mysql.com/june.mysql.com-20080414125521-40866

  BUG#35274 - merge table doesn't need any base tables, gives
              error 124 when key accessed

  SELECT queries that use index against a merge table with empty
  underlying tables list may return with error "Got error 124 from
  storage engine".

  The problem was that wrong error being returned.
2010-05-31 17:38:02 +04:00
Alexey Botchkov
ec4033b506 test added for the bug #45052 2010-05-31 18:33:38 +05:00
Gleb Shchepa
3ca98f7669 Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BY
when it should use index

Sometimes the LEFT/RIGHT JOIN with an empty table caused an
unnecessary filesort.

Sample query, where t1.i1 is indexed and t3 is empty:

  SELECT t1.*, t2.* FROM t1 JOIN t2 ON t1.i1 = t2.i2
                       LEFT JOIN t3 ON t2.i2 = t3.i3
    ORDER BY t1.i1 LIMIT 5;

The server erroneously used an item of empty outer-joined
table as a common constant of a Item_equal (multi-equivalence
expression).
By the fix for the bug 16590 the constant status of such
an item has been propagated to st_table::const_key_parts
map bits related to other Item_equal argument-related
key parts (those are obviously not constant in our case).
As far as test_if_skip_sort_order function skips constant
prefixes of testing keys, this caused an ignorance of
available indices, since some prefixes were marked as
constant by mistake.
2010-05-31 16:52:19 +04:00
Davi Arnaut
5c72bee9d4 Post-merge fix: rename filename in shared make file. 2010-05-31 09:27:10 -03:00
Tor Didriksen
a612981422 Bug #49829 Many "hides virtual function" warnings with SunStudio
Backport from mysql-pe (of those parts which have not been upmerged from 5.1)
2010-05-31 12:59:58 +02:00
Vasil Dimov
ae3c6a75c4 Fix coding style 2010-05-31 13:59:23 +03:00
Sergey Glukhov
f75f58007e test case fix 2010-05-31 12:38:45 +04:00
Davi Arnaut
aa28461510 Backport: remove dead code.
Reorganize function to reflect that it does not actually uses curses
and that there is no curses variant.
2010-05-28 19:53:26 -03:00
Davi Arnaut
570c6cc87a Backport: Remove unused and ancient files, functions, and facilities. 2010-05-28 19:13:31 -03:00
Davi Arnaut
b2fda7cfa8 Remove build files which relied on the now defunct make-ccc files. 2010-05-28 18:17:02 -03:00
Davi Arnaut
25eb8e2c37 Backport: remove ancient and unused strings files. 2010-05-28 18:11:31 -03:00
Davi Arnaut
d60a0ce9be Backport a old cleanup patch.
Formatting cleanup: removing tabs and trailing spaces
to conform to MySQL Internals Coding Guidelines.
2010-05-28 18:00:18 -03:00
oystein.grovlen@sun.com
80fc19ade7 Bug#52168 decimal casting catastrophes: crashes and valgrind errors on simple casts
The problem is that if a NULL is stored in an Item_cache_decimal object,
the associated my_decimal object is not initialized.  However, it is still
accessed when val_int() is called. The fix is to check for null_value
within val_int(), and return without accessing the my_decimal object when
the cached value is NULL.

Bug#52122 reports the same issue for val_real(), and this patch also includes
fixes for val_real() and val_str() and corresponding test cases from that
bug report.  

Also, NULL is returned from val_decimal() when value is null. This will
avoid that callers access an uninitialized my_decimal object.

Made similar changes to all other Item_cache classes.  Now all val_*
methods should return a well defined value when actual value is NULL.
2010-05-28 17:30:39 +02:00
Vasil Dimov
f8179235f4 Merge mysql-trunk-innodb from bk-internal into my local tree 2010-05-28 17:16:46 +03:00
Jonathan Perkin
507621cec8 Differentiate between Oracle Enterprise Linux and Red Hat Enterprise Linux. 2010-05-28 13:56:57 +01:00
Jonathan Perkin
0ac4bc17cb Merge 2010-05-28 12:53:55 +01:00
Calvin Sun
5c11f02904 mysql-trunk-innodb: undo r3119 of disabling test cases.
r3119 does not prevent the crash even the test is disabled.
The crash occurs during shutdown.
2010-05-28 02:41:03 -05:00
Alexander Nozdrin
4e633ec234 Auto-merge from mysql-trunk. 2010-05-28 09:47:58 +04:00
Vasil Dimov
ef681d4205 Add two debug assertions and a comment to make it clear that
consecutive_ios[0] cannot be NULL when slot is assigned.
2010-05-27 20:30:08 +03:00
Joerg Bruehe
87dfc8ef1d Get rid of the "net retry count" difference which
is not needed any more with current versions of FreeBSD.
(Entries 52410 and 52412 in the Bug DB)

That change is based on Dan Nelson replying on the
FreeBSD mailing list, freebsd-questions@freebsd.org
in a thread running from 2010-Apr-29 to 2010-May-1 titled
     "Need info about FreeBSD and interrupted system
      calls for MySQL code"

Also, ensure the cmake settings correspond to the autotools
ones: Add "HAVE_BROKEN_REALPATH" to cmake.
2010-05-27 19:02:19 +02:00
Inaam Rana
8cd8a83a44 Fix the printout for long semaphore waits to not
list a thread doing a wait_ex as an s-lock waiter.
2010-05-27 12:53:39 -04:00
Sergey Glukhov
20bd61a6e1 Bug#52430 Incorrect key in the error message for duplicate key error involving BINARY type
For BINARY(N) strip trailing zeroes to make the error message nice-looking
2010-05-27 20:01:43 +04:00
Sergey Glukhov
6f55a81074 Bug#52856 concurrent show columns or show full columns causes a crash!!!1
We should avoid any SHARE fields assignments as
this is shared structure and assignments may
affect other therads. To avoid this
copy of SHARE struct is created and
stored into TABLE struct which is
used in get_schema_coulumns_record later.
2010-05-27 19:54:43 +04:00
Alfranio Correia
9fbf4b723d BUG#53437 @@session.sql_bin_log support in substatements is incorrect
The thd->variables.option_bits & OPTION_BIN_LOG is currently abused: 
it's both a system variable and an implementation switch. The current
approach to this option bit breaks the session variable encapsulation. 
      
Besides it is allowed to change @@session.sql_bin_log within a
transaction what may lead to not correctly logging a transaction.
      
To fix the problems,  we created a thd->variables variable to represent
the "sql_log_bin" and prohibited its update inside a transaction or
sub-statement.
2010-05-27 16:43:08 +01:00
Vasil Dimov
8dff6a64d2 Merge mysql-trunk-innodb from bk-internal into my local tree 2010-05-27 15:07:08 +03:00
Jonathan Perkin
7609b38454 Fix HP-UX localtime_r issue correctly, patch from mats. 2010-05-27 12:52:01 +01:00
Jimmy Yang
a51779c7c2 Fix an assertion failure with UNIV_DEBUG is set. Initialize a
dict_index_t structure to NULL in dict_load_index(), we could
enter SYS_INDEXES and got table id value comparision failure
for system tables such as SYS_TABLES. In addition, remove
dict_sys mutex assertion when fill I_S table, as we no longer
hold mutex accross the fill operation.

rb://367 approved by Marko.
2010-05-27 04:15:54 -07:00
Vasil Dimov
96c47c4df1 Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
(skipping the change to storage/innobase/os/os0file.c because
that issue has already been addressed in mysql-trunk-innodb)
2010-05-27 12:47:57 +03:00
Tor Didriksen
2857b55a46 Bug #53445 Build with -Wall and fix warnings that it generates
Post-push fix: -Wall implies -Wunused on some platforms,
which will generate thousands of warnings about unused parameters.
2010-05-27 09:42:48 +02:00