1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00
Commit Graph

68513 Commits

Author SHA1 Message Date
John H. Embretsen
c2f4219a3e Merge fix for bug 56817 from mysql-5.1 to mysql-5.5. 2011-01-29 12:49:55 +01:00
Bjorn Munch
13dbdcdb66 Bug #59148 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
Do as mysqld_safe: if running mysqld-debug, plugins are in debug subdirs
NB mtr --debug won't work in this context until 47141 is fixed
Also moved read_plugin_defs; no point running this in all worker threads
2011-01-28 15:55:50 +01:00
Mattias Jonsson
77f796ead8 merge 2011-01-28 13:39:39 +01:00
Mattias Jonsson
c5e525f879 merge 2011-01-28 13:28:15 +01:00
John H. Embretsen
c984c636f5 Null-merge from mysql-5.1 2011-01-28 11:01:54 +01:00
Jimmy Yang
fe4e126849 Fix Bug #59390 row_merge_build_indexes() fails to register tmpfd for PFS
rb://582 approved by Marko
2011-01-28 01:38:21 -08:00
Jimmy Yang
5d2239e118 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-28 01:10:40 -08:00
Bjorn Munch
6d28807270 Bug #59489 Enable setting of env. variables for mysqld from mtr
Added --mysqld-env option, propagate via safe_process
Simplified: should be safe to set in parent safe_process after it's started
Addendum: catch cases of --mysqld-env w/o value, assume env.var 
    name never begins with "--"
2011-01-27 14:42:08 +01:00
Tor Didriksen
6b0b53d65c Bug #59273 show profile source doesn't show Source_function or truncates Source_file
Fixed the 'show profile source' part of the bug.
Leaving SHOW ENGINE INNODB MUTEX to a separate patch.
2011-01-27 14:25:27 +01:00
Marko Mäkelä
c9c4e4f880 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-27 13:30:59 +02:00
Marko Mäkelä
6f6ad4e8b2 ibuf_contract_ext(): Remove an #if 0 section of code
that refers to trx_sys_set_ibuf_format().
Change buffer format tagging was never implemented.
2011-01-27 10:12:00 +02:00
Mattias Jonsson
04a8611112 merge of bug 47902 and (null-merge) of bug 57924.
bug#57924 does not occur in 5.5, so I reverted the 5.1 specific
code and used the errors from 5.5 instead in the tests
2011-01-26 19:33:53 +01:00
Jon Olav Hauglid
5e03579061 Bug #42230 during add index, cannot do queries on storage engines
that implement add_index

The problem was that ALTER TABLE blocked reads on an InnoDB table
while adding a secondary index, even if this was not needed. It is
only needed for the final step where the .frm file is updated.

The reason queries were blocked, was that ALTER TABLE upgraded the
metadata lock from MDL_SHARED_NO_WRITE (which blocks writes) to
MDL_EXCLUSIVE (which blocks all accesses) before index creation.

The way the server handles index creation, is that storage engines
publish their capabilities to the server and the server determines
which of the following three ways this can be handled: 1) build a
new version of the table; 2) change the existing table but with
exclusive metadata lock; 3) change the existing table but without
metadata lock upgrade.

For InnoDB and secondary index creation, option 3) should have been
selected. However this failed for two reasons. First, InnoDB did
not publish this capability properly.

Second, the ALTER TABLE code failed to made proper use of the
information supplied by the storage engine. A variable
need_lock_for_indexes was set accordingly, but was not later used.
This patch fixes this problem by only doing metadata lock upgrade
before index creation/deletion if this variable has been set.

This patch also changes some of the related terminology used 
in the code. Specifically the use of "fast" and "online" with
respect to ALTER TABLE. "Fast" was used to indicate that an
ALTER TABLE operation could be done without involving a
temporary table. "Fast" has been renamed "in-place" to more
accurately describe the behavior.

"Online" meant that the operation could be done without taking
a table lock. However, in the current implementation writes
are always prohibited during ALTER TABLE and an exclusive
metadata lock is held while updating the .frm, so ALTER TABLE
is not completely online. This patch replaces "online" with 
"in-place", with additional comments indicating if concurrent
reads are allowed during index creation/deletion or not.

An important part of this update of terminology is renaming
of the handler flags used by handlers to indicate if index
creation/deletion can be done in-place and if concurrent reads
are allowed. For example, the HA_ONLINE_ADD_INDEX_NO_WRITES
flag has been renamed to HA_INPLACE_ADD_INDEX_NO_READ_WRITE,
while HA_ONLINE_ADD_INDEX is now HA_INPLACE_ADD_INDEX_NO_WRITE.
Note that this is a rename to clarify current behavior, the
flag values have not changed and no flags have been removed or
added.

Test case added to innodb_mysql_sync.test.
2011-01-26 14:23:29 +01:00
Alfranio Correia
47238d4465 merge mysql-5.1 --> mysql-5.5 2011-01-26 12:44:09 +00:00
Marko Mäkelä
e66716311a Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-26 10:02:52 +02:00
Libing Song
a64a0e0f89 Auto Merge. 2011-01-26 15:35:18 +08:00
Sunny Bains
1ffb70a309 In sync_close() fix a bug introduced by the fix for Bug #59683 where we iterate
over the mutex list and free each mutex. When UNIV_MEM_DEBUG is defined, we
need skip the hash mutex.

It is a minor bug affecting only UNIV_SYNC_DEBUG builds, found by Michael.
2011-01-26 09:33:59 +11:00
Bjorn Munch
6481849afa null upmerge 2011-01-25 15:08:53 +01:00
Bjorn Munch
360289d319 merge 59063 2011-01-25 14:46:45 +01:00
Bjorn Munch
4e5438ef45 null upmerge 2011-01-25 13:32:18 +01:00
Bjorn Munch
bb4d86bf10 merge from 5.5 main 2011-01-25 13:08:59 +01:00
Marko Mäkelä
71e435e461 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-25 12:35:35 +02:00
Marko Mäkelä
29deba81b8 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-25 10:51:13 +02:00
Sunny Bains
2a0bcbc9bd Fix Bug #59683 :InnoDB latch deadlock detector/violation debug code is very slow
There are two main pain points, one is lookup by thread id for sync_thread_t
and the other is to do a lookup  by latch or level in sync_thread_t::levels.
Changed the sync_thread_t::levels lookup and reserve operation from O(N)
to O(1).

Pure lookups are still O(N), the main change for pure lookup is that we no
longer need to search up to SYNC_THREAD_N_LEVELS but only up to the number
of slots actually ever used ie. it is possible some were used in the past
but are now on the free list. If the in_use count drops to 0 we reset the
free list too.

Overload the sync_level_t::level field to track the free list. If
sync_thread_t::latch == NULL then sync_thread_t::level contains the ordinal
value of the previous free entry.

rb://580 Approved by Jimmy Yang.
2011-01-25 18:25:36 +11:00
Magnus Blåudd
243b95fba5 Merge 2011-01-24 11:09:53 +01:00
Vasil Dimov
10543b0820 Merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-01-24 09:43:50 +02:00
Vasil Dimov
54002d0a49 Merge mysql-5.5 -> mysql-5.5-innodb 2011-01-24 09:42:07 +02:00
11d2e2ea3e Manual Merge. 2011-01-24 11:52:29 +08:00
Bjorn Munch
342291c0e4 upmerge 59063 2011-01-21 15:03:21 +01:00
Martin Hansson
3efa6a6bf1 Merge. 2011-01-20 13:28:11 +01:00
Martin Hansson
4299c25cec Merge. 2011-01-20 09:19:45 +01:00
Hery Ramilison
e1d5d26d71 Changed current copyright year to 2011 2011-01-19 23:27:25 +01:00
Magnus Blåudd
8834fda51b Cherry pick fix fo detecting MySQL CLuster in mtr.pl 2011-01-19 15:47:56 +01:00
Martin Hansson
99f18f0ffa Merge of fix for Bug#59173. 2011-01-19 15:12:43 +01:00
Alexander Barkov
ae60b47756 Merging Copyright update from 5.1 2011-01-19 16:31:17 +03:00
Bjorn Munch
e869aa6764 null upmerge 2011-01-19 13:16:45 +01:00
Bjorn Munch
dc024691eb merge from 5.5-mtr 2011-01-19 12:56:17 +01:00
Bjorn Munch
084d081060 null upmerge 2011-01-19 12:02:30 +01:00
Bjorn Munch
bca3102f7e merge from 5.5 main 2011-01-19 11:21:20 +01:00
Libing Song
921dcabe90 Automerge 2011-01-19 01:57:58 +08:00
Anitha Gopi
72a109bff5 automerge 2011-01-18 23:33:02 +05:30
Anitha Gopi
ff7d07062d Bug#47449: This problem not seen in PB2. Remove from experimental group 2011-01-18 23:21:39 +05:30
Libing Song
2d0fcc1d44 Manual merge 2011-01-19 01:38:10 +08:00
John H. Embretsen
634b102533 Post push test fix for show_check.test.
Fix for bug#45740 introduced test case using SHOW TABLE STATUS against a Memory table using latin1 character in table name.
The test failed on Windows and FreeBSD due to a difference in the value for Avg_row_length.
The average row length normally depends on the values for data length and row count. According to the 5.5 manual data length is approximate with Memory tables.
With MyISAM and InnoDB the Avg_row_length is the same on Windows and Solaris.
The solution implemented by this patch is to mask out the value for Avg_row_length, as it may vary when using Memory tables.
2011-01-18 13:04:17 +01:00
Bjorn Munch
8379f01b62 upmerge undo of 59063 2011-01-18 12:39:23 +01:00
Bjorn Munch
9093399b29 Some more copyright fixes in mtr 2011-01-18 12:06:25 +01:00
Marko Mäkelä
761bc05d69 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-18 12:30:33 +02:00
Bjorn Munch
7b9c438099 Fixed copyright headers in mtr src files 2011-01-18 11:21:37 +01:00
Alexander Barkov
8a576b8360 Merging from 5.1. 2011-01-18 09:50:03 +03:00
Vinay Fisrekar
3712d6c12f Merge from mysql-5.1 for
sys_vars.innodb_max_dirty_pages_pct_func fails sporadically
2011-01-18 09:30:00 +05:30