Commit graph

67367 commits

Author SHA1 Message Date
Georgi Kodinov
50d18aa2d5 merge 2010-10-27 09:32:26 +02:00
Alexander Nozdrin
e86b6c0db4 Patch for Bug#55850 (Trigger warnings not cleared).
The problem was that the warnings risen by a trigger were not cleared upon
successful completion. The warnings should be cleared if the trigger completes
successfully.

The fix is to skip merging warnings into caller's Warning Info for triggers.
2010-10-26 15:48:08 +04:00
Marc Alff
b431da6214 local merge 2010-10-26 11:02:32 +02:00
Bjorn Munch
dca17350be null upmerge 2010-10-26 08:31:22 +02:00
Bjorn Munch
32c86a488d merge from 5.5-mtr 2010-10-26 08:30:02 +02:00
Kristofer Pettersson
29f3d85df1 automerge 2010-10-25 18:21:28 +02:00
Tor Didriksen
56f6599e7c Bug#45288: pb2 returns a lot of compilation warnings
sql/sql_lex.h:1437: warning: control reaches end of non-void function


sql/sql_lex.h:
  Make compiler happy, by adding a return statement.
2010-10-25 17:08:27 +02:00
Bjorn Munch
676e012e47 merge from 5.1-mtr 2010-10-25 15:48:41 +02:00
Kristofer Pettersson
4b36063336 Bug#54569 Some options are not allowed to take argument when passed with loose- prefix
Boolean options cause parsing failures when they are given
with prefix loose- and an argument, either in the command
line or in configuration file.

The reason was a faulty logic which forced the parsing
to throw an error when an argument of type NO_ARG was
used together with an argument which has been identified
as a key-value pair. Despite the attribute NO_ARG these
options actually take arguments if they are of type
BOOL.


include/my_getopt.h:
  * More comments to help future refactoring
mysys/my_getopt.c:
  * removed if-statement which prevented logic for handling boolean types with arguments to be executed.
  * Added comments to aid in future refactoring.
2010-10-25 14:30:07 +02:00
Bjorn Munch
56354413f8 Revert simplified if() in mysql-test/include/show_events.inc 2010-10-25 14:07:28 +02:00
Horst.Hunger
06a263e2b3 Due to failing on Freebsd. 2010-10-25 12:24:26 +02:00
unknown
089ab763f5 Manual merge 2010-10-23 21:09:27 +08:00
unknown
06c49d571b Bug#27606 GRANT statement should be replicated with DEFINER information
"Grantor" columns' data is lost when replicating mysql.tables_priv.
Slave SQL thread used its default user ''@'' as the grantor of GRANT|REVOKE
statements executing on it.

In this patch, current user is put in query log event for all GRANT and REVOKE
statement, SQL thread uses the user in query log event as grantor.


mysql-test/suite/rpl/r/rpl_do_grant.result:
  Add test for this bug.
mysql-test/suite/rpl/t/rpl_do_grant.test:
  Add test for this bug.
sql/log_event.cc:
  Refactoring THD::current_user_used and related functions.
  current_user_used is used to judge if current user should be
  binlogged in query log event. So it is better to call it m_binlog_invoker.
  The related functions are renamed too.
sql/sql_class.cc:
  Refactoring THD::current_user_used and related functions.
  current_user_used is used to judge if current user should be
  binlogged in query log event. So it is better to call it m_binlog_invoker.
  The related functions are renamed too.
sql/sql_class.h:
  Refactoring THD::current_user_used and related functions.
  current_user_used is used to judge if current user should be
  binlogged in query log event. So it is better to call it m_binlog_invoker.
  The related functions are renamed too.
sql/sql_parse.cc:
  Call binlog_invoker() for GRANT and REVOKE statements.
2010-10-23 20:55:44 +08:00
Jon Olav Hauglid
1ecc17737f Merge from mysql-5.5-runtime to mysql-5.5-bugteam
No conflicts
2010-10-22 14:13:03 +02:00
Horst.Hunger
d63cbdde8e Due to issues with merge. 2010-10-22 10:20:17 +02:00
Jon Olav Hauglid
a776e5f3d2 Merge from mysql-5.5-bugteam to mysql-5.5-runtime
No conflicts
2010-10-21 16:28:29 +02:00
Jon Olav Hauglid
346b73015a Merge from mysql-5.5-innodb to mysql-5.5-bugteam
No conflicts
2010-10-21 15:31:16 +02:00
Bjorn Munch
512e00fec3 sorry null upmerge 2010-10-21 15:24:31 +02:00
Bjorn Munch
909f0bf94a Follow-up to Bug #55582 which allows checking strings in if
Simplified cases where a select was used to compare variable against ''
2010-10-21 15:20:50 +02:00
Vladislav Vaintroub
0049019463 merge 2010-10-21 14:12:23 +02:00
Sunny Bains
38f5427192 Bug #57243 Inconsistent use of trans_register_ha() API in InnoDB
Remove trx_t::active_trans. Split into two separate fields with distinct
responsibilities. trx_t::is_registered and trx_t::owns_prepare_mutex.
There are wrapper functions for using this fields in ha_innodb.cc. The
wrapper functions check for invariants.

Fix some formatting to conform to InnoDB guidelines.

Remove innobase_register_stmt() and innobase_register_trx_and_stmt().

Add:
trx_is_started()
trx_deregister_from_2pc()
trx_register_for_2pc()
trx_is_registered_for_2pc()
trx_owns_prepare_commit_mutex_set()
trx_has_prepare_commit_mutex()

rb://479, Approved by Jimmy Yang.
2010-10-21 22:22:27 +11:00
Bjorn Munch
33e78dc233 merge from 5.5 2010-10-21 11:20:53 +02:00
Dmitry Shulga
89e43c8494 Fixed bug#45445 - cannot execute procedures with thread_stack
set to 128k.

sql/sp.cc:
  Added checking for stack overrun at functions
  db_load_routine/sp_find_routine.
sql/sp_head.cc:
  sp_head::execute() modified: pass constant value STACK_MIN_SIZE
  instead of 8 * STACK_MIN_SIZE  as second argument value
  in call to check_stack_overrun. Added checking for stack overrun
  at functions sp_lex_keeper::reset_lex_and_exec_core/sp_instr_stmt::execute.
sql/sql_parse.cc:
  check_stack_overrun modified: allocate buffer for error message
  at heap instead of stack.
  parse_sql modified: added call to check_stack_overrun() before
  parsing of sql statement.
2010-10-21 15:41:13 +07:00
Marko Mäkelä
d1a349325c Fix a sys_vars.all_vars failure caused by Bug #56680 instrumentation.
The variable innodb_change_buffering_debug is only present in debug builds.
Hide it from the test, so that the test passes in both debug and non-debug.
2010-10-21 11:30:43 +03:00
Marko Mäkelä
ed55f540ee Remove files that are no longer needed.
These files were needed when InnoDB Plugin was maintained and distributed
separately from the MySQL 5.1 source tree. They have never been needed in
MySQL 5.5.

storage/innobase/mysql-test:
 Patches to the test suite.

storage/innobase/handler/mysql_addons.cc:
 Wrappers for private MySQL functions.
2010-10-21 10:45:44 +03:00
Bjorn Munch
88d43dfcc8 upmerge and adapt follow-up to 55582 2010-10-21 09:37:10 +02:00
Marko Mäkelä
ea6b469df3 lock_rec_validate_page(): Disable the debug printout.
It is filling the error log when testing the debug version of the server.
The printout only seems to be useful when debugging a crash, not when
testing an instrumented version of the server.
2010-10-21 10:32:41 +03:00
unknown
70ac1c71e4 Manual Merge 2010-10-21 13:49:19 +08:00
unknown
6646fecc14 Bug#55478 Row events wrongly apply on the temporary table of the same name
Rows events were applied wrongly on the temporary table with the same name.
But rows events are generated only for base tables. As temporary
table's data never be binlogged on row mode. Normally, base table of the
same name cannot be updated if a temporary table has the same name.
But there are two cases which can generate rows events on 
the base table of same name.
      
Case1: 'CREATE TABLE ... SELECT' statement.
In mixed format, it will generate rows events if it is unsafe.
      
Case2: Drop a transactional temporary table in a transaction
       (happens only on 5.5+).
BEGIN;
DROP TEMPORARY TABLE t1;       # t1 is a InnoDB table
INSERT INTO t1 VALUES(rand()); # t1 is a MyISAM table
COMMIT;
'DROP TEMPORARY TABLE' will be put in the transaction cache and
binlogged after the rows events generated by the 'INSERT' statement.
      
After this patch, slave opens only base table when applying a rows event.
2010-10-21 13:43:19 +08:00
Jimmy Yang
b921762779 Null merge from mysql-5.1-innodb to mysql-5.5-innodb 2010-10-20 20:07:42 -07:00
Jimmy Yang
e8f228e7eb Fix Bug #57616 Sig 11 in dict_load_table() when failed to load
index or foreign key

Approved by Sunny Bains
2010-10-20 19:56:42 -07:00
Davi Arnaut
9129cb184b GCC's link option only take a single hyphen. 2010-10-20 19:25:28 -02:00
Davi Arnaut
6997cff459 Merge of mysql-5.1-bugteam into mysql-5.5-bugteam. 2010-10-20 17:02:59 -02:00
Davi Arnaut
3e9c52250a Bug#45288: pb2 returns a lot of compilation warnings
Fix assorted warnings that are generated in optimized builds.
Most of it is silencing variables that are set but unused.

This patch also introduces the MY_ASSERT_UNREACHABLE macro
which helps the compiler to deduce that a certain piece of
code is unreachable.

include/my_compiler.h:
  Use GCC's __builtin_unreachable if available. It allows
  GCC to deduce the unreachability of certain code paths,
  thus avoiding warnings that, for example, accused that a
  variable could be used without being initialized (due to
  unreachable code paths).
2010-10-20 16:21:40 -02:00
Horst.Hunger
dc0412d589 due to merge. 2010-10-20 16:59:28 +02:00
Horst.Hunger
d6af9bef7a due to merge 2010-10-20 16:56:09 +02:00
Davi Arnaut
785bcc173d Merge of mysql-5.1-bugteam into mysql-5.5-bugteam. 2010-10-20 12:48:19 -02:00
Bjorn Munch
0455ff8faf Follow-up to Bug #55582 which allows chaecking strings in if
Simplified cases where a select was used to compare variable against ''
2010-10-20 16:15:32 +02:00
Davi Arnaut
b5bb13ec03 Bug#45288: pb2 returns a lot of compilation warnings
Fix assorted compiler warnings.

include/my_pthread.h:
  Like for pthread_cond_timedwait, the abstime is constant.
mysys/my_gethwaddr.c:
  Instead of using a manual copy that introduce warnings due to
  type mismatch, copy the buffer using memcpy and use memcmp to
  check whether all bytes of the buffer are zeroed.
mysys/thr_mutex.c:
  Like for pthread_cond_timedwait, the abstime is constant.
unittest/mytap/tap.h:
  Introduce a ok() variant that does not take a format argument.
  Since ok() is tagged with a printf attribute, GCC complains if
  the fmt argument is NULL.
2010-10-20 11:40:04 -02:00
Marko Mäkelä
8739daeef0 Fix a compiler warning caused by fixing Bug #57588 (compiler warning).
Declare DATA_MBMAXLEN with the same data type as DATA_MBMINLEN.
2010-10-20 15:58:47 +03:00
Marko Mäkelä
67a0d9c0e0 Fix bit-rot left by the multiple buffer pools patch.
Rename buf_pool_watch, buf_pool_mutex, buf_pool_zip_mutex
to buf_pool->watch, buf_pool->mutex, buf_pool->zip_mutex
in comments. Refer to buf_pool->flush_list_mutex instead of
flush_list_mutex.

Remove obsolete declarations of buf_pool_mutex and buf_pool_zip_mutex.
2010-10-20 14:46:28 +03:00
Bjorn Munch
8cdf07cf49 upmerge 52019 2010-10-20 12:17:19 +02:00
Bjorn Munch
e4f9ead140 Fixed wrong feof check in read_line, see 52019 2010-10-20 11:41:51 +02:00
Bjorn Munch
e533c7cc10 Fixed missing cast of arg to my_mbcharlen 2010-10-20 11:39:58 +02:00
Bjorn Munch
f73ada3722 48863 followup: move an array declaration out from within if block 2010-10-20 11:30:50 +02:00
Bjorn Munch
6960db2dfd Bug #52019 main.mysqltest fails on new tests for lowercase_result
Limited to actual bug fix, fixing a while condition
Again confirmed on Linux PPC and on AIX 5.3
2010-10-20 11:22:08 +02:00
Jon Olav Hauglid
2d77e26d0b Merge from mysql-5.5-bugteam to mysql-5.5-runtime
No conflicts
2010-10-20 10:41:32 +02:00
Vasil Dimov
a2634cf7c8 Merge mysql-5.1-innodb -> mysql-5.5-innodb
In the fix for Bug#53916 also apply equivalent changes to CMakeLists.txt
2010-10-20 10:41:51 +03:00
Sunny Bains
4735eafcdd Bug #57588 - Compiler warning in InnoDB due to comparison between signed and unsigned
For DATA_MBMINLEN(), cast the result of UNIV_EXPECT to ulint because in GCC
it returns a long causing unsigned/signed comparison warnings.

Approved by Jimmy Yang on IM.
2010-10-20 14:39:31 +11:00
Davi Arnaut
7af5094208 Merge of mysql-5.1-bugteam into mysql-5.5-bugteam. 2010-10-19 20:51:34 -02:00