Commit graph

66718 commits

Author SHA1 Message Date
Georgi Kodinov
684c3e9e3d merge from 5.5-merge 2010-09-02 16:57:59 +03:00
Alexander Nozdrin
f8f23158c7 Auto-merge from mysql-5.5. 2010-09-01 17:17:57 +04:00
Alexander Nozdrin
afe9d44c3a Auto-merge from mysql-5.5-stage. 2010-09-01 16:59:52 +04:00
Davi Arnaut
0ce793faf6 Bug#55846: Link tests fail on Windows - my_compiler.h missing
Make the my_compiler.h header, like my_attribute.h, part of
the distribution. This is required due to the dependency of
the former on the latter (which can undefine __attribute__).
2010-08-31 11:28:22 -03:00
Alexander Nozdrin
e4a7db6c67 Auto-merge from mysql-5.5-merge. 2010-08-31 11:55:41 +04:00
Gleb Shchepa
4c47c78c41 automerge 5.1-bugteam --> 5.5-merge (bug 53034) 2010-08-31 02:22:01 +04:00
Gleb Shchepa
9554b7ac6e Bug #53034: Multiple-table DELETE statements not accepting
"Access compatibility" syntax

The "wild" "DELETE FROM table_name.* ... USING ..." syntax
for multi-table DELETE statements is documented but it was
lost in the fix for the bug 30234.

The table_ident_opt_wild parser rule has been added
to restore the lost syntax.
2010-08-31 02:16:38 +04:00
Alexander Nozdrin
dc195adf34 Auto-merge from mysql-5.5-merge. 2010-08-30 18:07:40 +04:00
Dmitry Shulga
05482f3c7b Follow-up for Bug#29751: FLUSH LOGS doesn't create -old file,
so test case has to be updated.
2010-08-30 16:09:28 +07:00
Alexander Nozdrin
862af4eeaa Auto-merge from mysql-5.5. 2010-08-30 12:36:02 +04:00
Alexander Nozdrin
a87059b940 Disable 'plugin*' tests due to Bug 55966. 2010-08-30 12:32:53 +04:00
Alexander Nozdrin
2c89cb23af Auto-merge from mysql-5.5-bugfixing. 2010-08-30 12:27:27 +04:00
Alexey Kopytov
0a95aff58a Automerge. 2010-08-30 11:36:04 +04:00
Alexander Nozdrin
19908377b8 Update result files. 2010-08-28 20:36:17 +04:00
Marc Alff
7357081989 local merge 2010-08-27 15:23:37 -06:00
Sergey Vojtovich
ab2414577a Merge 5.1-bugteam to 5.5-merge. 2010-08-27 15:33:32 +04:00
Alexey Kopytov
b409a2218e Bug #54465: assert: field_types == 0 || field_types[field_pos]
== MYSQL_TYPE_LONGLONG

A MIN/MAX() function with a subquery as its argument could lead
to a debug assertion on debug builds or wrong data on release
ones.

The problem was a combination of the following factors:

- Item_sum_hybrid::fix_fields() might use the argument
(args[0]) to calculate 'hybrid_field_type' which was later used
to decide how the data should be sent to the client.

- Item_sum::make_field() might use the argument again to
calculate the field's type when sending result set metadata to
the client.

- The argument could be changed in between these two calls via
  Item::set_arg() leading to inconsistent metadata being
  reported.

Here is what was happening for the bug's test case:

1. Item_sum_hybrid::fix_fields() calculates hybrid_field_type
as MYSQL_TYPE_LONGLONG based on args[0] which is an
Item::SUBSELECT_ITEM at that time.

2. A temporary table is created to execute the
query. create_tmp_field_from_item() creates a Field_long object
according to the subselect's max_length.

3. The subselect item in Item_sum_hybrid is replaced by the
Item_field object referencing the newly created Field_long.

4. Item_sum::make_field() rightfully returns the
MYSQL_TYPE_LONG type when calculating the result set metadata.

5. When sending the actual data, Item::send() relies on the
virtual field_type() function which in our case returns
previously calculated hybrid_field_type == MYSQL_TYPE_LONGLONG.

It looks like the only solution is to never refer to the
argument's metadata after the result metadata has been
calculated in fix_fields(), since the argument itself may be
different by then. In this sense, Item_sum::make_field() should
never be used, because it may rely on the argument's metadata
and is only called after fix_fields(). The "default"
implementation in Item::make_field() should be used instead as
it relies only on field_type(), but not on the argument's type.

Fixed by removing Item_sum::make_field() so that the superclass
implementation Item::make_field() is always used.
2010-08-27 13:44:35 +04:00
Ramil Kalimullin
1087cfc4d5 Fix for bug #54253: memory leak when using I_S plugins w/o deinit method
Free memory allocated by the server for all plugins,
with or without deinit() method.
2010-08-27 11:44:06 +04:00
Sergey Vojtovich
c2c833e493 Merge fix for BUG52821 to 5.5-bugfixing. 2010-08-27 11:13:00 +04:00
Sergey Vojtovich
7ceb92ff43 BUG#52821 - plugin_ftparser.h and plugin_audit.h are
not tested by ABI check

plugin_audit.h and plugin_ftparser.h are now subject
for ABI check. plugin.h is now tested implicitly.

Also fixed broken ABI check cmake rules.
2010-08-27 10:45:35 +04:00
Marc Alff
fe3221d6a9 local merge 2010-08-26 15:21:23 -06:00
Christopher Powers
f84adb9ec8 Bug# 53874 "SETUP_INSTRUMENTS.TIMED='NO' should not change TIMER_WAIT
Handle combined instrument states of ENABLED and/or TIMED:

ENABLED TIMED
1 1 Aggregate stats, increment counter
1 0 Increment counter
0 1 Do nothing
0 0 Do nothing
2010-08-26 10:45:25 -05:00
Alexander Nozdrin
c88cfec29c Enable plugin tests (Bug 55966) to check if they still fail. 2010-08-26 19:29:44 +04:00
Marc Alff
81cdce4d22 local merge 2010-08-26 08:41:24 -06:00
Marc Alff
6d59a131d7 Implemented code review comments 2010-08-26 08:34:18 -06:00
Bjorn Munch
fba50f8401 Reduced #ifndef for 52301, caused compile warning 2010-08-26 15:14:50 +02:00
Alexey Kopytov
2df3a61c3f Automerge. 2010-08-26 16:36:48 +04:00
Alexander Barkov
3509fecfc1 Bug#42511 mysqld: ctype-ucs2.c:2044: my_strnncollsp_utf32: Assertion (tlen % 4) == 0' fai
Problem: trailing spaces were stripped using 8-bit code,
so the truncation result length was incorrect, which led
to an assertion failure.
Fix: using multi-byte safe code.
2010-08-26 16:36:33 +04:00
Alexey Kopytov
d39dbd1084 Automerge. 2010-08-26 16:35:38 +04:00
Sergey Vojtovich
0648087ca0 Fixed race condition in a test case for BUG#55580. 2010-08-26 15:23:44 +04:00
Alexey Kopytov
d63b9feb10 Automerge. 2010-08-26 14:17:27 +04:00
Alexey Kopytov
8a310d69f2 Automerge. 2010-08-26 14:15:40 +04:00
Alexey Kopytov
6c6a3e8f44 Bug #53544: Server hangs during JOIN query in stored procedure
called twice in a row

Queries with nested joins could cause an infinite loop in the
server when used from SP/PS.

When flattening nested joins, simplify_joins() tracks if the
name resolution list needs to be updated by setting
fix_name_res to TRUE if the current loop iteration has done any
transformations to the join table list. The problem was that
the flag was not reset before the next loop iteration leading
to unnecessary "fixing" of the name resolution list which in
turn could lead to a loop (i.e. circularly-linked part) in that
list. This was causing problems on subsequent execution when
used together with stored procedures or prepared statements.

Fixed by making sure fix_name_res is reset on every loop
iteration.
2010-08-26 14:13:02 +04:00
Evgeny Potemkin
151af144ff Bug #55656: mysqldump can be slower after bug 39653 fix.
After fix for bug 39653 the shortest available secondary index was used for
full table scan. Primary clustered key was used only if no secondary index
can be used. However, when chosen secondary index includes all fields of the
table being scanned it's better to use primary index since the amount of
data to scan is the same but the primary index is clustered.
Now the find_shortest_key function takes this into account.
2010-08-26 13:31:04 +04:00
Marc Alff
4c2de881de Bug#55873 short startup options do not work in 5.5
Before this fix, the server did not recognize 'short' (as in -a)
options but only 'long' (as in --ansi) options
in the startup command line, due to earlier changes in 5.5
introduced for the performance schema.

The root cause is that handle_options() did not honor the
my_getopt_skip_unknown flag when parsing 'short' options.

The fix changes handle_options(), so that my_getopt_skip_unknown is
honored in all cases.

Note that there are limitations to this,
see the added doxygen documentation in handle_options().

The current usage of handle_options() by the server to
parse early performance schema options fits within the limitations.
This has been enforced by an assert for PARSE_EARLY options, for safety.
2010-08-25 18:59:28 -06:00
Bjorn Munch
79aefacb04 merge followup fix for 52301 2010-08-25 22:49:52 +02:00
Marc Alff
b4dd6de474 Bug#52312 lost Handler_read_last status variable
Before this fix, the ha_read_last_count status variable was defined and
updated internally, for never exposed as a system variable.

This fix exposes the system variable as "Handler_read_last",
for completness of the Handler_read_* system variables interface.

Adjusted tests results accordingly.
2010-08-25 13:00:38 -06:00
Bjorn Munch
16b7af9ae0 Cherry pick 55501 2010-08-25 16:34:31 +02:00
joerg.bruehe@oracle.com
8560cafb1e Raise version number after cloning 5.5.6-m3 2010-08-25 16:05:33 +02:00
Alexey Botchkov
f0d2765cc3 mysqlhotcopy tests fixed.
The 'mysqlhotcopy' tool gets into bin/ directory after the installation
from the scripts/.
So check for it in that in the mysql-test-run.pl.

per-file comments:
  mysql-test/mysql-test-run.pl
Check the bin/ for mysqlhotcopy presence.
2010-08-25 18:55:22 +05:00
Alfranio Correia
700a1ea37b merge mysql-5.5-bugfixing (local) --> mysql-5.5-bugfixing 2010-08-25 15:15:07 +01:00
Alfranio Correia
4f37e847d6 Post-fix push for BUG#53452.
Updated the result files for ndb test cases.
2010-08-25 15:13:20 +01:00
Dmitry Shulga
2c379a1e26 Auto-merge from mysql-5.1-bugteam 2010-08-25 18:39:38 +07:00
Alexander Nozdrin
593c6db299 Auto-merge from mysql-5.5-merge. 2010-08-25 14:22:34 +04:00
Alexander Nozdrin
7c7be629a8 Auto-merge from mysql-5.5-bugfixing. 2010-08-25 13:20:02 +04:00
Alexander Nozdrin
640528ea5d Revert patch for Bug#56120 temporarily. 2010-08-25 13:17:45 +04:00
Dmitry Shulga
8520a9fd62 Fixed bug #29751 - do not rename the error log at FLUSH LOGS.
Added open log file with FILE_SHARE_DELETE flag on Windows.
2010-08-25 15:47:45 +07:00
Alexey Botchkov
106af5a926 merging. 2010-08-25 13:27:25 +05:00
Alexander Nozdrin
2ec0c11bc1 Re-commit patch for Bug#56120. 2010-08-25 13:21:54 +04:00
Bjorn Munch
a22b5651fd Bug #52301 Add --protocol to mysqltest
Added code resulted in strange linking problem for embedded on Windows
Avoided by not doing this for embedded mode
It's irrelevant for embedded server anyway, --protocol will be ignored
2010-08-25 10:23:19 +02:00