Commit graph

67214 commits

Author SHA1 Message Date
Vasil Dimov
0b29085cac Merge mysql-5.5-innodb -> mysql-5.5-bugteam 2010-10-11 18:22:22 +03:00
Luis Soares
2330a5e232 Automerged bzr bundle. 2010-10-11 16:02:32 +01:00
Luis Soares
f2dabc49e1 Fix for crash in mysqld --verbose --help while initializing option
for --init-rpl-role.

Problem: There are two variables involved in this issue,
rpl_status and rpl_role_type. The former is an array containing
the description of the possible values for the latter.

rpl_status is declared as an enumeration and is stored in a 4
bytes integer. On the other hand, my_getopt, reads enum values
into a ulong:

  *(ulong*)value= arg;

This is overwriting the memory used for rpl_role_type, 
corrupting the first entry in the array.

Fix: We fix this by re-declaring rpl_status as a ulong, so that it
has space to accommodate the value "parsed" in my_getopt .
2010-10-11 15:50:14 +01:00
Jimmy Yang
0062e693d7 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2010-10-11 05:56:44 -07:00
Jimmy Yang
f3a8c2be04 A more complete fix for bug #57345 btr_pcur_store_position abort for load
with concurrent lock/unlock tables

Approved by Marko
2010-10-11 05:36:13 -07:00
Vasil Dimov
c79a0142a3 Merge mysql-5.5-innodb -> mysql-5.5-bugteam 2010-10-11 12:55:23 +03:00
da6cd49bee Null merge
The bug happened only on 5.1
2010-10-11 11:23:51 +08:00
d7767d4ab6 Bug#56226 Table map set to 0 after altering MyISAM table
After ALTER TABLE which changed only table's metadata, row-based
binlog sometimes got corrupted since the tablemap was unexpectedly
set to 0 for subsequent updates to the same table.

ALTER TABLE which changed only table's metadata always reset
table_map_id for the table share to 0. Despite the fact that
0 is a valid value for table_map_id, this step caused problems
as it could have created situation in which we had more than
one table share with table_map_id equal 0. If more than one
table with table_map_id are 0 were updated in the same statement,
updates to these different tables were written into the same
rows event. This caused slave server to crash.

This bug happens only on 5.1. It doesn't affect 5.5+.

This patch solves this problem by ensuring that ALTER TABLE
statements which change metadata only never reset table_map_id
to 0. To do this it changes reopen_table() to correctly use
refreshed table_map_id value instead of using the old one/
resetting it.
2010-10-11 11:08:49 +08:00
36a2727e34 Postfix for BUG#55375
Removed option file and changed result file.
2010-10-11 10:49:00 +08:00
Sunny Bains
34b889e10f Bug# 56982 Assertion Failure from ha_innobase::innobase_peek_autoinc() when auto_inc > 0
Print an error message to stderr an get rid of the assertion.

Approved by: Jimmy Yang (over IM)
2010-10-11 11:26:49 +11:00
Alfranio Correia
fb89a79e11 null-merge mysql-5.1-bugteam --> mysql-5.5-bugteam 2010-10-10 20:24:51 +01:00
Alfranio Correia
d0435b5267 merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2010-10-10 20:13:25 +01:00
a667ce8e27 Manual merge 2010-10-09 18:18:16 +08:00
b66825912a Bug#55375 Transaction bigger than max_binlog_cache_size crashes slave
When slave executes a transaction bigger than slave's max_binlog_cache_size,
slave will crash. It is caused by the assert that server should only roll back
the statement but not the whole transaction if the error ER_TRANS_CACHE_FULL 
happens. But slave sql thread always rollbacks the whole transaction when
an error happens.
            
Ather this patch, we always clear any error set in sql thread(it is different
from the error in 'SHOW SLAVE STATUS') and it is cleared before rolling back
the transaction.
2010-10-09 15:05:43 +08:00
Davi Arnaut
31e1b12eb0 Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix assorted compiler warnings.
2010-10-08 11:52:39 -03:00
Alexander Barkov
c57244fb17 The fix for
Bug#55744 GROUP_CONCAT + CASE + ucs return garbage
revealed problems in how character set aggregation
code works with prepared statements.

This patch fixes (hopefully) the problems.
2010-10-08 18:06:31 +04:00
Davi Arnaut
243003f12d Bug#42733: Type-punning warnings when compiling MySQL -- strict aliasing violations.
Due to the extent of aliasing violations in the MySQL source
code, at this time it is safer to disable strict aliasing related
optimizations in release builds.

As of this patch, only GCC enables strict aliasing by default.
Hence, use the -fno-strict-aliasing option to disable the
aliasing rules.
2010-10-08 10:30:58 -03:00
Mats Kindahl
16182cd791 Merging with mysql-5.5-bugteam. 2010-10-08 14:46:18 +02:00
Mats Kindahl
fa4a4b7a64 WL#5363: Thread Pool Service Interface
Adding a comment to scheduler_types on
the default values used.
2010-10-08 14:44:57 +02:00
Mats Kindahl
5d014b8319 Bug #57338: Extreneous server variable thread_pool_size
The server contained code for the server variable and
option thread_pool_size, but this server variable where
not used anywhere.

The variable is probably remains from backporting too
much from 6.0 (specifically, the thread pool
implementation was not backported from 6.0, which this
variable is associated with).

This patch eliminates the variable from the server.
2010-10-08 14:22:22 +02:00
Davi Arnaut
657b157511 Bug#56822: Add a thread state for sessions waiting on the query cache lock
Only wait for a single debug signal at a time as the signal state
is global. Also, do not activate the query cache debug sync points
if the thread has no associated THD session.
2010-10-08 09:16:20 -03:00
Tor Didriksen
921fd52975 Bug#57209 valgrind + Assertion failed: dst > buf
Buffer overrun when trying to format DBL_MAX
2010-10-08 11:52:09 +02:00
Vasil Dimov
2e1c48e069 Adjust results files after innodb_file_per_table became 0.
In calvin.sun@oracle.com-20101005183830-p81bemgffq8l2en9 the default
value of innodb_file_per_table was changed from 1 to 0.
2010-10-08 12:34:08 +03:00
Sergey Vojtovich
b2ccb7d0fe Fixed plugin_load_option failure, when example storage
engine is not available. We need to add loose prefix
to example load option.
2010-10-08 13:20:42 +04:00
Alexey Botchkov
a398378776 Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help
now do no initializations for the --help.
        Do it for --verbose --help though.

per-file comments:
  sql/mysqld.cc
Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help
        quit with the help message at once as --help was given
2010-10-08 12:12:18 +05:00
Alexey Botchkov
6adb077efc Bug#35269 mysqlcheck behaves different depending on order of parameters
Issue an error if user specifies multiple commands to run.
        Also there was an unnoticed bug that DO_CHECK was actually 0 which lead
        to wrong actions in some cases.
        The mysqlcheck.test contained commands with the suspicious meaning
        for the above reason. Extra commands removed from there.

per-file commands:
  client/mysqlcheck.c
Bug#35269      mysqlcheck behaves different depending on order of parameters
        Drop with an error if multiple commands.
  mysql-test/r/mysqlcheck.result
Bug#35269      mysqlcheck behaves different depending on order of parameters
        result completed.
  mysql-test/t/mysqlcheck.test
Bug#35269      mysqlcheck behaves different depending on order of parameters
        testcase added.
        not-working commands removed from some mysqlcheck calls.
2010-10-08 12:09:47 +05:00
Davi Arnaut
96c99602d4 Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix warnings related to the use of the deprecated gets() function
and passing NULL to non-pointer argument of the sys_var constructor.
2010-10-07 21:53:00 -03:00
Davi Arnaut
ea4c11f923 Bug#56822: Add a thread state for sessions waiting on the query cache lock
Move Query_cache_wait_state declaration out of a debug block.
2010-10-07 21:05:23 -03:00
Luis Soares
e514a7a644 BUG#54144: manual merged bzr bundle from bug report. 2010-10-08 00:34:59 +01:00
Davi Arnaut
76643a469a Bug#56822: Add a thread state for sessions waiting on the query cache lock
The problem was that threads waiting on the query cache lock
are not easily seen due to the lack of a state indicating that
the thread is waiting on the said lock. This made it difficult
for users to quickly spot (for example, via SHOW PROCESSLIST)
a query cache contention problem.

The solution is to update the thread state when the query cache
lock needs to be acquired. Whenever the lock is to be acquired,
the thread state is updated to "Waiting for query cache lock"
and is reset once the lock is granted or the wait is interrupted.
The intention is to make query cache related hangs more evident.

To further investigate query cache related locking problems, one
may use PERFORMANCE_SCHEMA to track the overhead associated with
the locking bits and determine which particular lock is being a
contention point.
2010-10-07 19:51:37 -03:00
Evgeny Potemkin
8fceaa387d Auto-merged. 2010-10-07 20:39:24 +04:00
Evgeny Potemkin
2fd0bc63bb Bug#57095: Wrongly chosen expression cache type led to a wrong result.
The coalesce function returned DATETIME type due to a DATETIME argument, but
since it's not a date/time function it can't return correct int value for
it. Nevertheless Item_datetime_cache was chosen to cache coalesce's result
and that led to a wrong result.

Now Item_datetime_cache is used only for those function that could return
correct int representation of DATETIME values.
2010-10-07 20:16:30 +04:00
Sergey Vojtovich
818e848dcf Merge WL#5496 and WL#5341 to 5.5-bugteam. 2010-10-07 19:52:34 +04:00
Luis Soares
cc15d2462c BUG#54144: ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE is hard coded
The error message for ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE was
hard coded. Additionally, the same error was used in three
separate error symptoms: 1. when heartbeat period exceeds the
value of slave_net_timeout, 2. when it is smaller than 1
milisecond and 3. when it was not in range, ie, either negative
or greater than the maximum allowed.
      
We fix this by splitting into three distinct errors and by
removing the message from the source code and moving it to the
errmsg-utf8.txt file.
2010-10-07 16:38:23 +01:00
Georgi Kodinov
a041d95821 null-merge to 5.5-bugteam 2010-10-07 17:34:42 +03:00
Georgi Kodinov
a25b690207 merge 2010-10-07 17:31:33 +03:00
Georgi Kodinov
bf48832462 bumped the version to 5.1.53 2010-10-07 17:28:17 +03:00
Jon Olav Hauglid
ee1ea44569 Merge from mysql-5.5-runtime to mysql-5.5-bugteam
No conflicts
2010-10-07 14:12:33 +02:00
Dmitry Shulga
eec581e07f Fixed bug#45445 - cannot execute procedures with thread_stack
set to 128k.
2010-10-07 18:57:12 +07:00
Vasil Dimov
8bdbfe6ac8 Merge mysql-5.5-innodb -> mysql-5.5-bugteam 2010-10-07 14:43:47 +03:00
Calvin Sun
2913b025da bug#56318: adjust the result files. 2010-10-07 06:00:22 -05:00
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
Evgeny Potemkin
893b89d980 Auto-merged. 2010-10-07 12:34:16 +04:00
Martin Hansson
8cf992dcff Null merge of 5.1 version of fix for Bug#56423. 2010-10-07 10:24:44 +02:00
Evgeny Potemkin
28af216cb5 Auto-merged. 2010-10-07 12:17:08 +04:00
Martin Hansson
9c82ecec37 Bug#56423: Different count with SELECT and CREATE SELECT queries
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 10:13:11 +02:00
Evgeny Potemkin
4bfec5733d Bug#57039: constant subtime expression returns incorrect result.
The subtime function wasn't able to produce correct int representation of
its result. For constant expressions the Item_datetime_cache is used to
speedup evaluation and Item_datetime_cache expects underlying item to return
correct int representation of DATETIME value. These two factors combined led
to a wrong query result.

Now the Item_func_add_time has function val_datetime which performs the
calculation and saves result into given MYSQL_TIME struct, it also sets
null_value to appropriate value. val_int and val_str member functions
convert the result obtained from val_datetime to int or string respectively
and returns it.
2010-10-07 11:07:56 +04:00
Alexander Nozdrin
f79f6e0c34 Fix for Bug#57094 (Copyright notice incorrect?).
The fix is to:
  - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
    to specify copyright notice;
  - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
    in programs.
2010-10-06 19:06:13 +04:00