Commit graph

60583 commits

Author SHA1 Message Date
Sergey Glukhov
b6685d35dc compilation failure fix 2010-01-15 17:03:51 +04:00
Jon Olav Hauglid
2a340691ff Bug #43685 Lock table affects other non-related tables
The problem was that FLUSH TABLE <table_list> would block, 
waiting for all tables with old versions to be removed from 
the table definition cache, rather than waiting for only 
the tables in <table_list>. This could happen if FLUSH TABLE
was used in combination with LOCK TABLES.

With the new MDL code, this problem is no longer repeatable.
Regression test case added to lock.test. This commit contains
no code changes.
2010-01-15 12:47:22 +01:00
Sergey Glukhov
5a4a98af14 backported:
-WL#2822 INFORMATION_SCHEMA.ROUTINES: Add missing columns
-WL#2003 INFORMATION_SCHEMA: PARAMETERS view
-addon for 'I_S optimization' WL
2010-01-15 15:42:15 +04:00
Alexey Kopytov
0a5b406fc5 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
unknown
85c1e30375 Raise version number after cloning 5.0.90 2010-01-15 10:35:35 +01:00
Georgi Kodinov
0305aea88a merge 2010-01-15 11:06:46 +02:00
Georgi Kodinov
a07ca23755 merge of version change.
Added not_embedded to the new dbug_sync test file.
2010-01-15 10:51:39 +02:00
unknown
5d27920514 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
b41937105a Automerge the 5.5.1-m2 release back into the main branch. 2010-01-15 01:10:40 +01:00
MySQL Build Team
10824d2ec1 Automerge main branch with Trondheim copy. 2010-01-15 00:59:11 +01:00
Alfranio Correia
3f1899e858 Removed garbage from the mysqld--help-win 2010-01-14 16:50:45 +00:00
Alfranio Correia
dd5d5d32fc merge mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge 2010-01-14 16:44:33 +00:00
Alfranio Correia
b4c0c1550c 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
32aa612819 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
Jon Olav Hauglid
ad6adb1398 Partial backport of:
revno: 2762 [merge]
committer: Matthias Leich <mleich@mysql.com>
branch nick: mysql-6.0-bugteam-push
timestamp: Wed 2008-08-13 22:05:34 +0200
message:
  Upmerge 5.1 -> 6.0
    ------------------------------------------------------------
    revno: 2497.374.2
    committer: Matthias Leich <mleich@mysql.com>
    branch nick: mysql-5.1-bugteam-push
    timestamp: Wed 2008-08-13 21:44:54 +0200
    message:
      Fix for Bug#37853
          Test "funcs_1.processlist_val_ps" fails in various ways
      + corrections of logic in poll routines
      + minor improvements
2010-01-14 14:03:24 +01:00
Alfranio Correia
1b09e10508 merge mysql-5.1-rep+3 --> mysql-5.1-rep+2-delivery1 2010-01-14 12:59:58 +00:00
Alfranio Correia
eef6ea03d2 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
Olav Sandstaa
ec680f0a2b Fix for Bug#50221 Server refuses to start from non-default installdir on Solaris 32-bit
When starting mysqld it did not recognize most of the options given on
the command line when it was compiled for 32-bit Solaris using Sun
Studio compiler. The cause for this was that most of the entries in
the my_long_options array contained "garbage" data. The garbage data
was caused by a compiler bug. When initilizing the def_value member
for the "default-storage-engine" entry it was initialized like this:

  (longlong)"MyISAM"

i.e. casting a 32 bit pointer to a 64 bit integer value. Due to the
compiler bug only 4 bytes was allocated (instead of 8 bytes). This
caused everything following this entry to be stored at a location that
was 4 byte wrong.

The fix/work-around for this problem is initialize the def_value
for default-storage-engine in my_long_options to 0 and instead
initialize the default_storage_engine variable to "MyISAM" in
init_common_variables().

sql/mysqld.cc:
  Due to a bug in Sun Studio compiler when generating 32 bit code the 
  initialization of the def_value member of the default-storage-engine entry 
  in my_long_options only got 4 bytes allocated instead of 8 bytes. 
  The compiler bug was triggered by casting a 32 bit pointer to a 64 bit 
  integer value in the initialization code for my_long_options. To avoid 
  triggering the compiler bug the intialization of the def_value in
  my_long_options is set to 0 and instead the default_storage_engine
  is initialized to "MyISAM" in init_common_variables().
2010-01-14 13:39:42 +01:00
Alexander Barkov
8dfc3fbbab WL#4583 Case conversion in Asian character sets
modified:
  include/m_ctype.h
  - Changing type for tolower/toupper members, to store values >= 0xFFFF.
  - Adding function prototypes

  mysql-test/r/ctype_big5.result
  mysql-test/r/ctype_cp932_binlog_stm.result
  mysql-test/r/ctype_eucjpms.result*
  mysql-test/r/ctype_euckr.result
  mysql-test/r/ctype_gb2312.result
  mysql-test/r/ctype_gbk.result
  mysql-test/r/ctype_sjis.result
  mysql-test/r/ctype_ujis.result
  mysql-test/t/ctype_big5.test
  mysql-test/t/ctype_cp932_binlog_stm.test
  mysql-test/t/ctype_eucjpms.test
  mysql-test/t/ctype_euckr.test
  mysql-test/t/ctype_gb2312.test
  mysql-test/t/ctype_gbk.test
  mysql-test/t/ctype_sjis.test
  mysql-test/t/ctype_ujis.test
  -  Adding tests

  strings/ctype-big5.c
  strings/ctype-cp932.c
  strings/ctype-euc_kr.c
  strings/ctype-eucjpms.c
  strings/ctype-gb2312.c
  strings/ctype-gbk.c
  strings/ctype-sjis.c
  - Adding upper/lower case conversion data

  strings/ctype-mb.c
  - Adding handling of upper/lower conversion for multi-byte characters.

  strings/ctype-ujis.c
  - Implementing shared upper/lower conversion
    functions  for ujis and eucjpms
  - Adding upper/lower case conversion data for ujis
2010-01-14 15:17:57 +04:00
Luis Soares
5ae7b3c996 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
ebc009c9b3 BUG#50018: automerge from 5.1-bt local --> 5.1-bt local latest. 2010-01-14 10:47:23 +00:00
Alexander Nozdrin
9b05972226 Auto-merge from mysql-next-mr. 2010-01-14 12:39:57 +03:00
Alexander Nozdrin
a6165accb3 Auto-merge from mysql-next-mr. 2010-01-14 12:00:08 +03:00
Georgi Kodinov
7ecd6c6d02 version change 2010-01-14 10:24:02 +02:00
Luis Soares
18a8f3c8cc Disabled binlog_unsafe due to BUG#50312. 2010-01-13 23:27:22 +00:00
Kristofer Pettersson
a0fe99a859 automerge 2010-01-13 15:01:49 +01:00
Alfranio Correia
85df1ce4b4 merge mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge 2010-01-13 13:27:25 +00:00
Mats Kindahl
9b4470ecd4 Merging with mysql-5.1-rep+2-delivery1 2010-01-13 14:00:48 +01:00
Mats Kindahl
cf40bc3f56 Replacing error variable that was lost. 2010-01-13 13:59:58 +01:00
Mats Kindahl
4abdd9f14a Merging with mysql-5.1-rep+2-delivery1 2010-01-13 13:37:01 +01:00
Alfranio Correia
40949a3110 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
a561e53943 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
b3dd4d9486 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.

 

sql/sql_acl.cc:
  * Make sure that there is an error to print before attempting to do so.
  * Minor style change: change 1 to TRUE for clarity.
sql/sql_parse.cc:
  * Always fail reload_acl_and_cache() if the query was killed.
sql/sql_servers.cc:
  * Make sure that there is an error to print before attempting to do so.
2010-01-13 12:39:00 +01:00
Martin Hansson
34e5c6750d Merge of fix for Bug#48157. 2010-01-13 12:38:06 +01:00
Ramil Kalimullin
200f083c2d Auto-merge. 2010-01-13 15:08:48 +04:00
Ramil Kalimullin
08dfd4ad0c Auto-merge. 2010-01-13 15:04:59 +04:00
Georgi Kodinov
90274e3709 merge 2010-01-13 12:47:42 +02:00
Georgi Kodinov
c4ec2de724 version change 2010-01-13 12:43:07 +02:00
Joerg Bruehe
1b2826e7b1 Automerge from parent - no conflicts. 2010-01-13 11:36:48 +01:00
Georgi Kodinov
6e72f4171f merge 5.1-main to 5.1-bugteam 2010-01-13 12:28:42 +02:00
Ramil Kalimullin
7fe315483c Auto-merge. 2010-01-13 14:11:42 +04:00
Sven Sandberg
4dc7be62a9 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.


mysql-test/extra/rpl_tests/rpl_row_func003.test:
  updated test case to ignore new warnings
mysql-test/suite/binlog/r/binlog_unsafe.result:
  updated result file
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Added test for RAND().
  Also clarified some old comments.
mysql-test/suite/rpl/r/rpl_misc_functions.result:
  updated result file
mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result:
  updated test case to ignore new warnings
mysql-test/suite/rpl/r/rpl_optimize.result:
  updated result file
mysql-test/suite/rpl/r/rpl_row_func003.result:
  updated result file
mysql-test/suite/rpl/t/rpl_misc_functions.test:
  updated test case to ignore new warnings
mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test:
  updated test case to ignore new warnings
mysql-test/suite/rpl/t/rpl_optimize.test:
  updated test case to ignore new warnings
mysql-test/suite/rpl/t/rpl_trigger.test:
  updated test case to ignore new warnings
mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result:
  updated result file
sql/item_create.cc:
  Mark RAND() unsafe.
2010-01-13 10:00:03 +01:00
Luis Soares
26b12adb5d 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
495810cd1f 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).


extra/yassl/taocrypt/include/asn.hpp:
  Fix for bug#50227: Pre-auth buffer-overflow in mySQL through yaSSL
    - CertDecoder::AddTag() introduced.
extra/yassl/taocrypt/src/asn.cpp:
  Fix for bug#50227: Pre-auth buffer-overflow in mySQL through yaSSL
    - copying data from incoming stream to the issuer_ or subject_
  buffers ensure we don't overrun them.
    - code cleanup.
2010-01-13 09:20:45 +04:00
Gleb Shchepa
71fd38e488 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.


mysql-test/r/func_concat.result:
  Added test case for bug #50096.
mysql-test/t/func_concat.test:
  Added test case for bug #50096.
sql/item_strfunc.cc:
  Bug #50096: CONCAT_WS inside procedure returning wrong data
  
  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
5f42365a93 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
9d89069d64 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
253d7f2501 Merge mysql-next-mr (revno 2958) --> mysql-next-mr-marc 2010-01-12 10:58:38 -07:00
Luis Soares
ca15e2779f 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
50561ab010 Enable WL#4435. 2010-01-12 19:48:28 +03:00