Commit graph

60246 commits

Author SHA1 Message Date
Alexander Nozdrin
eacc937d48 Manual merge from mysql-trunk-merge.
Conflicts:
  - configure.in
  - include/m_string.h
  - mysql-test/extra/rpl_tests/rpl_row_func003.test
  - mysql-test/r/mysqlbinlog.result
  - mysql-test/r/union.result
  - mysql-test/suite/binlog/r/binlog_killed_simulate.result
  - mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
  - mysql-test/suite/binlog/r/binlog_unsafe.result
  - mysql-test/suite/binlog/t/binlog_unsafe.test
  - mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
  - mysql-test/suite/rpl/r/rpl_loaddata_map.result
  - mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
  - mysql-test/suite/rpl/r/rpl_stm_log.result
  - mysql-test/suite/rpl/t/rpl_optimize.test
  - mysql-test/t/mysqlbinlog.test
  - mysql-test/t/union.test
  - sql/rpl_utility.h
  - sql/sql_union.cc
  - strings/Makefile.am
2010-01-19 19:36:14 +03:00
Alexander Nozdrin
dedfdb490b Manual merge from mysql-next-mr.
Conflicts:
  - sql/sql_plugin.cc
2010-01-18 23:19:19 +03:00
Alexander Nozdrin
8a433bc4dc Manual merge from mysql-trunk.
Conflicts:
  - support-files/mysql.spec.sh
2010-01-18 23:15:17 +03:00
Alexander Nozdrin
dccf2accea Enable sys_vars and perfschema test suites
for regular PB builds.
2010-01-18 15:01:11 +03:00
Alexander Nozdrin
69bb73aa38 Auto-merge from mysql-5.1-rpl-merge. 2010-01-18 14:53:35 +03:00
Alexey Kopytov
82ba3e1dbc Manual merge from mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in .bzr-mysql/default.conf
Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result
Text conflict in mysql-test/t/mysqlbinlog.test
Text conflict in sql/sql_acl.cc
Text conflict in sql/sql_servers.cc
Text conflict in sql/sql_update.cc
Text conflict in support-files/mysql.spec.sh
2010-01-15 14:26:53 +03:00
Georgi Kodinov
6d66e66030 merge 2010-01-15 11:06:46 +02:00
Georgi Kodinov
30a8c53a9c merge of version change.
Added not_embedded to the new dbug_sync test file.
2010-01-15 10:51:39 +02:00
fe99d91593 Fix for perfschema.binlog_stmt failure:
Problem: The test case failed because: (i) warning text in 
         result file differed from the warning output by the 
         server, and (ii) binlog contents in result file did
         not show the statements logged wrapped in BEGIN/COMMIT
         as it is the case after WL 2687.
      
Solution: We update the result file, but first we change the
          unsafe warning text to also refer to performance_schema
          table(s). This required changing the result files for
          existing test cases that provide output for warnings 
          related to ER_BINLOG_UNSAFE_SYSTEM_TABLE. "Grepping" in
          result files, shows that only binlog_unsafe contained
          reference to such a warning.
      
          We also update the result file with the missing 
          BEGIN/COMMIT statements.
2010-01-15 13:06:33 +08:00
MySQL Build Team
00c1e8076f Automerge the 5.5.1-m2 release back into the main branch. 2010-01-15 01:10:40 +01:00
MySQL Build Team
5b16bedaf5 Automerge main branch with Trondheim copy. 2010-01-15 00:59:11 +01:00
Alfranio Correia
09bc4891e8 Removed garbage from the mysqld--help-win 2010-01-14 16:50:45 +00:00
Alfranio Correia
20fd7e5972 merge mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge 2010-01-14 16:44:33 +00:00
Alfranio Correia
fb0ee3ab8e merge mysql-next-mr --> mysql-5.1-rpl-merge
Conflicts:
  Text conflict in sql/sql_insert.cc
2010-01-14 16:02:55 +00:00
Luis Soares
a0a5152fb3 Fix for BUG#49481 and BUG#49482.
BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete: 
cant find record
      
BUG#49482: RBR: Replication may break on deletes when MyISAM tables + 
char field are used

When using MyISAM tables, despite the fact that the null bit is
set for some fields, their old value is still in the row. This
can cause the comparison of records to fail when the slave is
doing an index or range scan.

We fix this by avoiding memcmp for MyISAM tables when comparing
records. Additionally, when comparing field by field, we first
check if both fields are not null and if so, then we compare
them. If just one field is null we return failure immediately. If
both fields are null, we move on to the next field.
2010-01-14 14:26:51 +00:00
Alfranio Correia
aefaa56c5a merge mysql-5.1-rep+3 --> mysql-5.1-rep+2-delivery1 2010-01-14 12:59:58 +00:00
Alfranio Correia
9b0ae85aea Augmented the rpl_ndb_binlog_format_errors to verify if a slave running in the
STMT mode aborts the SQL Thread if it receives changes in ROW mode and such
changes are not processed.
2010-01-14 12:52:28 +00:00
Luis Soares
c374c2bd2f BUG#50018: binlog corruption when table has many columns
Small fix in the test case. Changed the UNLOCK tables 
to happen after each insert.
2010-01-14 10:49:40 +00:00
Luis Soares
36a4772e2d BUG#50018: automerge from 5.1-bt local --> 5.1-bt local latest. 2010-01-14 10:47:23 +00:00
Alexander Nozdrin
9c820e637e Auto-merge from mysql-next-mr. 2010-01-14 12:00:08 +03:00
Georgi Kodinov
c00701a48c version change 2010-01-14 10:24:02 +02:00
Luis Soares
0f90f1dee7 Disabled binlog_unsafe due to BUG#50312. 2010-01-13 23:27:22 +00:00
Kristofer Pettersson
48db75d8ad automerge 2010-01-13 15:01:49 +01:00
Alfranio Correia
a1aa459458 merge mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge 2010-01-13 13:27:25 +00:00
Mats Kindahl
6a7e3ca55e Merging with mysql-5.1-rep+2-delivery1 2010-01-13 14:00:48 +01:00
Mats Kindahl
f8c074e1ba Replacing error variable that was lost. 2010-01-13 13:59:58 +01:00
Mats Kindahl
86291b043b Merging with mysql-5.1-rep+2-delivery1 2010-01-13 13:37:01 +01:00
Alfranio Correia
46d1689b7c merge mysql-next-mr --> mysql-5.1-rpl-merge
Conflicts:
  Text conflict in sql/log.cc
  Text conflict in sql/slave.cc
  Text conflict in sql/sql_base.cc
2010-01-13 12:22:34 +00:00
Mats Kindahl
a3c4467515 WL#5151: Conversion between different types when
replicating

Replace c_ptr() calls with c_ptr_safe() calls to
avoid valgrind warnings.

Adding code to to handle the case that no metadata
was present in the table map for the column.

Allow first parameter to unpack_row() to be NULL,
in which case no source tables is used and hence
no checks nor conversions are done.

Clarifying some comments and fixing documentation
for unpack_row().
2010-01-13 12:58:42 +01:00
Kristofer Pettersson
da877f64fe Bug#33982 debug assertion and crash reloading grant tables after sighup or kill
In certain rare cases when a process was interrupted
during a FLUSH PRIVILEGES operation the diagnostic
area would be set to an error state but the function
responsible for the operation would still signal
success. This would lead to a debug assertion error
later on when the server would attempt to reset the
DA before sending the error message.

This patch fixes the issue by assuring that
reload_acl_and_cache() always fails if an error
condition is raised.

The second issue was that a KILL could cause
a console error message which referred to a DA
state without first making sure that such a
state existed.

This patch fixes this issue in two different
palces by first checking DA state before
fetching the error message.
2010-01-13 12:39:00 +01:00
Martin Hansson
b9d37b83a6 Merge of fix for Bug#48157. 2010-01-13 12:38:06 +01:00
Ramil Kalimullin
18be529bb5 Auto-merge. 2010-01-13 15:08:48 +04:00
Ramil Kalimullin
032822a62e Auto-merge. 2010-01-13 15:04:59 +04:00
Georgi Kodinov
748ff84ef3 merge 2010-01-13 12:47:42 +02:00
Georgi Kodinov
b433f7f23a version change 2010-01-13 12:43:07 +02:00
Joerg Bruehe
1e5d0f08b5 Automerge from parent - no conflicts. 2010-01-13 11:36:48 +01:00
Georgi Kodinov
c3ba50ade1 merge 5.1-main to 5.1-bugteam 2010-01-13 12:28:42 +02:00
Ramil Kalimullin
14afe5c4ce Auto-merge. 2010-01-13 14:11:42 +04:00
Sven Sandberg
94946c6807 BUG#49222: Mark RAND() as unsafe
Problem: When RAND() is binlogged in statement mode, the seed is
binlogged too, so the replication slave generates the same
sequence of random numbers. This makes replication work in many
cases, but not in all cases: the order of rows is not guaranteed
for, e.g., UPDATE or INSERT...SELECT statements, so the row data
will be different if master and slave retrieve the rows in
different orders.
Fix: Mark RAND() as unsafe. It will generate a warning if
binlog_format=STATEMENT and switch to row-logging if
binlog_format=ROW.
2010-01-13 10:00:03 +01:00
Luis Soares
231773b449 Makes slave_type_conversions_basic to be skipped in embedded
run in PB2 as it ought to be. Otherwise test will fail because
variable is no recognized:

1193: Unknown system variable 'slave_type_conversions'
2010-01-13 08:29:23 +00:00
Ramil Kalimullin
5622b586d9 Fix for bug#50227: Pre-auth buffer-overflow in mySQL through yaSSL
Problem: copying issuer's (or subject's) name tags into an internal
buffer from incoming stream we didn't check the buffer overflow. 
That may lead to memory overrun, crash etc.

Fix: ensure we don't overrun the buffer.

Note: there's no simple test case (exploit needed).
2010-01-13 09:20:45 +04:00
Gleb Shchepa
30212033ed Bug #50096: CONCAT_WS inside procedure returning wrong data
Selecting of the CONCAT_WS(...<PS parameter>...) result into
a user variable may return wrong data.

Item_func_concat_ws::val_str contains a number of memory
allocation-saving optimization tricks. After the fix
for bug 46815 the control flow has been changed to a
branch that is commented as "This is quite uncommon!":
one of places where we are trying to concatenate
strings inplace. However, that "uncommon" place
didn't care about PS parameters, that have another
trick in Item_sp_variable::val_str(): they use the
intermediate Item_sp_variable::str_value field,
where they may store a reference to an external
argument's buffer.

The Item_func_concat_ws::val_str function has been
modified to take into account val_str functions
(such as Item_sp_variable::val_str) that return a
pointer to an internal Item member variable that
may reference to a buffer provided.
2010-01-13 08:16:36 +04:00
Luis Soares
980695e7a4 Fixes two remaining test failures:
- mysqld--help-win
    Updated result so that it contains missing
    value for slave-type-conversions

  - rpl_idempotency
    This seems a bad merge. In BUG#39934, the contents of
    this file had been split into rpl_row_idempontency and
    rpl_idempotency. The patch was pushed to 5.1-rep+3 which
    was later merged in rep+2-delivery1 which in turn was
    merged in 5.1-rpl-merge. Now while merging next-mr in
    5.1-rpl-merge, the file got back it's old content (which
    is in rpl_row_idempotency now because of BUG#39934). This
    cset reverts the bad merge:

    bzr merge -r revid:dao-gang.qu@sun.com-20100112120709-ioxp11yl9bvquaqd..\
    before:revid:dao-gang.qu@sun.com-20100112120709-ioxp11yl9bvquaqd\
    suite/rpl/t/rpl_idempotency.test
2010-01-13 00:23:07 +00:00
Luis Soares
88a9362d48 Fixes one more failure in gcov run:
- sys_vars.rpl_init_slave_func
    Added suppression for the unsafe warning.
2010-01-12 23:22:34 +00:00
Marc Alff
bed80b9c82 Merge mysql-next-mr (revno 2958) --> mysql-next-mr-marc 2010-01-12 10:58:38 -07:00
Luis Soares
c88f938bb8 Fixes for three test failures:
- sys_vars.all_vars:
   Added test case for slave_type_conversions variable
 - rpl_row_idempotency
   Removed ER_SLAVE_AMBIGOUS_EXEC_MODE (which was removed by WL 4738)
   from the test case. Using ER_WRONG_VALUE_FOR_VAR instead.
 - mysqld--help-win
   Added missing help for --slave-type-conversions from the
   result file.
2010-01-12 17:52:02 +00:00
Alexander Nozdrin
e64d6d5a7d Enable WL#4435. 2010-01-12 19:48:28 +03:00
Alexander Nozdrin
357496c091 Auto-merge from mysql-next-mr-bugfixing. 2010-01-12 19:21:42 +03:00
Martin Hansson
e57ea46d5a Bug#48157: crash in Item_field::used_tables
MySQL handles the join syntax "JOIN ... USING( field1,
... )" and natural joins by building the same parse tree as
a corresponding join with an "ON t1.field1 = t2.field1 ..."
expression would produce. This parse tree was not cleaned up
properly in the following scenario. If a thread tries to
lock some tables and finds that the tables were dropped and
re-created while waiting for the lock, it cleans up column
references in the statement by means a per-statement free
list. But if the statement was part of a stored procedure,
column references on the stored procedure's free list weren't
cleaned up and thus contained pointers to freed objects.

Fixed by adding a call to clean up the current prepared
statement's free list.
2010-01-12 15:16:26 +01:00
efe8358d83 Auto merge. 2010-01-12 20:13:45 +08:00