Commit graph

60234 commits

Author SHA1 Message Date
Alexey Kopytov
4db97ede5b Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts:

Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/r/explain.result
Text conflict in mysql-test/r/subselect.result
Text conflict in mysql-test/r/subselect3.result
Text conflict in mysql-test/r/type_datetime.result
Text conflict in sql/share/Makefile.am
2010-03-12 12:51:53 +03: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
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
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
Alexey Kopytov
d2452095a5 Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in .bzr-mysql/default.conf
Text conflict in mysql-test/r/explain.result
Text conflict in mysql-test/r/having.result
Text conflict in mysql-test/suite/rpl/t/disabled.def
Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test
Text conflict in storage/federated/ha_federated.cc
2010-03-07 19:40:59 +03:00
Gleb Shchepa
897863813e Bug #39653: find_shortest_key in sql_select.cc does not
consider clustered primary keys

Choosing a shortest index for the covering index scan,
the optimizer ignored the fact, that the clustered primary
key read involves whole table data.

The find_shortest_key function has been modified to
take into account that fact that a clustered PK has a
longest key of possible covering indices.
2010-03-05 23:45:55 +04:00
Tatiana A. Nurnberg
fd7bf5bcf7 auto-merge 2010-03-05 17:45:29 +00:00
Tatiana A. Nurnberg
f2a7a574a4 manual merge 2010-03-05 16:44:37 +00:00
Ramil Kalimullin
c2b9fdb055 Fix for bug#32426: "FEDERATED query returns corrupt results
for ORDER BY on a TEXT or VARCHAR field" backported to 5.1.
2010-03-05 14:51:37 +04:00
Georgi Kodinov
557ba4896b Bug #51357: crash when using handler commands on spatial indexes
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-04 18:13:08 +02:00
Joerg Bruehe
fc4d400a3e Use a new version of "COPYING", the GPL text.
This is *no* change in contents, the differences are formatting only
and an address update of the FSF. It continues to be Version 2, June 1991.
2010-03-04 14:26:27 +01:00
Tatiana A. Nurnberg
b1e6ccca56 auto-merge 2010-03-04 12:47:58 +00:00
Tatiana A. Nurnberg
3bf394b415 auto-merge 2010-03-04 12:39:29 +00:00
Tatiana A. Nurnberg
ef7f79eea9 auto-merge 2010-03-04 12:23:05 +00:00
Luis Soares
24f7afe7bc BUG#51226: mysqlbinlog replay: ERROR 1146 when using temp tables
+ failing statements

Implicit DROP event for temporary table is not getting
LOG_EVENT_THREAD_SPECIFIC_F flag, because, in the previous
executed statement in the same thread, which might even be a
failed statement, the thread_specific_used flag is set to
FALSE (in mysql_reset_thd_for_next_command) and not set to TRUE
before connection is shutdown. This means that implicit DROP
event will take the FALSE value from thread_specific_used and
will not set LOG_EVENT_THREAD_SPECIFIC_F in the event header. As
a consequence, mysqlbinlog will not print the pseudo_thread_id
from the DROP event, because one of the requirements for the
printout is that this flag is set to TRUE.

We fix this by setting thread_specific_used whenever we are
binlogging a DROP in close_temporary_tables, and resetting it to
its previous value afterward.
2010-03-03 12:16:18 +00:00
Sergey Vojtovich
1a9c3717f1 BUG#48265 - MRG_MYISAM problem (works in 5.0.85, does't
work in 5.1.40)

MERGE engine fails to open child table from a different
database if child table/database name contains characters
that are subject for table name to filename encoding
(WL1324).

Another problem is that MERGE engine didn't properly open
child table from the same database if child table name
contains characters like '/', '#'.

The problem was that table name to file name encoding was
applied inconsistently:
* On CREATE: encode table name + database name if child
  table is in different database; do not encode table
  name if child table is in the same database;
* No decoding on open.

With this fix child table/database names are always
encoded on CREATE and decoded on open. Compatibility
with older tables preserved.

Along with this patch comes fix for SHOW CREATE TABLE,
which used to show child table/database path instead
of child table/database names.
2010-03-03 14:49:03 +04:00
Tatiana A. Nurnberg
64cce948b8 auto-merge 2010-03-02 20:59:50 +00:00
Tatiana A. Nurnberg
fd7a531373 auto-merge 2010-03-02 20:40:11 +00:00
Tatiana A. Nurnberg
b4faea2aa0 manual merge 2010-03-02 18:13:43 +00:00
Tatiana A. Nurnberg
87b4d36e5c Bug#48295: explain extended crash with subquery and ONLY_FULL_GROUP_BY sql
If an outer query is broken, a subquery might not even get set up.
EXPLAIN EXTENDED did not expect this and merrily tried to de-ref all
of the half-setup info.

We now catch this case and print as much as we have, as it doesn't cost us
anything (doesn't make regular execution slower).

backport from 5.1
2010-03-02 18:00:53 +00:00
Tatiana A. Nurnberg
ff7f4bb9fa auto-merge 2010-03-02 16:18:16 +00:00
Georgi Kodinov
2e9045c8fd Moved the ndb related tests out of the per-push pb2 run to the daily pb2 run. 2010-03-02 14:43:21 +02:00
Sergey Vojtovich
1613b3e1dd BUG#51307 - widespread corruption with partitions and
insert...select

Queries following bulk insert into an empty MyISAM table
may break it. This was pure MyISAM problem.

When bulk insert into an empty table is complete, MyISAM
may want to enable indexes via repair by sort. If repair
by sort fails (e.g. insufficient buffer), MyISAM failover
to repair with key cache, requesting repair of data file.

Repair of data file performs data file substitution. This
means that current table instance will point to new data
file. Other cached table instances are still pointing to
an old, deleted data file.

This is fixed by not requesting repair of data file
during enable indexes.

Explicit REPAIR is not affected, since it flushes all
table instances.
2010-03-02 13:45:50 +04:00
Alexander Nozdrin
0c01d8d86c Remove test from experimental because Bug 45578 and 46010 are fixed. 2010-03-02 10:22:33 +03:00
Alexander Nozdrin
fe6e3bf20a Manual merge from mysql-5.1.
Conflicts:
  - support-files/mysql.spec.sh
  - configure.in
2010-03-01 21:49:06 +03:00