Commit graph

67385 commits

Author SHA1 Message Date
Vasil Dimov
afe6ec6649 Merge mysql-5.5-bugteam -> mysql-5.5-innodb 2010-10-27 16:41:26 +03:00
Marko Mäkelä
9c168f3225 Bug #57707 InnoDB buf_page_t size has doubled on 32-bit systems
buf_page_t: Remove the buf_pool pointer. Add buf_pool_index:6 next to
buf_fix_count:19 (it was buf_fix_count:25). This will limit the number
of concurrent transactions to somewhere around 524,288.

buf_pool_index(buf_pool): A new function to determine the index of a
buffer pool in buf_pool_ptr[].

buf_pool_ptr: Make this a dynamically allocated array instead of an
array of pointers. Allocate the array in buf_pool_init() and free in
buf_pool_free().

buf_pool_free_instance(): No longer free the buf_pool object, as it is
allocated from a big array.

buf_pool_from_bpage(), buf_pool_from_block(): Move the definitions to
the beginning of the files, because some compilers have (had) problems
with forward definitions of inline functions. Calculate the buffer
pool from buf_pool_index.

buf_pool_from_array(): Add debug assertions for input validation.
2010-10-27 09:56:56 +03:00
Marko Mäkelä
548289eea0 Bug #57730 Clean up references to InnoDB Plugin
CMakeLists.txt: Remove the checks for mysql_storage_engine.cmake
and MYSQL_VERSION_ID.

ha_innodb.cc, ha_innodb.h: Remove the checks for MYSQL_VERSION_ID.
2010-10-27 09:54:20 +03:00
Inaam Rana
b87f59b2b2 Fix compiler warning introduced by previous commit. 2010-10-26 21:45:58 -04:00
Inaam Rana
b91f6c72dd Bug #57611 ibdata file and continuous growing undo logs
rb://498
  
  Fix handling of update_undo_logs at trx commit. Previously, when
  rseg->update_undo_list grows beyond 500 the update_undo_logs were
  marked with state TRX_UNDO_TO_FREE which should have been
  TRX_UNDO_TO_PURGE.
  In 5.5 we don't need the heuristic as we support multiple rollback
  segments.
  
  Approved by: Sunny Bains
2010-10-26 17:06:24 -04:00
Inaam Rana
a91cb6a3bc Null merge mysql-5.1-innodb to mysql-5.5-innodb 2010-10-26 17:03:28 -04:00
Inaam Rana
cb64e66003 Bug #57611 ibdata file and continuous growing undo logs
rb://498

Fix handling of update_undo_logs at trx commit. Previously, when
rseg->update_undo_list grows beyond 500 the update_undo_logs were
marked with state TRX_UNDO_TO_FREE which should have been
TRX_UNDO_TO_PURGE.

Approved by: Sunny Bains
2010-10-26 16:54:18 -04:00
kevin.lewis@oracle.com
2dad3c94f7 Bug#57720 - Windows Vista and possibly Windows 7 can return ERROR_TIMEOUT instead of WAIT_TIMEOUT from calls to SleepConditionVariableCS() which is used in os0sync.c; os_cond_wait_timeout() where it is mapped to sleep_condition_variable().
Consider ERROR_TIMEOUT to be a timeout just like WAIT_TIMEOUT.  

In addition, test for EINTR as a possible return value from pthread_cond_timeout() in the posix section of os_cond_wait_timeout(), even though it is not supposed to be returned, but just to be safe.
2010-10-26 14:18:31 -05:00
Georgi Kodinov
777ad2dd98 Bug #57689: mysql_change_user() breaks user connection on older clients
COM_CHANGE_USER was always handled like an implicit request to change the
client plugin, so that the client can re-use the same code path for both normal 
login and COM_CHANGE_USER. However this doesn't really work well with old 
clients because they don't understand the request to change a client plugin.

Fixed by implementing a special state in the code (and old client issuing 
COM_CHANGE_USER). In this state the server parses the COM_CHANGE_USER 
package and pushes back the password hash, the user name and the database 
to the input stream in the same order that the native password server side plugin 
expects. As a result it replies with an OK/FAIL just like the old server does thus
making the new server compatible with older clients.

No test case added, since it would requre an old client binary. Tested using 
accounts with and without passwords. Tested with a correct and incorrect 
password.
2010-10-25 18:11:58 +03:00
Georgi Kodinov
16323dd4d4 merge 2010-10-27 09:34:03 +02:00
Georgi Kodinov
cfa413bf4e merge 2010-10-27 09:32:26 +02:00
Alexander Nozdrin
0329adaef9 Follow-up for Bug#55850: update funcs_1 result files. 2010-10-27 11:16:52 +04:00
Anitha Gopi
0e5cd31368 Up merge revision 3547 from 5.1. Enable sp_sync test since Bug 48157 is fixed 2010-10-27 11:04:48 +05:30
Anitha Gopi
0f00988327 Fixed bug numbers in disabled.def files 2010-10-27 09:54:04 +05:30
Marc Alff
defa3281f6 Fixed test result 2010-10-26 19:35:02 +02:00
Alexander Nozdrin
1ed6c86396 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
2a4f50a5df local merge 2010-10-26 11:02:32 +02:00
Bjorn Munch
105fb30e1c null upmerge 2010-10-26 08:31:22 +02:00
Bjorn Munch
8eb6992231 merge from 5.5-mtr 2010-10-26 08:30:02 +02:00
Kristofer Pettersson
23d19d3d98 automerge 2010-10-25 18:21:28 +02:00
Tor Didriksen
e6ae473bca Bug#45288: pb2 returns a lot of compilation warnings
sql/sql_lex.h:1437: warning: control reaches end of non-void function
2010-10-25 17:08:27 +02:00
Bjorn Munch
16a55614cc merge from 5.1-mtr 2010-10-25 15:48:41 +02:00
Kristofer Pettersson
3611d5e380 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.
2010-10-25 14:30:07 +02:00
Bjorn Munch
4aa59d683e Revert simplified if() in mysql-test/include/show_events.inc 2010-10-25 14:07:28 +02:00
Horst.Hunger
1eb1bea003 Due to failing on Freebsd. 2010-10-25 12:24:26 +02:00
Jimmy Yang
e548b2f107 merge from mysql-5.1-innodb to mysql-5.5-innodb. 2010-10-25 00:02:03 -07:00
Jimmy Yang
1b5b5cbe65 Fix bug #57700 Latching order violation in row_truncate_table_for_mysql().
Approved by Sunny Bains
2010-10-24 22:51:21 -07:00
f11fc60281 Manual merge 2010-10-23 21:09:27 +08:00
180e74bd49 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.
2010-10-23 20:55:44 +08:00
Jon Olav Hauglid
d293c4258e Merge from mysql-5.5-runtime to mysql-5.5-bugteam
No conflicts
2010-10-22 14:13:03 +02:00
Horst.Hunger
5ff1cbb8ea Due to issues with merge. 2010-10-22 10:20:17 +02:00
Jimmy Yang
d14045b7ea Fix Bug #56791 Remove ios_mutex from InnoDB code
rb://495 approved by Inaam
2010-10-21 23:34:57 -07:00
Calvin Sun
86919e95af Fix an error introduced in a follow-up fix of Bug#57232 by Sunny Bains
revno: 3185
revid: sunny.bains@oracle.com-20101018060544-wo81q6kbl3la1uq0
2010-10-21 12:29:00 -05:00
Jon Olav Hauglid
26e7ee2fa5 Merge from mysql-5.5-bugteam to mysql-5.5-runtime
No conflicts
2010-10-21 16:28:29 +02:00
Jon Olav Hauglid
67ecb9d9cf Merge from mysql-5.5-innodb to mysql-5.5-bugteam
No conflicts
2010-10-21 15:31:16 +02:00
Bjorn Munch
9fb06f45fa sorry null upmerge 2010-10-21 15:24:31 +02:00
Bjorn Munch
bad7fa7c90 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
8069325f59 merge 2010-10-21 14:12:23 +02:00
Sunny Bains
30d5e327c8 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
add465e5a1 merge from 5.5 2010-10-21 11:20:53 +02:00
Dmitry Shulga
3d9cddabf8 Fixed bug#45445 - cannot execute procedures with thread_stack
set to 128k.
2010-10-21 15:41:13 +07:00
Marko Mäkelä
7ee0551f43 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ä
731344d3d6 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
3cdf62b021 upmerge and adapt follow-up to 55582 2010-10-21 09:37:10 +02:00
Marko Mäkelä
3e2e7575af 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
9c2c464805 Manual Merge 2010-10-21 13:49:19 +08:00
aa235b1b15 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
45e815f929 Null merge from mysql-5.1-innodb to mysql-5.5-innodb 2010-10-20 20:07:42 -07:00
Jimmy Yang
59f35ce808 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
c185220472 GCC's link option only take a single hyphen. 2010-10-20 19:25:28 -02:00