Commit graph

59322 commits

Author SHA1 Message Date
Mattias Jonsson
b3f162ae33 Additional fix for DEBUG_SYNC which failed for some rpl-tests,
due to DBUG_ASSERT. (added in bug#50561)
2010-03-18 14:04:19 +01:00
Mattias Jonsson
3b897f2bc5 Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query

There were two problem:
1) MYSQL_LOCK_IGNORE_FLUSH also ignored name locks
2) there was a race between abort_and_upgrade_locks and
   alter_close_tables
   (i.e. remove_table_from_cache and
    close_data_files_and_morph_locks)

Which allowed the table to be opened with MYSQL_LOCK_IGNORE_FLUSH flag
resulting in renaming a partition that was already in use,
which could cause the table to be unusable.

Solution was to not allow IGNORE_FLUSH to skip waiting for
a named locked table.

And to not release the LOCK_open mutex between the
calls to remove_table_from_cache and
close_data_files_and_morph_locks by merging the functions
abort_and_upgrade_locks and alter_close_tables.
2010-03-17 15:10:41 +01:00
Sergey Vojtovich
8d514f2145 Merge fix for BUG47444 to mysql-5.1-bugteam. 2010-03-16 21:33:56 +04:00
Martin Hansson
5fa73f08d0 Merge of fix for Bug#47762. 2010-03-16 17:21:38 +01:00
Martin Hansson
7cb796717e Bug#47762: Incorrect result from MIN() when WHERE tests NOT
NULL column for NULL

The optimization to read MIN() and MAX() values from an
index did not properly handle comparisons with NULL
values. Fixed by giving up the particular optimization step
if there are non-NULL safe comparisons with NULL values, as 
the result is NULL anyway.

Also, Oracle copyright notice was added to all files.
2010-03-16 15:51:00 +01:00
Mattias Jonsson
9ecdd588c5 merge 2010-03-16 15:09:58 +01:00
Sergey Vojtovich
88cc391550 Merge fix for BUG47444 to mysql-5.1-bugteam. 2010-03-16 18:06:03 +04:00
Sergey Vojtovich
5522afe11a Plugin author, description and version are available
via I_S.PLUGINS, not via SHOW PLUGINS.
2010-03-16 17:15:19 +04:00
Luis Soares
6eff109177 Automerge: mysql-5.1-bugteam bug branch --> mysql-5.1-bugteam latest. 2010-03-16 11:47:15 +00:00
Martin Hansson
f8a1823af3 Bug#50918: Date columns treated differently in Views than in
Base Tables

The type inferrence of a view column caused the result to be
interpreted as the wrong type: DATE colums were interpreted
as TIME and TIME as DATETIME. This happened because view
columns are represented by Item_ref objects as opposed to
Item_field's. Item_ref had no method for retrieving a TIME
value and thus was forced to depend on the default
implementation for any expression, which caused the
expression to be evaluated as a string and then parsed into
a TIME/DATETIME value.

Fixed by letting Item_ref classes forward the request for a
TIME value to the referred Item - which is a field in this
case - this reads the TIME value directly without
conversion.
2010-03-16 10:20:07 +01:00
Davi Arnaut
7dca134c47 Bug#51289: double Item_cache_decimal::val_real() is broken
Fix up function return value, it must return a double.
2010-03-15 09:07:16 -03:00
Staale Smedseng
3f4d8edb84 Bug #49829 Many "hides virtual function" warnings with
SunStudio
      
SunStudio compilers of late warn about methods that might hide
methods in base classes due to the use of overloading combined
with overriding. SunStudio also warns about variables defined
in local socpe or method arguments that have the same name as
a member attribute of the class.
      
This patch renames methods that might hide base class methods,
to make it easier both for humans and compilers to see what is
actually called. It also renames variables in local scope.
2010-03-14 17:01:45 +01:00
Davi Arnaut
0e9451186d Post-merge fix: replace plugin extension output. 2010-03-14 08:16:59 -03:00
Davi Arnaut
d9f1abe995 Post-merge fix: remove unnecessary flush privileges. 2010-03-13 18:32:42 -03:00
Mattias Jonsson
6654e2a571 merge 2010-03-12 11:52:38 +01:00
Sergey Vojtovich
4762eb64ec BUG#47444 - --myisam_repair_threads>1can result in all
index cardinalities=1

Parallel repair didn't poroperly update index cardinality
in certain cases.

When myisam_sort_buffer_size is not enough to store all
keys, index cardinality was updated before index was
actually written, when no index statistic is available.
2010-03-12 14:43:30 +04:00
Mattias Jonsson
234e7c2392 merge 2010-03-12 11:41:29 +01:00
Mattias Jonsson
da26454dcb merged 2010-03-12 11:14:40 +01:00
Mattias Jonsson
c3418cd038 Bug#48229: group by performance issue of partitioned table
Additional result file update
2010-03-12 11:14:04 +01:00
Mattias Jonsson
8e2ea6efa9 merge 2010-03-11 14:25:33 +01:00
Mattias Jonsson
cb6d0e3cac merge 2010-03-11 14:18:44 +01:00
Georgi Kodinov
cbfdc588e9 Bug #44178: mysql cli does not comply with GPLv2 clause 2c
Applied a path from Jim Winstead : Added a GPL notice.
Added the missing '(c)' and 'v2'.
2010-03-11 15:16:54 +02:00
Sergey Vojtovich
a955cc035a Merge fix for BUG48265 to mysql-5.1-bugteam. 2010-03-11 18:28:39 +04:00
Sergey Vojtovich
1e2eb3cd46 Merge mysql-5.1 to mysql-5.1-bugteam. 2010-03-11 15:19:01 +04:00
Martin Hansson
2cc8c47b93 Bug#50545: Single table UPDATE IGNORE crashes on
join view in sql_safe_updates mode. 

This bug was unexpectedly fixed along with bug 
number 49534. This patch contains only the test
case.
2010-03-10 17:10:05 +01:00
Sergey Vojtovich
8795907e11 Merge an addition to BUG51342 5.0-bugteam -> 5.1-bugteam. 2010-03-10 19:31:22 +04:00
Sergey Vojtovich
774cba9505 An addition to fix for
BUG#51342 - more xid crashing

Restore autocommit variable by supplying explicit value.
2010-03-10 19:28:49 +04:00
Sergey Vojtovich
1e92b0fbe8 Merge fix for BUG51307 to 5.1-bugteam. 2010-03-10 16:32:12 +04:00
Sergey Vojtovich
64c6882ea9 Merge fix for BUG51342 to 5.1-bugteam. 2010-03-10 16:26:39 +04:00
Mattias Jonsson
f83e302a13 Bug#51830: Incorrect partition pruning on range partition
(regression)

Problem was that partition pruning did not exclude the
last partition if the range was beyond it
(i.e. not using MAXVALUE)

Fix was to not include the last partition if the
partitioning function value was not within the partition
range.
2010-03-10 12:56:05 +01:00
Sergey Vojtovich
f4fe07f21f Merge fix for BUG51342 to 5.0-bugteam. 2010-03-10 15:07:35 +04:00
Sergey Vojtovich
8478e707d9 BUG#51342 - more xid crashing
SET autocommit=1 while XA transaction is active may
cause various side effects, including memory corruption
and server crash.

The problem is that SET autocommit=1 and further queries
attempt to commit local transaction, whereas XA transaction
is still active.

As local and XA transactions are mutually exclusive, this
patch forbids enabling autocommit mode while XA transaction
is active.
2010-03-10 15:04:32 +04:00
Georgi Kodinov
c8d9077505 merge 2010-03-10 12:22:08 +02:00
Georgi Kodinov
51215498a0 merge 2010-03-10 12:19:49 +02:00
Georgi Kodinov
515cba2019 merged the test disablement because of bug 51357 to 5.0-bugteam 2010-03-10 12:11:39 +02:00
Georgi Kodinov
a774c83c2f Bug #35250: readline check breaks when doing vpath build
MySQL uses two source layouts when building : the bzr 
layout and the source package layout.
The previous fix for bug 35250 contained 1 change that is
valid for both modes and a number of changes that are valid
only for the bzr source layout.
The important thing was to fix the source package layout.
And for this the change in configure.in was sufficient.
It's not trivial (and not requested by this bug) to support 
VPATH builds from the bzr trees.
This is why the other changes are reverted and the change to
fix the VPATH build for source distributions is left intact.
2010-03-09 17:51:31 +02:00
Luis Soares
56f42962ff Automerge: bzr bundle (post-push fix) in bug report --> mysql-5.1-bugteam-pp-fix 2010-03-10 00:07:33 +00:00
Luis Soares
2c23e00a33 Post-push fix for BUG#51251.
The test case added in previous patch missed a RESET MASTER on
test start up. Without it, showing binary log contents can
sometimes show spurious entries from previously executed tests,
ultimately causing test failure - result mismatch.

The test file was added in:
revid:luis.soares@sun.com-20100224190153-k0bpdx9abe88uoo2

This patch also moves the test case into binlog_innodb_row.test
file. This way we avoid having yet another test file,
binlog_row_innodb_truncate.test, whose only purpose is to host
one test case. This had been actually suggested during original
patch review, but somehow the binlog_innodb_row was missed when
searching for a file to host the test case.
2010-03-09 23:41:21 +00:00
Davi Arnaut
91223c4d25 Bug#51770: UNINSTALL PLUGIN requires no privileges
The problem was that UNINSTALL PLUGIN wasn't performing privilege
checks before removing a plugin. Any user (including users without 
any kind of privileges) could uninstall any plugin.

The solution is to verify if the user has the DELETE privilege for
the mysql.plugin table before uninstalling a plugin.
2010-03-09 09:16:17 -03:00
Sergey Glukhov
64de23433d Bug#41788 mysql_fetch_field returns org_table == table by a view
The problem is that Item_direct_view_ref which is inherited
from Item_ident updates orig_table_name and table_name with
the same values. The fix is introduction of new constructor
into Item_ident and up which updates orig_table_name and
table_name separately.
2010-03-12 10:33:16 +04:00
Georgi Kodinov
25a271a0f8 Bug #41057: mysql_update fails FATAL ERROR: Failed to create temporary file for defaults
mysql_upgrade was passing an non-initialized non-null tmpdir to create_temp_file() if no 
--tmpdir was specified. This prevents create_temp_file() from taking the system 
temporary file path and as a result mysql_upgrade was trying to open a file in a 
directory that it may not have write access to.
Fixed by making sure mysql_upgrade will pass a zero length temp dir string to 
create_temp_file() if no --tmpdir is specified.
2010-03-09 11:18:46 +02:00
Georgi Kodinov
d5991c13bd Addendum to the test for bug 51357 : disable the (possibly binary)
output from HANDLER ... READ .. NEXT ...
2010-03-09 15:46:27 +02:00
Luis Soares
d8eda3d299 Automerge BUG 51251 incremental bundle --> mysql-5.1-bugteam. 2010-03-09 00:03:15 +00:00
Luis Soares
b0206c71af Automerge BUG 51251 bundle from bug report --> mysql-5.1-bugteam. 2010-03-09 00:02:28 +00:00
Luis Soares
888a354bb8 Automerge BUG 51226 bzr bundle from bug report --> myqsl-5.1-bugteam. 2010-03-08 23:57:26 +00:00
Luis Soares
0e2cc47c0c Automerge: BUG 48993 bundle from bug report --> mysql-5.1-bugteam. 2010-03-08 23:55:19 +00:00
Davi Arnaut
096cb4c6de Bug#37316: Anonymous error messages noticed sometimes, while running tests in MTR
The problem was that mysqltest could attempt to execute a
SHOW WARNINGS statement through a connection that was not
properly reaped, thus violating its own rules.

The solution is to skip SHOW WARNINGS if a connection has
not been properly repeaed.
2010-03-08 11:30:20 -03:00
Davi Arnaut
301b0786dd Bug#40277: SHOW CREATE VIEW returns invalid SQL
The problem is that not all column names retrieved from a SELECT
statement can be used as view column names due to length and format
restrictions. The server failed to properly check the conformity
of those automatically generated column names before storing the
final view definition on disk.

Since columns retrieved from a SELECT statement can be anything
ranging from functions to constants values of any format and length,
the solution is to rewrite to a pre-defined format any names that
are not acceptable as a view column name.

The name is rewritten to "Name_exp_%u" where %u translates to the
position of the column. To avoid this conversion scheme, define
explict names for the view columns via the column_list clause.
Also, aliases are now only generated for top level statements.
2010-03-09 07:36:26 -03:00
Davi Arnaut
154fcda822 Bug#51650: crash with user variables and triggers
The problem was that bits of the destructive equality propagation
optimization weren't being undone after the execution of a stored
program. Modifications to the parse tree that are based on transient
properties must be undone to enable the re-execution of stored
programs.

The solution is to cleanup any references to predicates generated
by the equality propagation during the execution of a stored program.
2010-03-09 18:55:08 -03:00
Georgi Kodinov
bfd837cc82 Disable the second part of the test for bug #51357 until bug #51877 is fixed. 2010-03-09 19:00:15 +02:00