Commit graph

65886 commits

Author SHA1 Message Date
Davi Arnaut
8675070131 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-28 19:18:22 -03:00
Davi Arnaut
1b504ab0b1 Revert Bug#48321 due to build breakage and failing tests. 2010-06-28 17:59:41 -03:00
Davi Arnaut
22bf4fa650 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-28 17:32:09 -03:00
Davi Arnaut
aa1dddd5ca Merge of mysql-5.0-bugteam into mysql-5.1-bugteam. 2010-06-28 17:29:19 -03:00
Davi Arnaut
20cc561dfa Bug#54457: Test suite broken for 32-bit build
The default value of the myisam_max_extra_sort_file_size could be
higher than the maximum accepted value, leading to warnings upon
the server start.

The solution is to simply set the value to the maximum value in a
32-bit built (2147483647, one less than the current). This should
be harmless as the option is currently unused in 5.1.
2010-06-28 16:20:28 -03:00
Davi Arnaut
07767edcce Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run
The problem was that a user could supply supply data in chunks
via the COM_STMT_SEND_LONG_DATA command to prepared statement
parameter other than of type TEXT or BLOB. This posed a problem
since other parameter types aren't setup to handle long data,
which would lead to a crash when attempting to use the supplied
data.

Given that long data can be supplied at any stage of a prepared
statement, coupled with the fact that the type of a parameter
marker might change between consecutive executions, the solution
is to validate at execution time each parameter marker for which
a data stream was provided. If the parameter type is not TEXT or
BLOB (that is, if the type is not able to handle a data stream),
a error is returned.
2010-06-28 12:21:28 -03:00
Alfranio Correia
0fadb6d25b null-merge 2010-06-27 18:37:17 +01:00
Alfranio Correia
353e11070f merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2010-06-27 18:31:42 +01:00
c943bc7bbb Manual merge 2010-06-27 13:51:45 +08:00
899a1d694f The following statements support the CURRENT_USER() where a user is needed.
DROP USER 
RENAME USER CURRENT_USER() ...
GRANT ... TO CURRENT_USER()
REVOKE ... FROM CURRENT_USER()
ALTER DEFINER = CURRENT_USER() EVENTbut, When these statements are binlogged, CURRENT_USER() just is binlogged
as 'CURRENT_USER()', it is not expanded to the real user name. When slave 
executes the log event, 'CURRENT_USER()' is expand to the user of slave 
SQL thread, but SQL thread's user name always NULL. This breaks the replication.

After this patch, session's user will be written into query log events 
if these statements call CURREN_USER() or 'ALTER EVENT' does not assign a definer.
2010-06-27 12:42:06 +08:00
Jon Olav Hauglid
f8f7a704ee null-merge from mysql-5.1-bugteam. 2010-06-26 22:29:17 +02:00
Jon Olav Hauglid
9fa66b6440 Bug #54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER
This deadlock happened if DROP DATABASE was blocked due to an open
HANDLER table from a different connection. While DROP DATABASE
is blocked, it holds the LOCK_mysql_create_db mutex. This results
in a deadlock if the connection with the open HANDLER table tries
to execute a CREATE/ALTER/DROP DATABASE statement as they all
try to acquire LOCK_mysql_create_db.

This patch makes this deadlock scenario very unlikely by closing and
marking for re-open all HANDLER tables for which there are pending
conflicing locks, before LOCK_mysql_create_db is acquired.
However, there is still a very slight possibility that a connection
could access one of these HANDLER tables between closing/marking for
re-open and the acquisition of LOCK_mysql_create_db.

This patch is for 5.1 only, a separate and complete fix will be
made for 5.5+.

Test case added to schema.test.
2010-06-26 19:36:00 +02:00
Alexander Nozdrin
7841332609 Auto-merge from mysql-trunk. 2010-06-26 11:34:02 +04:00
Georgi Kodinov
5e0aaa2613 merge 2010-06-25 16:32:47 +03:00
Georgi Kodinov
2b2e09086c merge 2010-06-25 16:20:22 +03:00
Sergey Glukhov
8241532516 5.1-bugteam->trunk-merge merge 2010-06-25 12:08:54 +04:00
Sergey Glukhov
700f8add12 Bug#54422 query with = 'variables'
During creation of the table list of
processed tables hidden I_S table 'VARIABLES'
is erroneously added into the table list.
it leads to ER_UNKNOWN_TABLE error in
TABLE_LIST::add_table_to_list() function.
The fix is to skip addition of hidden I_S
tables into the table list.
2010-06-25 12:01:47 +04:00
Ramil Kalimullin
56dc363dbc Automerge. 2010-06-24 21:19:25 +04:00
Ramil Kalimullin
479d24a213 Accidentally pushed test changes (#54459) removed. 2010-06-24 21:13:08 +04:00
Martin Hansson
0611703f62 Merge of fix for Bug#41660. 2010-06-24 16:01:17 +02:00
Martin Hansson
dac59fa9c3 Bug#41660: Sort-index_merge for non-first join table may
require O(#scans) memory

When an index merge operation was restarted, it would
re-allocate the Unique object controlling the duplicate row
ID elimination. Fixed by making the Unique object a member
of QUICK_INDEX_MERGE_SELECT and thus reusing it throughout
the lifetime of this object.
2010-06-24 15:21:23 +02:00
Ramil Kalimullin
346098549a Automerge. 2010-06-24 15:29:53 +04:00
Ramil Kalimullin
a08780df98 Automerge. 2010-06-24 15:26:14 +04:00
Alexey Kopytov
fce42b01c9 Automerge. 2010-06-24 14:49:19 +04:00
Alexey Kopytov
c34caf25e3 Automerge. 2010-06-24 14:47:48 +04:00
Alexey Kopytov
8b9e56b773 Automerge. 2010-06-24 14:47:09 +04:00
Alexey Kopytov
1f74e5f3a8 Automerge. 2010-06-24 14:43:39 +04:00
Ramil Kalimullin
389c68a8d4 Automerge. 2010-06-24 12:34:05 +04:00
Ramil Kalimullin
0d7eb317b5 Accidentally pushed test changes (#54459) removed. 2010-06-24 12:31:01 +04:00
Ramil Kalimullin
e233dc2bfd Fix for bug #54459: Assertion failed: param.sort_length,
file .\filesort.cc, line 149 (part II)

Problem: the server didn't disregard sort order 
for some zero length tuples.

Fix: skip sort order in such a case 
(zero length NOT NULL string functions).
2010-06-24 12:00:48 +04:00
sunanda
e0aba0c84b Updated the version number 2010-06-23 10:31:33 +02:00
sunanda
ef745c9112 Made the changes as per Kent/wlad to include http://lists.mysql.com/commits/111802 2010-06-23 10:23:41 +02:00
Alexey Kopytov
07e95b39c4 Bug#54477: Crash on IN / CASE with NULL arguments
Incorrect handling of NULL arguments could lead to a crash on
the IN or CASE operations when either NULL arguments were
passed explicitly as arguments (IN) or implicitly generated by
the WITH ROLLUP modifier (both IN and CASE).

Item_func_case::find_item() assumed all necessary comparators
to be instantiated in fix_length_and_dec(). However, in the
presence of WITH ROLLUP modifier, arguments could be
substituted with an Item_null leading to an "unexpected"
STRING_RESULT comparator being invoked.

In addition to the problem identical to the above,
Item_func_in::val_int() could crash even with explicitly passed
NULL arguments due to an optimization in fix_length_and_dec()
leading to NULL arguments being ignored during comparators
creation.
2010-06-22 22:53:08 +04:00
Vasil Dimov
149d305484 Merge mysql-trunk -> mysql-trunk-merge 2010-06-22 18:58:28 +03:00
Alexander Nozdrin
13495faeb7 Auto-merge from mysql-trunk-bugfixing. 2010-06-22 17:01:39 +04:00
Magne Mahre
b4f77c40ec Post-push fixups for WL#5349 2010-06-22 12:13:47 +02:00
Alexander Nozdrin
bba0a92d03 Auto-merge from mysql-trunk-stage. 2010-06-21 17:08:16 +04:00
Sergey Glukhov
bc401730d6 5.1-bugteam->trunk-merge merge 2010-06-21 15:19:14 +04:00
Sergey Glukhov
f48306344a Bug#50389 Using intersect does not return all rows
In process of record search it is not taken into account
that inital quick->file->ref value could be inapplicable
to range interval. After proper row is found this value is
stored into the record buffer and later the record is
filtered out at condition evaluation stage.
The fix is store a refernce of found row to the handler ref field.
2010-06-21 15:09:58 +04:00
Joerg Bruehe
4d5d3553bf Automerge part of mysql-trunk-bugfixing into mysql-trunk-merge. 2010-06-21 12:52:03 +02:00
Daniel Fischer
915bfb505e Fixed a readability optimization in CMake code that broke IPv6 support. 2010-06-21 10:59:54 +02:00
Alexander Nozdrin
36348425da Fix tree name. 2010-06-21 11:56:43 +04:00
Magne Mahre
eda2ff8103 Post-push fixup for WL#5349
InnoDB came in a new version "simultanously" with the
commit.  This patch is a minor change to the new innodb
regression test suite.
2010-06-20 22:43:34 +02:00
Ramil Kalimullin
9b07b12b3d Fix for bug #54575: crash when joining tables with unique set column
Problem: a flaw (derefencing a NULL pointer) in the LIKE optimization
code may lead to a server crash in some rare cases.

Fix: check the pointer before its dereferencing.
2010-06-20 02:02:58 +04:00
Ramil Kalimullin
936a2b111a Fix for bug #54393: crash and/or valgrind errors in
mysql_client_binlog_statement

Problem: server may read from unassigned memory performing
"wrong" BINLOG queries.

Fix: never read from unassigned memory.
2010-06-18 21:32:23 +04:00
Daniel Fischer
9891642e77 merge 2010-06-18 17:04:15 +02:00
Joerg Bruehe
105b4c38d0 Automerge from parent copy. 2010-06-18 10:29:03 +02:00
Magne Mahre
3ac6a4b451 WL#5349 Change default storage engine to InnoDB
The default storage engine is changed from MyISAM to
InnoDB, in all builds except for the embedded server.

In addition, the following system variables are 
changed:

  * innodb_file_per_table is enabled
  * innodb_strict_mode is enabled
  * innodb_file_format_name_update is changed
    to 'Barracuda'

The test suite is changed so that tests that do not
explicitly include the have_innodb.inc are run with
--default-storage-engine=MyISAM.  This is to ease the
transition, so that most regression tests are run
with the same engine as before.

Some tests are disabled for the embedded server
regression test, as the output of certain statements
will be different that for the regular server
(i.e SELECT @@default_storage_engine).  This is to
ease transition.
2010-06-17 22:51:35 +02:00
Joerg Bruehe
81fda234c7 Bug#54590 "make_binary_distribution" fails because a command
line exceeds the limit

Merge the fix into "trunk-bugfixing".
2010-06-17 20:19:28 +02:00
Joerg Bruehe
e740b826a8 Bug#54590 "make_binary_distribution" fails because a command
line exceeds the limit

Upmerge the fix from 5.1 to 5.5 ("trunk").
2010-06-17 20:10:17 +02:00