Commit graph

61731 commits

Author SHA1 Message Date
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
Joerg Bruehe
c2676e2b5d Part of the fixes for bug#49022
Plugins included into bin release cannot be
    installed on debug version of server

IF    the build process was split into separate "debug" and
      "optimized" builds
   AND
      the plugin files of the debug build got copied into
      "plugin/debug/"
(both is done for MySQL release builds starting from 5.5.3),
THEN these debug plugin files are to be included in the
     final binary package.

This change deals with the inclusion only,
the other parts are done in different changesets.
2010-03-10 10:48:43 +01:00
Mats Kindahl
5cc3792fd3 Merging with mysql-next-mr-bugfixing 2010-03-10 10:41:19 +01:00
Vladislav Vaintroub
cb0d6611a3 Bug#51607: Automake distcheck target broken.
Reason for the error was that ./configure wrapper script was  not 
safe for VPATH builds used by "make distcheck", specifically it expected configure.am to be in the current directory.

Fix changes configure wrapper to resolve script names relative 
to configure script path.

Also, use $top_srcdir/configure.am instead of configure.am in dist-hook to be more VPATH friendly.
2010-03-09 22:51:36 +01:00
Marc Alff
dbdd83a4da Bug#51878 Build break in HPUX involving mysql_prlock on a client
This is a fix specific for HPUX,
for which the compiler does not resolve properly dependencies
involving unused inline functions.
(See existing comments in mysql_thread.h)

In include/mysql/psi/mysql_thread.h,
the instrumentation helpers for mysql_prlock_*
uses the pr lock apis.

These apis are implemented in mysys/thr_rwlock.c,
which is not linked to client code.

As a result, the code does not link in libmysql_r, on HPUX.

The fix is to cut dependencies explicitely,
by introducing -DDISABLE_MYSQL_RWLOCK_H,
when building client code.
2010-03-09 11:03:02 -07: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
Tor Didriksen
58d05caec1 Bug#50888 valgrind warnings in Field_timestamp::val_str
Ensure that we store the correct cached_field_type whenever we cache Field items
(in this case it allows us to compare dates as dates, rather than strings)
2010-03-09 15:54:12 +01:00
Alexander Nozdrin
cfffc11dd7 pfs_upgrade.test is a case-sensitive test. 2010-03-09 18:05:19 +03:00
Davi Arnaut
ea09256c74 Bug#47761: crash when killing a query during subquery execution...
The problem was that killing a query during the optimization
phase of a subselect would lead to crashes. The root of the
problem is that the subselect execution engine ignores failures
(eg: killed) during the optimization phase (JOIN::optimize),
leading to a crash once the subquery is executed due to
partially initialized structures (in this case a join tab).

The optimal solution would be to cleanup certain optimizer
structures if the optimization phase fails, but currently
there is no infrastructure to properly to track and cleanup
the structures. To workaround the whole problem one somewhat
good solution is to avoid executing a subselect if the query
has been killed. Cutting short any problems caused by failures
during the optimization phase.
2010-03-09 09:51:56 -03: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
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
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
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
Alexander Nozdrin
9c6482afc6 Auto-merge from mysql-next-mr-bugfixing. 2010-03-09 13:00:28 +03:00
Alexander Nozdrin
e37d1caf80 Auto-merge from mysql-trunk-bugfixing. 2010-03-09 12:57:58 +03:00
Alexander Nozdrin
f64f809e7b Auto-merge from mysql-next-mr. 2010-03-09 12:57:11 +03:00
Alexander Nozdrin
5f359837d3 Auto-merge from mysql-trunk. 2010-03-09 12:57:04 +03:00
Alexander Nozdrin
e8ef8a3efa Auto-merge from mysql-trunk. 2010-03-09 12:53:13 +03:00
Alexander Nozdrin
35f5e9c78c Bug#51832 mysql_upgrade failing on performance_schema tables in mysql-trunk
Before this fix, client tools (mysql_upgrade, mysqlcheck, mysqldump)
would try to process performance schema tables, leading to failures.

The fix is to align FIRST_PERFORMANCE_SCHEMA_VERSION to 5.5.3,
which is the version number of mysql-trunk where the
performance schema is first available.
2010-03-09 12:52:11 +03: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
Georgi Kodinov
75ac623404 null merge 2010-03-08 12:42:01 +02:00
Georgi Kodinov
636058174a Backport of the fix for bug #51357 to 5.0-bugteam.:
Spatial indexes were not checking for out-of-record condition in
the handler next command when the previous command didn't found
rows.

Fixed by making the rtree index to check for end of rows condition
before re-using the key from the previous search.

Fixed another crash if the tree has changed since the last search.
Added a test case for the other error.
2010-03-08 12:39:57 +02:00
Vladislav Vaintroub
7b67a275ad merge 2010-03-08 00:33:07 +01:00