Commit graph

68116 commits

Author SHA1 Message Date
Jonathan Perkin
2b39e065d7 bug#51264: MySQL.prefPane fails to run
@prefix@ was erroneously set to '.' with the STANDALONE install
layout, when it should instead be set to CMAKE_INSTALL_PREFIX,
this was likely accidentally copied from scripts/CMakeLists.txt
which has similar handling specifically for mysql_install_db.sh

mysql.server init script can now find the install, assuming the
defaults have been chosen.
2010-12-17 23:03:23 +00:00
Mikael Ronstrom
2a294a1989 BUG#59013, make partition handler not miss HA_STATUS_NO_LOCK, add HA_STATUS_VARIABLE_EXTRA to remove InnoDB bottleneck 2010-12-17 21:58:40 +01:00
Sergey Vojtovich
7d5df40277 Merge fix for BUG58948 to 5.5-bugteam. 2010-12-17 19:08:05 +03:00
Jorgen Loland
ef0a01abfc BUG#58985: Assertion tab->quick->index != 64 failed in make_join_select()
in sql_select.cc

Follow-up patch. Add sanity check for quick select when it is
decided that it should be used.
2010-12-17 13:52:39 +01:00
Georgi Kodinov
ce80181720 merge 2010-12-17 14:47:33 +02:00
Georgi Kodinov
db5cbc8252 merge 2010-12-17 14:44:35 +02:00
Georgi Kodinov
8165ea21f0 tree details update to main 2010-12-17 14:42:30 +02:00
Georgi Kodinov
fca0f1dbb7 merge 2010-12-17 13:22:19 +02:00
Georgi Kodinov
c901d8a65e merge 2010-12-17 13:18:43 +02:00
Georgi Kodinov
1e80a96870 merge 2010-12-17 13:11:34 +02:00
Georgi Kodinov
82e887e3b2 merge 2010-12-17 13:06:49 +02:00
Georgi Kodinov
4722079474 merge 2010-12-17 13:05:10 +02:00
Alexander Nozdrin
eb63f9e705 Merge follow-up: update test result. 2010-12-17 13:48:00 +03:00
Bjorn Munch
11746c8000 some more if stmt simplifications 2010-12-17 11:30:59 +01:00
Bjorn Munch
5709298591 null upmerge 2010-12-17 10:41:24 +01:00
Bjorn Munch
453d4fab7b merge from 5.5 main 2010-12-17 10:37:46 +01:00
Bjorn Munch
3e596cee79 merge from 5.1 main up to 3474 2010-12-17 10:13:55 +01:00
Jorgen Loland
f7dc30c843 BUG#58985: Assertion tab->quick->index != 64 failed in
make_join_select() in sql_select.cc

Caused by incorrect ASSERT introduced by BUG#58456. Quick selects 
may have index == MAX_KEY if it merges indices.
2010-12-17 10:02:24 +01:00
Sergey Vojtovich
cb2e57c788 BUG#58948 - Valgrind warning in do_handle_one_connection()
Fixed that proxy_user may be used uninitialized.
2010-12-17 11:56:43 +03:00
Georgi Kodinov
63c1731a64 post-merge test result update 2010-12-17 10:22:54 +02:00
Georgi Kodinov
6c3d371441 post-merge test suite update 2010-12-17 10:20:44 +02:00
Sunny Bains
0b099e8723 Bug #18274 - InnoDB auto_increment field reset on OPTIMIZE TABLE
With the above bug fix, the maximum autoinc value is preserved when
a table is optimized. Update resut file to reflect that.
2010-12-17 17:27:41 +11:00
Luis Soares
59fdd56dd1 BUG#46166
Automerge from mysql-5.1-bugteam.
2010-12-17 01:29:53 +00:00
Luis Soares
9e161d3021 BUG#46166
Post-push fixes:

  - fixed platform dependent result files
  - appeasing valgrind warnings:
   
    Fault injection was also uncovering a previously existing 
    potential mem leaks. For BUG#46166 testing purposes, fixed 
    by forcing handling the leak when injecting faults.
2010-12-17 01:17:03 +00:00
Luis Soares
a7087d81eb empty merge from mysql-5.1-bugteam. 2010-12-16 19:15:55 +00:00
Luis Soares
905e21a0cf BUG#46166
Merging to latest mysql-5.5-bugteam.
2010-12-16 19:12:31 +00:00
Luis Soares
60f650069b BUG#46166
Merging to latest mysql-5.1-bugteam.
2010-12-16 19:11:08 +00:00
Alexander Nozdrin
a72186103f Manual merge from mysql-5.5. 2010-12-16 21:43:21 +03:00
Georgi Kodinov
56b06b422e merge 2010-12-16 18:54:03 +02:00
Georgi Kodinov
c6b904abf8 merge mysql-5.5->mysql-5.5-bugteam 2010-12-16 18:44:17 +02:00
Georgi Kodinov
7bdecb1d4a merge 2010-12-16 16:40:52 +02:00
Jorgen Loland
664f06de7c BUG#58456 - Assertion 0 in QUICK_INDEX_MERGE_SELECT::need_sorted_output
in opt_range.h

In this bug, there are two alternative access plans: 
 * Index merge range access
 * Const ref access

best_access_path() decided that the ref access was preferrable, 
but make_join_select() still decided to point 
SQL_SELECT::quick to the index merge because the table had 
type==JT_CONST which was not handled. 

At the same time the table's ref.key still referred to the 
index the ref access would use indicating that ref access 
should be used. In this state, different parts of the 
optimizer code have different perceptions of which access path
is in use (ref or range).

test_if_skip_sort_order() was called to check if the ref access
needed ordering, but test_if_skip_sort_order() got confused and
requested the index merge to return records in sorted order. 
Index merge cannot do this, and fired an ASSERT.

The fix is to take join_tab->type==JT_CONST into concideration
when make_join_select() decides whether or not to use the 
range access method.
2010-12-16 12:25:02 +01:00
Jonathan Perkin
3d799bdffd Merge from mysql-5.5.8-release 2010-12-16 11:13:58 +01:00
Jon Olav Hauglid
28a5059a92 Bug #58730 Assertion failed: table->key_read == 0 in close_thread_table,
temptable views

The TABLE::key_read field indicates if the optimizer has found that row
retrieval only should access the index tree. The triggered assert
inside close_thread_table() checks that this field has been reset when
the table is about to be closed.

During normal execution, these fields are reset right before tables are
closed at the end of mysql_execute_command(). But in the case of errors,
tables are closed earlier. The patch for Bug#52044 refactored the open
tables code so that close_thread_tables() is called immediately if
opening of tables fails. At this point in the execution, it could
happend that all TABLE::key_read fields had not been properly reset,
therefore triggering the assert.

The problematic statement in this case was EXPLAIN where the query
accessed two derived tables and where the first derived table was
processed successfully while the second derived table was not.
Since it was an EXPLAIN, TABLE::key_read fields were not reset after
successful derived table processing since the state needs to be 
accessible afterwards. When processing of the second derived table
failed, it's corresponding SELECT_LEX_UNIT was cleaned, which caused
it's TABLE::key_read fields to be reset. Since processing failed,
the error path of open_and_lock_tables() was entered and
close_thread_tables() was called. The assert was then triggered due
to the TABLE::key_read fields set during processing of the first
derived table.

This patch fixes the problem by adding a new derived table processor,
mysql_derived_cleanup() that is called after mysql_derived_filling().
It causes cleanup of all SELECT_LEX_UNITs to be called, resetting
all relevant TABLE::key_read fields.

Test case added to derived.test.
2010-12-16 10:55:23 +01:00
Jonathan Perkin
caebacaf93 bug#58955: Must -DBUILD_CONFIG=mysql_release require libaio on Linux
Allow users to build without aio if they really want to, by passing
-DIGNORE_AIO_CHECK to cmake.
2010-12-16 09:27:55 +00:00
Vasil Dimov
a79cd543ce Increment InnoDB version from 1.1.4 to 1.1.5
InnoDB 1.1.4 was released with MySQL 5.5.8
2010-12-16 09:53:07 +02:00
Davi Arnaut
487f9bb219 Bug#58136: Crash in vio_close at concurrent disconnect and KILL
The problem is a race between a session closing its vio
(i.e. after a COM_QUIT) at the same time it is being killed by
another thread. This could trigger a assertion in vio_close()
as the two threads could end up closing the same vio, at the
same time. This could happen due to the implementation of
SIGNAL_WITH_VIO_CLOSE, which closes the vio of the thread
being killed.

The solution is to serialize the close of the Vio under
LOCK_thd_data, which protects THD data.

No regression test is added as this is essentially a debug
issue and the test case would be quite convoluted as we would
need to synchronize a session that is being killed -- which
is a bit difficult since debug sync points code does not
synchronize killed sessions.
2010-12-15 20:59:21 -02:00
Davi Arnaut
eb5a21dd90 Bug#58953: 5.5 does not build with -DWITHOUT_PERFSCHEMA_STORAGE_ENGINE=1
The MYSQL_LOG::open member function does not take a PSI
key file argument when the PSI interface is not present.
2010-12-15 20:38:43 -02:00
Davi Arnaut
81605310fd Add VERSION.dep to the bzr ignore list. The file is generated
automatically to place a dependency on the VERSION file.
2010-12-15 10:22:05 -02:00
Davi Arnaut
995ce0bb0a Bug#58871: Reorganize maintainer mode compiler flags to allow
option for specific compilers

Reorganize the maintainer mode cmake code to allow options
for specific compilers. For now, enable -Wcheck for ICC,
but do not turn warnings into errors.
2010-12-15 08:30:09 -02:00
Davi Arnaut
40d32fc8c1 Cleanup my_win_init by moving time and registry related
initialization to specific functions. Also, remove a large
block of white space. There shouldn't be any functional
change.
2010-12-15 18:00:54 -02:00
Alexander Barkov
7f0236de48 Bug#58321 No warning when characters outside BMP0 is converted to UCS2
Problem: when inserting supplementary characters to an UCS2 column,
character was silently shrinked to 16-bit value.

Fix: produce a warning on attempt to insert a supplementary character,
and convert to question mark.

  @ mysql-test/r/ctype_many.result
  @ mysql-test/t/ctype_many.test
  Adding tests

  @ strings/ctype-ucs2.c
  Check if wc is greater than the highest value supported (0xFFFF),
  return MY_CS_ILUNI if true.
2010-12-15 12:58:37 +03:00
Sunanda Menon
0673d8efc6 Merge from mysql-5.1.54-release 2010-12-15 06:40:55 +01:00
Gleb Shchepa
bdd4ab874b automerge 5.1-bugteam --> 5.5-bugteam 2010-12-15 00:02:43 +03:00
Gleb Shchepa
6a9822a8d0 null merge 5.0-bugteam --> 5.1-bugteam (after backport of bug 54476) 2010-12-14 23:57:41 +03:00
Gleb Shchepa
01521a0afb backport of bug #54476 fix from 5.1-bugteam to 5.0-bugteam.
Original revid: alexey.kopytov@sun.com-20100723115254-jjwmhq97b9wl932l

 > Bug #54476: crash when group_concat and 'with rollup' in
 >                      prepared statements
 >
 > Using GROUP_CONCAT() together with the WITH ROLLUP modifier
 > could crash the server.
 >
 > The reason was a combination of several facts:
 >
 > 1. The Item_func_group_concat class stores pointers to ORDER
 > objects representing the columns in the ORDER BY clause of
 > GROUP_CONCAT().
 >
 > 2. find_order_in_list() called from
 > Item_func_group_concat::setup() modifies the ORDER objects so
 > that their 'item' member points to the arguments list
 > allocated in the Item_func_group_concat constructor.
 >
 > 3. In some cases (e.g. in JOIN::rollup_make_fields) a copy of
 > the original Item_func_group_concat object could be created by
 > using the Item_func_group_concat::Item_func_group_concat(THD
 > *thd, Item_func_group_concat *item) copy constructor. The
 > latter essentially creates a shallow copy of the source
 > object. Memory for the arguments array is allocated on
 > thd->mem_root, but the pointers for arguments and ORDER are
 > copied verbatim.
 >
 > What happens in the test case is that when executing the query
 > for the first time, after a copy of the original
 > Item_func_group_concat object has been created by
 > JOIN::rollup_make_fields(), find_order_in_list() is called for
 > this new object. It then resolves ORDER BY by modifying the
 > ORDER objects so that they point to elements of the arguments
 > array which is local to the cloned object. When thd->mem_root
 > is freed upon completing the execution, pointers in the ORDER
 > objects become invalid. Those ORDER objects, however, are also
 > shared with the original Item_func_group_concat object which is
 > preserved between executions of a prepared statement. So the
 > first call to find_order_in_list() for the original object on
 > the second execution tries to dereference an invalid pointer.
 >
 > The solution is to create copies of the ORDER objects when
 > copying Item_func_group_concat to not leave any stale pointers
 > in other instances with different lifecycles.
2010-12-14 23:52:53 +03:00
Luis Soares
1a5c17a464 BUG 46697
Automerging mysql-5.1-bugteam into mysql-5.5-bugteam.
2010-12-14 17:35:40 +00:00
Luis Soares
e4ad12dcc6 BUG#46697
Autmoerging into latest mysql-5.1-bugteam.
2010-12-14 17:33:45 +00:00
Luis Soares
1d0eae6fca BUG 46697
Addressing review comments.
2010-12-14 16:43:25 +00:00
Luis Soares
089327bff3 BUG 46697: automerged bzr bundle from bug report. 2010-12-14 16:41:41 +00:00